From 00b243ddb57586bb403d2614787357892f1839ec Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Fri, 16 Jun 2023 15:09:17 +0200 Subject: [PATCH] akka -> pekko --- README.md | 24 +++++++++---------- ...StandaloneAhcWSRequestBenchMapsBench.scala | 2 +- .../libs/ws/ahc/ByteStringRequestTest.java | 12 +++++----- .../ws/ahc/StandaloneWSClientSupport.scala | 2 +- .../test/scala/play/NettyServerProvider.scala | 6 ++--- .../api/libs/ws/ahc/AhcWSClientSpec.scala | 4 ++-- .../api/libs/ws/ahc/JsonRequestSpec.scala | 6 ++--- .../ws/ahc/StandaloneWSClientSupport.scala | 2 +- .../play/api/libs/ws/ahc/XMLRequestSpec.scala | 8 +++---- .../play/libs/ws/ahc/AhcWSClientSpec.scala | 6 ++--- .../libs/ws/ahc/StandaloneAhcWSClient.java | 14 +++++------ .../libs/ws/ahc/StandaloneAhcWSRequest.java | 10 ++++---- .../libs/ws/ahc/StandaloneAhcWSResponse.java | 2 +- .../play/libs/ws/ahc/StreamedResponse.java | 4 ++-- .../libs/ws/ahc/StandaloneAhcWSClient.scala | 12 +++++----- .../libs/ws/ahc/StandaloneAhcWSRequest.scala | 4 ++-- .../libs/ws/ahc/StandaloneAhcWSResponse.scala | 4 ++-- .../scala/play/api/libs/ws/ahc/Streamed.scala | 2 +- .../api/libs/ws/ahc/StreamedResponse.scala | 8 +++---- .../api/libs/ws/ahc/AhcWSRequestSpec.scala | 8 +++---- .../api/libs/ws/ahc/AhcWSResponseSpec.scala | 2 +- .../java/play/libs/ws/JsonBodyWritables.java | 2 +- .../play/api/libs/ws/JsonBodyWritables.scala | 2 +- .../api/libs/ws/JsonBodyReadablesSpec.scala | 4 ++-- .../src/main/java/play/libs/ws/XML.java | 6 ++--- .../java/play/libs/ws/XMLBodyWritables.java | 2 +- .../play/api/libs/ws/XMLBodyWritables.scala | 2 +- .../play/libs/ws/DefaultBodyReadables.java | 6 ++--- .../play/libs/ws/DefaultBodyWritables.java | 8 +++---- .../play/libs/ws/InMemoryBodyWritable.java | 2 +- .../java/play/libs/ws/SourceBodyWritable.java | 4 ++-- .../play/libs/ws/StandaloneWSResponse.java | 4 ++-- .../main/scala/play/api/libs/ws/Body.scala | 4 ++-- .../api/libs/ws/DefaultBodyReadables.scala | 8 +++---- .../api/libs/ws/DefaultBodyWritables.scala | 8 +++---- .../api/libs/ws/StandaloneWSResponse.scala | 6 ++--- 36 files changed, 105 insertions(+), 105 deletions(-) diff --git a/README.md b/README.md index 5981b951..502df9de 100644 --- a/README.md +++ b/README.md @@ -117,8 +117,8 @@ Note that there is a special case: when you are streaming the response, then you ```scala import scala.concurrent.ExecutionContext -import akka.util.ByteString -import akka.stream.scaladsl.Source +import org.apache.pekko.util.ByteString +import org.apache.pekko.stream.scaladsl.Source import play.api.libs.ws.StandaloneWSClient def useWSStream(ws: StandaloneWSClient)(implicit ec: ExecutionContext) = @@ -159,7 +159,7 @@ implicit val fooBodyReadable = BodyReadable[Foo] { response => or custom BodyWritable: ```scala -import akka.util.ByteString +import org.apache.pekko.util.ByteString import play.api.libs.ws.{ BodyWritable, InMemoryBody } implicit val writeableOf_Foo: BodyWritable[Foo] = { @@ -234,7 +234,7 @@ You can also define your own custom `BodyWritable`: ```java public class MyClient { private BodyWritable someOtherMethod(String string) { - akka.util.ByteString byteString = akka.util.ByteString.fromString(string); + org.apache.pekko.util.ByteString byteString = org.apache.pekko.util.ByteString.fromString(string); return new DefaultBodyWritables.InMemoryBodyWritable(byteString, "text/plain"); } } @@ -242,7 +242,7 @@ public class MyClient { ## Instantiating a standalone client -The standalone client needs [Akka](http://akka.io/) to handle streaming data internally: +The standalone client needs [Pekko](https://pekko.apache.org/) to handle streaming data internally: ### Scala @@ -251,8 +251,8 @@ In Scala, the way to call out to a web service and close down the client: ```scala package playwsclient -import akka.actor.ActorSystem -import akka.stream._ +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream._ import play.api.libs.ws._ import play.api.libs.ws.ahc._ @@ -263,7 +263,7 @@ object ScalaClient { import scala.concurrent.ExecutionContext.Implicits._ def main(args: Array[String]): Unit = { - // Create Akka system for thread and streaming management + // Create Pekko system for thread and streaming management implicit val system = ActorSystem() system.registerOnTermination { System.exit(0) @@ -318,8 +318,8 @@ In Java the API is much the same: ```java package playwsclient; -import akka.actor.ActorSystem; -import akka.stream.*; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.*; import com.typesafe.config.ConfigFactory; import play.libs.ws.*; @@ -330,7 +330,7 @@ public class JavaClient implements DefaultBodyReadables { private final ActorSystem system; public static void main(String[] args) { - // Set up Akka materializer to handle streaming + // Set up Pekko materializer to handle streaming final String name = "wsclient"; ActorSystem system = ActorSystem.create(name); system.registerOnTermination(() -> System.exit(0)); @@ -426,7 +426,7 @@ class CaffeineHttpCache extends Cache { def close(): Unit = underlying.cleanUp() } -def withCache(implicit m: akka.stream.Materializer): StandaloneAhcWSClient = { +def withCache(implicit m: org.apache.pekko.stream.Materializer): StandaloneAhcWSClient = { implicit def ec = m.executionContext val cache = new CaffeineHttpCache() diff --git a/bench/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequestBenchMapsBench.scala b/bench/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequestBenchMapsBench.scala index c87c4434..07bb8052 100644 --- a/bench/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequestBenchMapsBench.scala +++ b/bench/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequestBenchMapsBench.scala @@ -6,7 +6,7 @@ package play.api.libs.ws.ahc import java.util.concurrent.TimeUnit -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import org.openjdk.jmh.annotations._ import org.openjdk.jmh.infra.Blackhole import play.api.libs.ws.StandaloneWSRequest diff --git a/integration-tests/src/test/java/play/libs/ws/ahc/ByteStringRequestTest.java b/integration-tests/src/test/java/play/libs/ws/ahc/ByteStringRequestTest.java index 6ab5bb1a..8a179db2 100644 --- a/integration-tests/src/test/java/play/libs/ws/ahc/ByteStringRequestTest.java +++ b/integration-tests/src/test/java/play/libs/ws/ahc/ByteStringRequestTest.java @@ -4,12 +4,12 @@ package play.libs.ws.ahc; -import akka.Done; -import akka.actor.ActorSystem; -import akka.stream.Materializer; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.Done; +import org.apache.pekko.actor.ActorSystem; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import org.junit.Test; diff --git a/integration-tests/src/test/java/play/libs/ws/ahc/StandaloneWSClientSupport.scala b/integration-tests/src/test/java/play/libs/ws/ahc/StandaloneWSClientSupport.scala index 933625f2..82434821 100644 --- a/integration-tests/src/test/java/play/libs/ws/ahc/StandaloneWSClientSupport.scala +++ b/integration-tests/src/test/java/play/libs/ws/ahc/StandaloneWSClientSupport.scala @@ -4,7 +4,7 @@ package play.libs.ws.ahc -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import org.specs2.execute.Result import play.api.libs.ws.ahc.AhcConfigBuilder import play.api.libs.ws.ahc.AhcWSClientConfig diff --git a/integration-tests/src/test/scala/play/NettyServerProvider.scala b/integration-tests/src/test/scala/play/NettyServerProvider.scala index f2116efd..9b7b59ba 100644 --- a/integration-tests/src/test/scala/play/NettyServerProvider.scala +++ b/integration-tests/src/test/scala/play/NettyServerProvider.scala @@ -4,13 +4,13 @@ package play -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import org.specs2.concurrent.ExecutionEnv import org.specs2.specification.BeforeAfterAll import scala.concurrent.duration._ import scala.concurrent.Await -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import play.api.mvc.Handler import play.api.mvc.RequestHeader @@ -34,7 +34,7 @@ trait NettyServerProvider extends BeforeAfterAll { lazy val testServerPort: Int = server.httpPort.getOrElse(sys.error("undefined port number")) val defaultTimeout: FiniteDuration = 5.seconds - // Create Akka system for thread and streaming management + // Create Pekko system for thread and streaming management implicit val system: ActorSystem = ActorSystem() implicit val materializer: Materializer = Materializer.matFromSystem diff --git a/integration-tests/src/test/scala/play/api/libs/ws/ahc/AhcWSClientSpec.scala b/integration-tests/src/test/scala/play/api/libs/ws/ahc/AhcWSClientSpec.scala index 8b40f04f..a74b0258 100644 --- a/integration-tests/src/test/scala/play/api/libs/ws/ahc/AhcWSClientSpec.scala +++ b/integration-tests/src/test/scala/play/api/libs/ws/ahc/AhcWSClientSpec.scala @@ -4,8 +4,8 @@ package play.api.libs.ws.ahc -import akka.stream.scaladsl.Sink -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.util.ByteString import org.specs2.concurrent.ExecutionEnv import org.specs2.concurrent.FutureAwait import org.specs2.execute.Result diff --git a/integration-tests/src/test/scala/play/api/libs/ws/ahc/JsonRequestSpec.scala b/integration-tests/src/test/scala/play/api/libs/ws/ahc/JsonRequestSpec.scala index 9b246aa1..7394ab89 100644 --- a/integration-tests/src/test/scala/play/api/libs/ws/ahc/JsonRequestSpec.scala +++ b/integration-tests/src/test/scala/play/api/libs/ws/ahc/JsonRequestSpec.scala @@ -6,9 +6,9 @@ package play.api.libs.ws.ahc import java.nio.charset.StandardCharsets -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.util.ByteString import org.mockito.Mockito.times import org.mockito.Mockito.verify import org.mockito.Mockito.when diff --git a/integration-tests/src/test/scala/play/api/libs/ws/ahc/StandaloneWSClientSupport.scala b/integration-tests/src/test/scala/play/api/libs/ws/ahc/StandaloneWSClientSupport.scala index 41cc268b..0a2e692b 100644 --- a/integration-tests/src/test/scala/play/api/libs/ws/ahc/StandaloneWSClientSupport.scala +++ b/integration-tests/src/test/scala/play/api/libs/ws/ahc/StandaloneWSClientSupport.scala @@ -4,7 +4,7 @@ package play.api.libs.ws.ahc -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import org.specs2.execute.Result trait StandaloneWSClientSupport { diff --git a/integration-tests/src/test/scala/play/api/libs/ws/ahc/XMLRequestSpec.scala b/integration-tests/src/test/scala/play/api/libs/ws/ahc/XMLRequestSpec.scala index aec0b266..05ef5c86 100644 --- a/integration-tests/src/test/scala/play/api/libs/ws/ahc/XMLRequestSpec.scala +++ b/integration-tests/src/test/scala/play/api/libs/ws/ahc/XMLRequestSpec.scala @@ -6,9 +6,9 @@ package play.api.libs.ws.ahc import java.nio.charset.StandardCharsets -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.util.ByteString import org.specs2.matcher.MustMatchers import org.specs2.mutable.Specification import org.specs2.specification.AfterAll @@ -46,7 +46,7 @@ class XMLRequestSpec extends Specification with AfterAll with MustMatchers { override def bodyAsBytes: ByteString = ByteString.fromArray(byteArray) - override def bodyAsSource: akka.stream.scaladsl.Source[ByteString, _] = ??? + override def bodyAsSource: org.apache.pekko.stream.scaladsl.Source[ByteString, _] = ??? } "write an XML node" in { diff --git a/integration-tests/src/test/scala/play/libs/ws/ahc/AhcWSClientSpec.scala b/integration-tests/src/test/scala/play/libs/ws/ahc/AhcWSClientSpec.scala index bcb908ac..621d7d2c 100644 --- a/integration-tests/src/test/scala/play/libs/ws/ahc/AhcWSClientSpec.scala +++ b/integration-tests/src/test/scala/play/libs/ws/ahc/AhcWSClientSpec.scala @@ -4,8 +4,8 @@ package play.libs.ws.ahc -import akka.stream.javadsl.Sink -import akka.util.ByteString +import org.apache.pekko.stream.javadsl.Sink +import org.apache.pekko.util.ByteString import org.specs2.concurrent.ExecutionEnv import org.specs2.matcher.FutureMatchers import org.specs2.mutable.Specification @@ -53,7 +53,7 @@ class AhcWSClientSpec(implicit val executionEnv: ExecutionEnv) "get successfully" in withClient() { client => def someOtherMethod(string: String) = { - new InMemoryBodyWritable(akka.util.ByteString.fromString(string), "text/plain") + new InMemoryBodyWritable(org.apache.pekko.util.ByteString.fromString(string), "text/plain") } client .url(s"http://localhost:$testServerPort") diff --git a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSClient.java b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSClient.java index bed978ca..27226888 100644 --- a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSClient.java +++ b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSClient.java @@ -4,11 +4,11 @@ package play.libs.ws.ahc; -import akka.Done; -import akka.stream.Materializer; -import akka.stream.javadsl.Source; -import akka.util.ByteString; -import akka.util.ByteStringBuilder; +import org.apache.pekko.Done; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; +import org.apache.pekko.util.ByteStringBuilder; import com.typesafe.sslconfig.ssl.SystemConfiguration; import org.reactivestreams.Publisher; import org.reactivestreams.Subscriber; @@ -146,7 +146,7 @@ public void onComplete() { * A convenience method for creating a StandaloneAhcWSClient from configuration. * * @param ahcWSClientConfig the configuration object - * @param materializer an akka materializer + * @param materializer an pekko materializer * @return a fully configured StandaloneAhcWSClient instance. * @see #create(AhcWSClientConfig, AhcHttpCache, Materializer) */ @@ -163,7 +163,7 @@ public static StandaloneAhcWSClient create(AhcWSClientConfig ahcWSClientConfig, * * @param ahcWSClientConfig the configuration object * @param cache if not null, will be used for HTTP response caching. - * @param materializer an akka materializer + * @param materializer an pekko materializer * @return a fully configured StandaloneAhcWSClient instance. */ public static StandaloneAhcWSClient create(AhcWSClientConfig ahcWSClientConfig, AhcHttpCache cache, Materializer materializer) { diff --git a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSRequest.java b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSRequest.java index 13827ea1..591aafe9 100644 --- a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSRequest.java +++ b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSRequest.java @@ -4,11 +4,11 @@ package play.libs.ws.ahc; -import akka.stream.Materializer; -import akka.stream.javadsl.AsPublisher; -import akka.stream.javadsl.Sink; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.stream.Materializer; +import org.apache.pekko.stream.javadsl.AsPublisher; +import org.apache.pekko.stream.javadsl.Sink; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import org.reactivestreams.Publisher; import play.api.libs.ws.ahc.FormUrlEncodedParser; import play.libs.oauth.OAuth; diff --git a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSResponse.java b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSResponse.java index 32f5d959..a5b3e897 100644 --- a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSResponse.java +++ b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StandaloneAhcWSResponse.java @@ -4,7 +4,7 @@ package play.libs.ws.ahc; -import akka.util.ByteString; +import org.apache.pekko.util.ByteString; import play.api.libs.ws.ahc.AhcWSUtils; import play.libs.ws.BodyReadable; diff --git a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StreamedResponse.java b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StreamedResponse.java index 17de3a96..d7120c5b 100644 --- a/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StreamedResponse.java +++ b/play-ahc-ws-standalone/src/main/java/play/libs/ws/ahc/StreamedResponse.java @@ -4,8 +4,8 @@ package play.libs.ws.ahc; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import org.reactivestreams.Publisher; import play.api.libs.ws.ahc.AhcWSUtils; import play.libs.ws.BodyReadable; diff --git a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSClient.scala b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSClient.scala index 3cb834db..50008719 100644 --- a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSClient.scala +++ b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSClient.scala @@ -4,11 +4,11 @@ package play.api.libs.ws.ahc -import akka.Done +import org.apache.pekko.Done import javax.inject.Inject -import akka.stream.Materializer -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.typesafe.sslconfig.ssl.SystemConfiguration import org.reactivestreams.Publisher import org.reactivestreams.Subscriber @@ -194,7 +194,7 @@ object StandaloneAhcWSClient { * {{{ * import play.api.libs.ws.ahc.StandaloneAhcWSClient * - * def example(someUrl: String)(implicit m: akka.stream.Materializer) = { + * def example(someUrl: String)(implicit m: org.apache.pekko.stream.Materializer) = { * implicit def ec = m.executionContext * * val client = StandaloneAhcWSClient() @@ -209,7 +209,7 @@ object StandaloneAhcWSClient { * * @param config configuration settings * @param httpCache if not null, will be used for HTTP response caching. - * @param materializer the akka materializer. + * @param materializer the pekko materializer. */ def apply( config: AhcWSClientConfig = AhcWSClientConfigFactory.forConfig(), diff --git a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequest.scala b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequest.scala index 8e8816d1..702ea95d 100644 --- a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequest.scala +++ b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSRequest.scala @@ -9,8 +9,8 @@ import java.net.URI import java.nio.charset.Charset import java.nio.charset.StandardCharsets -import akka.stream.Materializer -import akka.stream.scaladsl.Sink +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Sink import play.api.libs.ws.StandaloneWSRequest import play.api.libs.ws._ import play.shaded.ahc.io.netty.buffer.Unpooled diff --git a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSResponse.scala b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSResponse.scala index 2510ecb6..433f94b1 100644 --- a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSResponse.scala +++ b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StandaloneAhcWSResponse.scala @@ -4,8 +4,8 @@ package play.api.libs.ws.ahc -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import play.api.libs.ws.DefaultBodyReadables import play.api.libs.ws.StandaloneWSResponse import play.api.libs.ws.WSCookie diff --git a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/Streamed.scala b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/Streamed.scala index 58f421a7..f02eb6ab 100644 --- a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/Streamed.scala +++ b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/Streamed.scala @@ -10,7 +10,7 @@ import org.reactivestreams.Subscriber import org.reactivestreams.Subscription import org.reactivestreams.Publisher import play.shaded.ahc.io.netty.handler.codec.http.HttpHeaders -import akka.Done +import org.apache.pekko.Done import play.shaded.ahc.org.asynchttpclient.AsyncHandler.State import play.shaded.ahc.org.asynchttpclient._ import play.shaded.ahc.org.asynchttpclient.handler.StreamedAsyncHandler diff --git a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StreamedResponse.scala b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StreamedResponse.scala index 29ea565f..04a8e812 100644 --- a/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StreamedResponse.scala +++ b/play-ahc-ws-standalone/src/main/scala/play/api/libs/ws/ahc/StreamedResponse.scala @@ -4,8 +4,8 @@ package play.api.libs.ws.ahc -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import org.reactivestreams.Publisher import play.api.libs.ws.StandaloneWSResponse import play.api.libs.ws.WSCookie @@ -19,8 +19,8 @@ import play.shaded.ahc.org.asynchttpclient.HttpResponseBodyPart * {{{ * import scala.concurrent.{ ExecutionContext, Future } * - * import akka.util.ByteString - * import akka.stream.scaladsl.Source + * import org.apache.pekko.util.ByteString + * import org.apache.pekko.stream.scaladsl.Source * * import play.api.libs.ws.DefaultBodyReadables._ * import play.api.libs.ws.ahc.StandaloneAhcWSClient diff --git a/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSRequestSpec.scala b/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSRequestSpec.scala index 45e4ebc4..c6194e7c 100644 --- a/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSRequestSpec.scala +++ b/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSRequestSpec.scala @@ -7,9 +7,9 @@ package play.api.libs.ws.ahc import scala.jdk.CollectionConverters._ import scala.concurrent.duration._ -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.util.ByteString import org.mockito.Mockito import org.specs2.execute.Result @@ -50,7 +50,7 @@ class AhcWSRequestSpec extends Specification with AfterAll with DefaultBodyReada "Given the full URL" in { - implicit val materializer: Materializer = mock[akka.stream.Materializer] + implicit val materializer: Materializer = mock[org.apache.pekko.stream.Materializer] val client = mock[StandaloneAhcWSClient] "request withQueryStringParameters" in { diff --git a/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSResponseSpec.scala b/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSResponseSpec.scala index a55b0d73..eeebc303 100644 --- a/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSResponseSpec.scala +++ b/play-ahc-ws-standalone/src/test/scala/play/api/libs/ws/ahc/AhcWSResponseSpec.scala @@ -7,7 +7,7 @@ package play.api.libs.ws.ahc import java.nio.charset.StandardCharsets import java.util -import akka.util.ByteString +import org.apache.pekko.util.ByteString import org.mockito.Mockito.when import org.mockito.Mockito import org.specs2.mutable.Specification diff --git a/play-ws-standalone-json/src/main/java/play/libs/ws/JsonBodyWritables.java b/play-ws-standalone-json/src/main/java/play/libs/ws/JsonBodyWritables.java index f9d9d483..072d99a4 100644 --- a/play-ws-standalone-json/src/main/java/play/libs/ws/JsonBodyWritables.java +++ b/play-ws-standalone-json/src/main/java/play/libs/ws/JsonBodyWritables.java @@ -4,7 +4,7 @@ package play.libs.ws; -import akka.util.ByteString; +import org.apache.pekko.util.ByteString; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/play-ws-standalone-json/src/main/scala/play/api/libs/ws/JsonBodyWritables.scala b/play-ws-standalone-json/src/main/scala/play/api/libs/ws/JsonBodyWritables.scala index 1aa5757b..05d7d300 100644 --- a/play-ws-standalone-json/src/main/scala/play/api/libs/ws/JsonBodyWritables.scala +++ b/play-ws-standalone-json/src/main/scala/play/api/libs/ws/JsonBodyWritables.scala @@ -4,7 +4,7 @@ package play.api.libs.ws -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.databind.JsonNode import com.fasterxml.jackson.databind.ObjectMapper import play.api.libs.json.JsValue diff --git a/play-ws-standalone-json/src/test/scala/play/api/libs/ws/JsonBodyReadablesSpec.scala b/play-ws-standalone-json/src/test/scala/play/api/libs/ws/JsonBodyReadablesSpec.scala index 677940c7..2d285368 100644 --- a/play-ws-standalone-json/src/test/scala/play/api/libs/ws/JsonBodyReadablesSpec.scala +++ b/play-ws-standalone-json/src/test/scala/play/api/libs/ws/JsonBodyReadablesSpec.scala @@ -7,8 +7,8 @@ package play.api.libs.ws import java.nio.charset.Charset import java.nio.charset.StandardCharsets._ -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import org.specs2.matcher.MustMatchers import org.specs2.mutable.Specification import play.api.libs.json.JsSuccess diff --git a/play-ws-standalone-xml/src/main/java/play/libs/ws/XML.java b/play-ws-standalone-xml/src/main/java/play/libs/ws/XML.java index 79bbde36..11129275 100644 --- a/play-ws-standalone-xml/src/main/java/play/libs/ws/XML.java +++ b/play-ws-standalone-xml/src/main/java/play/libs/ws/XML.java @@ -4,9 +4,9 @@ package play.libs.ws; -import akka.util.ByteString; -import akka.util.ByteString$; -import akka.util.ByteStringBuilder; +import org.apache.pekko.util.ByteString; +import org.apache.pekko.util.ByteString$; +import org.apache.pekko.util.ByteStringBuilder; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException; diff --git a/play-ws-standalone-xml/src/main/java/play/libs/ws/XMLBodyWritables.java b/play-ws-standalone-xml/src/main/java/play/libs/ws/XMLBodyWritables.java index c3b4fcfd..b4d23703 100644 --- a/play-ws-standalone-xml/src/main/java/play/libs/ws/XMLBodyWritables.java +++ b/play-ws-standalone-xml/src/main/java/play/libs/ws/XMLBodyWritables.java @@ -4,7 +4,7 @@ package play.libs.ws; -import akka.util.ByteString; +import org.apache.pekko.util.ByteString; import org.w3c.dom.Document; /** diff --git a/play-ws-standalone-xml/src/main/scala/play/api/libs/ws/XMLBodyWritables.scala b/play-ws-standalone-xml/src/main/scala/play/api/libs/ws/XMLBodyWritables.scala index 415e2030..38ab6cee 100644 --- a/play-ws-standalone-xml/src/main/scala/play/api/libs/ws/XMLBodyWritables.scala +++ b/play-ws-standalone-xml/src/main/scala/play/api/libs/ws/XMLBodyWritables.scala @@ -4,7 +4,7 @@ package play.api.libs.ws -import akka.util.ByteString +import org.apache.pekko.util.ByteString import org.w3c.dom.Document /** diff --git a/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyReadables.java b/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyReadables.java index 915bf6e2..1304b908 100644 --- a/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyReadables.java +++ b/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyReadables.java @@ -4,8 +4,8 @@ package play.libs.ws; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -18,7 +18,7 @@ public interface DefaultBodyReadables { /** - * Converts a response body into an akka.util.ByteString: + * Converts a response body into an org.apache.pekko.util.ByteString: * * {{{ * ByteString byteString = response.body(byteString()) diff --git a/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyWritables.java b/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyWritables.java index 8416b493..5dfe53f7 100644 --- a/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyWritables.java +++ b/play-ws-standalone/src/main/java/play/libs/ws/DefaultBodyWritables.java @@ -4,10 +4,10 @@ package play.libs.ws; -import akka.stream.javadsl.FileIO; -import akka.stream.javadsl.Source; -import akka.stream.javadsl.StreamConverters; -import akka.util.ByteString; +import org.apache.pekko.stream.javadsl.FileIO; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.stream.javadsl.StreamConverters; +import org.apache.pekko.util.ByteString; import java.io.File; import java.io.InputStream; diff --git a/play-ws-standalone/src/main/java/play/libs/ws/InMemoryBodyWritable.java b/play-ws-standalone/src/main/java/play/libs/ws/InMemoryBodyWritable.java index 5102adbe..633c610e 100644 --- a/play-ws-standalone/src/main/java/play/libs/ws/InMemoryBodyWritable.java +++ b/play-ws-standalone/src/main/java/play/libs/ws/InMemoryBodyWritable.java @@ -4,7 +4,7 @@ package play.libs.ws; -import akka.util.ByteString; +import org.apache.pekko.util.ByteString; /** * A body writable that takes a ByteString with InMemoryBody. diff --git a/play-ws-standalone/src/main/java/play/libs/ws/SourceBodyWritable.java b/play-ws-standalone/src/main/java/play/libs/ws/SourceBodyWritable.java index 84cb5527..005e704b 100644 --- a/play-ws-standalone/src/main/java/play/libs/ws/SourceBodyWritable.java +++ b/play-ws-standalone/src/main/java/play/libs/ws/SourceBodyWritable.java @@ -4,8 +4,8 @@ package play.libs.ws; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; /** * diff --git a/play-ws-standalone/src/main/java/play/libs/ws/StandaloneWSResponse.java b/play-ws-standalone/src/main/java/play/libs/ws/StandaloneWSResponse.java index 82e5686b..cc156321 100644 --- a/play-ws-standalone/src/main/java/play/libs/ws/StandaloneWSResponse.java +++ b/play-ws-standalone/src/main/java/play/libs/ws/StandaloneWSResponse.java @@ -4,8 +4,8 @@ package play.libs.ws; -import akka.stream.javadsl.Source; -import akka.util.ByteString; +import org.apache.pekko.stream.javadsl.Source; +import org.apache.pekko.util.ByteString; import java.util.Collections; import java.util.List; diff --git a/play-ws-standalone/src/main/scala/play/api/libs/ws/Body.scala b/play-ws-standalone/src/main/scala/play/api/libs/ws/Body.scala index a5069cd3..ad261cef 100644 --- a/play-ws-standalone/src/main/scala/play/api/libs/ws/Body.scala +++ b/play-ws-standalone/src/main/scala/play/api/libs/ws/Body.scala @@ -4,8 +4,8 @@ package play.api.libs.ws -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import scala.annotation.implicitNotFound diff --git a/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyReadables.scala b/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyReadables.scala index c4c0c20c..dec4f1c5 100644 --- a/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyReadables.scala +++ b/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyReadables.scala @@ -6,8 +6,8 @@ package play.api.libs.ws import java.nio.ByteBuffer -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString /** * Defines common BodyReadable for a response backed by `org.asynchttpclient.Response`. @@ -15,10 +15,10 @@ import akka.util.ByteString trait DefaultBodyReadables { /** - * Converts a response body into an `akka.util.ByteString`: + * Converts a response body into an `org.apache.pekko.util.ByteString`: * * {{{ - * import akka.util.ByteString + * import org.apache.pekko.util.ByteString * import play.api.libs.ws.DefaultBodyReadables._ * * def example(response: play.api.libs.ws.StandaloneWSResponse): ByteString = diff --git a/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyWritables.scala b/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyWritables.scala index 27a010d8..ef8bf39c 100644 --- a/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyWritables.scala +++ b/play-ws-standalone/src/main/scala/play/api/libs/ws/DefaultBodyWritables.scala @@ -8,10 +8,10 @@ import java.io.File import java.nio.ByteBuffer import java.util.function.Supplier -import akka.stream.scaladsl.StreamConverters.fromInputStream -import akka.stream.scaladsl.FileIO -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.StreamConverters.fromInputStream +import org.apache.pekko.stream.scaladsl.FileIO +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import scala.jdk.FunctionConverters._ diff --git a/play-ws-standalone/src/main/scala/play/api/libs/ws/StandaloneWSResponse.scala b/play-ws-standalone/src/main/scala/play/api/libs/ws/StandaloneWSResponse.scala index 6be18e22..2ef2b6bd 100644 --- a/play-ws-standalone/src/main/scala/play/api/libs/ws/StandaloneWSResponse.scala +++ b/play-ws-standalone/src/main/scala/play/api/libs/ws/StandaloneWSResponse.scala @@ -4,8 +4,8 @@ package play.api.libs.ws -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString /** * A WS HTTP response. @@ -100,7 +100,7 @@ trait StandaloneWSResponse { * or as binary: * * {{{ - * import akka.util.ByteString + * import org.apache.pekko.util.ByteString * import play.api.libs.ws.StandaloneWSResponse * import play.api.libs.ws.DefaultBodyReadables._ *