This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new 763273f56 Remove deprecated
UnsupportedRequestContentTypeRejection.apply 1-arg (since Akka HTTP 10.1.9)
(#1128)
763273f56 is described below
commit 763273f569a24b726ed8c37e554fe019b78d3de6
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sun Jul 5 16:41:07 2026 +0800
Remove deprecated UnsupportedRequestContentTypeRejection.apply 1-arg (since
Akka HTTP 10.1.9) (#1128)
* refactor: remove deprecated UnsupportedRequestContentTypeRejection.apply
1-arg (since Akka HTTP 10.1.9)
* fix: change AbstractFunction1 to AbstractFunction2 for
UnsupportedRequestContentTypeRejection
The deprecated 1-arg apply was the Function1 implementation.
After removal, the companion object needs AbstractFunction2 to match the
remaining 2-arg apply.
* fix: add MiMa filters for andThen/compose lost from Function1→Function2
---
.../2.0.x.backwards.excludes/remove-deprecated-methods.excludes | 6 ++++++
.../scala/org/apache/pekko/http/scaladsl/server/Rejection.scala | 8 ++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git
a/http/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes
b/http/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes
index 6375262da..fd1cd0a1c 100644
---
a/http/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes
+++
b/http/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes
@@ -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$")
diff --git
a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/Rejection.scala
b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/Rejection.scala
index 27874ad5e..ea19c4c9c 100644
--- a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/Rejection.scala
+++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/Rejection.scala
@@ -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._
@@ -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)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]