diff --git a/http-core/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes b/http-core/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes index 23ad02cc7..ea3a74ede 100644 --- a/http-core/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes +++ b/http-core/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes @@ -125,3 +125,8 @@ ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scalad ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.settings.ServerSettings.websocketRandomFactory") ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.settings.ServerSettings.getWebsocketRandomFactory") ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.settings.ServerSettings.withWebsocketRandomFactory") + +# Remove deprecated ConnectionContext.defaultPort (since Akka HTTP 10.2.0) +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.ConnectionContext.defaultPort") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.HttpsConnectionContext.defaultPort") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.http.scaladsl.HttpConnectionContext.defaultPort") diff --git a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/ConnectionContext.scala b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/ConnectionContext.scala index 4f0f844c1..4f12f38fc 100644 --- a/http-core/src/main/scala/org/apache/pekko/http/scaladsl/ConnectionContext.scala +++ b/http-core/src/main/scala/org/apache/pekko/http/scaladsl/ConnectionContext.scala @@ -18,10 +18,7 @@ import javax.net.ssl._ import org.apache.pekko import pekko.annotation.{ ApiMayChange, InternalApi } -trait ConnectionContext extends pekko.http.javadsl.ConnectionContext { - @deprecated("Internal method, left for binary compatibility", since = "Akka HTTP 10.2.0") - protected[http] def defaultPort: Int -} +trait ConnectionContext extends pekko.http.javadsl.ConnectionContext object ConnectionContext { // #https-server-context-creation @@ -91,13 +88,9 @@ object ConnectionContext { @InternalApi final class HttpsConnectionContext private[http] ( private[http] val engineCreator: Option[(String, Int)] => SSLEngine) - extends pekko.http.javadsl.HttpsConnectionContext with ConnectionContext { - protected[http] override final def defaultPort: Int = 443 -} + extends pekko.http.javadsl.HttpsConnectionContext with ConnectionContext -sealed class HttpConnectionContext extends pekko.http.javadsl.HttpConnectionContext with ConnectionContext { - protected[http] override final def defaultPort: Int = 80 -} +sealed class HttpConnectionContext extends pekko.http.javadsl.HttpConnectionContext with ConnectionContext object HttpConnectionContext extends HttpConnectionContext {