Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,9 @@ ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scalad
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.unmarshalling.sse.EventStreamUnmarshalling.maxEventSize")
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.unmarshalling.sse.EventStreamUnmarshalling.fromEventStream")
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.unmarshalling.sse.EventStreamUnmarshalling.$init$")

# Remove deprecated UnsupportedRequestContentTypeRejection.apply 1-arg (since Akka HTTP 10.1.9)
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.server.UnsupportedRequestContentTypeRejection.apply")
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.server.UnsupportedRequestContentTypeRejection.andThen")
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.server.UnsupportedRequestContentTypeRejection.compose")
ProblemFilters.exclude[MissingTypesProblem]("org.apache.pekko.http.scaladsl.server.UnsupportedRequestContentTypeRejection$")
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import java.util.function.Function
import scala.collection.immutable
import scala.jdk.CollectionConverters._
import scala.jdk.OptionConverters._
import scala.runtime.AbstractFunction1
import scala.runtime.AbstractFunction2

import org.apache.pekko
import pekko.http.impl.util.JavaMapping._
Expand Down Expand Up @@ -151,16 +151,12 @@ final class UnsupportedRequestContentTypeRejection(
}

object UnsupportedRequestContentTypeRejection
extends AbstractFunction1[Set[ContentTypeRange], UnsupportedRequestContentTypeRejection] {
extends AbstractFunction2[Set[ContentTypeRange], Option[ContentType], UnsupportedRequestContentTypeRejection] {

def apply(
supported: Set[ContentTypeRange], contentType: Option[ContentType]): UnsupportedRequestContentTypeRejection =
new UnsupportedRequestContentTypeRejection(supported, contentType)

@deprecated("for binary compatibility", since = "Akka HTTP 10.1.9")
def apply(supported: Set[ContentTypeRange]): UnsupportedRequestContentTypeRejection =
new UnsupportedRequestContentTypeRejection(supported, None)

def unapply(rejection: UnsupportedRequestContentTypeRejection): Option[Set[ContentTypeRange]] =
Some(rejection.supported)
}
Expand Down