From 1a653748897ad67f192545f07dec3b6e95f531ec Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 27 Jun 2026 15:33:33 +0100 Subject: [PATCH 1/2] make withLevel package private --- .../org/apache/pekko/http/scaladsl/coding/Deflate.scala | 8 ++++---- .../org/apache/pekko/http/scaladsl/coding/Gzip.scala | 8 ++++---- .../org/apache/pekko/http/scaladsl/coding/NoCoding.scala | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala index 07f7815815..34959049cc 100644 --- a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala +++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala @@ -18,7 +18,7 @@ import pekko.annotation.InternalApi import pekko.http.scaladsl.model._ import pekko.http.scaladsl.model.headers.HttpEncodings -@InternalApi +@InternalApi // used by javadsl.Coder @deprecated("Actual implementation of Deflate is internal API, use Coders.Deflate instead", since = "Akka HTTP 10.2.0") class Deflate private[http] (compressionLevel: Int, val messageFilter: HttpMessage => Boolean) extends Coder with StreamDecoder { @@ -30,9 +30,9 @@ class Deflate private[http] (compressionLevel: Int, val messageFilter: HttpMessa private[http] def newCompressor = new DeflateCompressor(compressionLevel) def newDecompressorStage(maxBytesPerChunk: Int) = () => new DeflateDecompressor(maxBytesPerChunk) - @deprecated("Use Coders.Deflate(compressionLevel = ...) instead", since = "Akka HTTP 10.2.0") - def withLevel(level: Int): Deflate = new Deflate(level, messageFilter) + @InternalApi // used by javadsl.Coder + private[http] def withLevel(level: Int): Deflate = new Deflate(level, messageFilter) } -@InternalApi +@InternalApi // used by javadsl.Coder @deprecated("Actual implementation of Deflate is internal API, use Coders.Deflate instead", since = "Akka HTTP 10.2.0") object Deflate extends Deflate(Encoder.DefaultFilter) diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala index 5596928666..e28bfe2227 100644 --- a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala +++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala @@ -18,7 +18,7 @@ import pekko.annotation.InternalApi import pekko.http.scaladsl.model._ import pekko.http.scaladsl.model.headers.HttpEncodings -@InternalApi +@InternalApi // used by javadsl.Coder @deprecated("Actual implementation of Gzip is internal, use Coders.Gzip instead", since = "Akka HTTP 10.2.0") class Gzip private[http] (compressionLevel: Int, val messageFilter: HttpMessage => Boolean) extends Coder with StreamDecoder { @@ -30,14 +30,14 @@ class Gzip private[http] (compressionLevel: Int, val messageFilter: HttpMessage private[http] def newCompressor = new GzipCompressor(compressionLevel) def newDecompressorStage(maxBytesPerChunk: Int) = () => new GzipDecompressor(maxBytesPerChunk) - @deprecated("Use Coders.Gzip(compressionLevel = ...) instead", since = "Akka HTTP 10.2.0") - def withLevel(level: Int): Gzip = new Gzip(level, messageFilter) + @InternalApi // used by javadsl.Coder + private[http] def withLevel(level: Int): Gzip = new Gzip(level, messageFilter) } /** * An encoder and decoder for the HTTP 'gzip' encoding. */ -@InternalApi +@InternalApi // used by javadsl.Coder @deprecated("Actual implementation of Gzip is internal API, use Coders.Gzip instead", since = "Akka HTTP 10.2.0") object Gzip extends Gzip(Encoder.DefaultFilter) { def apply(messageFilter: HttpMessage => Boolean) = new Gzip(messageFilter) diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala index 0bc42dfe22..c15af28255 100644 --- a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala +++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala @@ -25,7 +25,7 @@ import pekko.util.ByteString /** * An encoder and decoder for the HTTP 'identity' encoding. */ -@InternalApi +@InternalApi // used by javadsl.Coder @deprecated("Actual implementation of NoCoding is internal API, use Coders.NoCoding instead", since = "Akka HTTP 10.2.0") object NoCoding extends Coder with StreamDecoder { From 8c6a5b88e8e353ac67e02332f243975a889d2f76 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 27 Jun 2026 16:11:43 +0100 Subject: [PATCH 2/2] comment --- .../org/apache/pekko/http/scaladsl/coding/Deflate.scala | 6 +++--- .../scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala | 6 +++--- .../org/apache/pekko/http/scaladsl/coding/NoCoding.scala | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala index 34959049cc..5c3c39d5b0 100644 --- a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala +++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Deflate.scala @@ -18,7 +18,7 @@ import pekko.annotation.InternalApi import pekko.http.scaladsl.model._ import pekko.http.scaladsl.model.headers.HttpEncodings -@InternalApi // used by javadsl.Coder +@InternalApi // used by javadsl.coding.Coder @deprecated("Actual implementation of Deflate is internal API, use Coders.Deflate instead", since = "Akka HTTP 10.2.0") class Deflate private[http] (compressionLevel: Int, val messageFilter: HttpMessage => Boolean) extends Coder with StreamDecoder { @@ -30,9 +30,9 @@ class Deflate private[http] (compressionLevel: Int, val messageFilter: HttpMessa private[http] def newCompressor = new DeflateCompressor(compressionLevel) def newDecompressorStage(maxBytesPerChunk: Int) = () => new DeflateDecompressor(maxBytesPerChunk) - @InternalApi // used by javadsl.Coder + @InternalApi // used by javadsl.coding.Coder private[http] def withLevel(level: Int): Deflate = new Deflate(level, messageFilter) } -@InternalApi // used by javadsl.Coder +@InternalApi // used by javadsl.coding.Coder @deprecated("Actual implementation of Deflate is internal API, use Coders.Deflate instead", since = "Akka HTTP 10.2.0") object Deflate extends Deflate(Encoder.DefaultFilter) diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala index e28bfe2227..e7e2926e43 100644 --- a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala +++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/Gzip.scala @@ -18,7 +18,7 @@ import pekko.annotation.InternalApi import pekko.http.scaladsl.model._ import pekko.http.scaladsl.model.headers.HttpEncodings -@InternalApi // used by javadsl.Coder +@InternalApi // used by javadsl.coding.Coder @deprecated("Actual implementation of Gzip is internal, use Coders.Gzip instead", since = "Akka HTTP 10.2.0") class Gzip private[http] (compressionLevel: Int, val messageFilter: HttpMessage => Boolean) extends Coder with StreamDecoder { @@ -30,14 +30,14 @@ class Gzip private[http] (compressionLevel: Int, val messageFilter: HttpMessage private[http] def newCompressor = new GzipCompressor(compressionLevel) def newDecompressorStage(maxBytesPerChunk: Int) = () => new GzipDecompressor(maxBytesPerChunk) - @InternalApi // used by javadsl.Coder + @InternalApi // used by javadsl.coding.Coder private[http] def withLevel(level: Int): Gzip = new Gzip(level, messageFilter) } /** * An encoder and decoder for the HTTP 'gzip' encoding. */ -@InternalApi // used by javadsl.Coder +@InternalApi // used by javadsl.coding.Coder @deprecated("Actual implementation of Gzip is internal API, use Coders.Gzip instead", since = "Akka HTTP 10.2.0") object Gzip extends Gzip(Encoder.DefaultFilter) { def apply(messageFilter: HttpMessage => Boolean) = new Gzip(messageFilter) diff --git a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala index c15af28255..6a08f64080 100644 --- a/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala +++ b/http/src/main/scala/org/apache/pekko/http/scaladsl/coding/NoCoding.scala @@ -25,7 +25,7 @@ import pekko.util.ByteString /** * An encoder and decoder for the HTTP 'identity' encoding. */ -@InternalApi // used by javadsl.Coder +@InternalApi // used by javadsl.coding.Coder @deprecated("Actual implementation of NoCoding is internal API, use Coders.NoCoding instead", since = "Akka HTTP 10.2.0") object NoCoding extends Coder with StreamDecoder {