From ca956cc2109647d2e0f0b54a261953d1b419d456 Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Wed, 14 Jul 2021 12:45:06 +0900 Subject: [PATCH] add explicit type annotations for implicit val prepare Scala 3 --- .../src/test/scala/play/AkkaServerProvider.scala | 4 ++-- .../test/scala/play/api/libs/ws/ahc/JsonRequestSpec.scala | 4 ++-- .../test/scala/play/api/libs/ws/ahc/XMLRequestSpec.scala | 4 ++-- .../test/scala/play/api/libs/ws/ahc/AhcWSRequestSpec.scala | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/integration-tests/src/test/scala/play/AkkaServerProvider.scala b/integration-tests/src/test/scala/play/AkkaServerProvider.scala index 1e4b44f4a..4279f3f87 100644 --- a/integration-tests/src/test/scala/play/AkkaServerProvider.scala +++ b/integration-tests/src/test/scala/play/AkkaServerProvider.scala @@ -31,8 +31,8 @@ trait AkkaServerProvider extends BeforeAfterAll { val defaultTimeout: FiniteDuration = 5.seconds // Create Akka system for thread and streaming management - implicit val system = ActorSystem() - implicit val materializer = Materializer.matFromSystem + implicit val system: ActorSystem = ActorSystem() + implicit val materializer: Materializer = Materializer.matFromSystem lazy val futureServer: Future[Http.ServerBinding] = { // Using 0 (zero) means that a random free port will be used. 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 83084acd9..37238cae1 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 @@ -31,8 +31,8 @@ import scala.io.Codec class JsonRequestSpec extends Specification with Mockito with AfterAll with JsonBodyWritables { sequential - implicit val system = ActorSystem() - implicit val materializer = Materializer.matFromSystem + implicit val system: ActorSystem = ActorSystem() + implicit val materializer: Materializer = Materializer.matFromSystem override def afterAll: Unit = { system.terminate() 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 e3f625750..192125748 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 @@ -22,8 +22,8 @@ import scala.xml.Elem class XMLRequestSpec extends Specification with Mockito with AfterAll with MustMatchers { sequential - implicit val system = ActorSystem() - implicit val materializer = Materializer.matFromSystem + implicit val system: ActorSystem = ActorSystem() + implicit val materializer: Materializer = Materializer.matFromSystem override def afterAll: Unit = { system.terminate() 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 019dc4087..bace1efcd 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 @@ -35,9 +35,9 @@ class AhcWSRequestSpec sequential - implicit val system = ActorSystem() - implicit val materializer = Materializer.matFromSystem - val wsClient = StandaloneAhcWSClient() + implicit val system: ActorSystem = ActorSystem() + implicit val materializer: Materializer = Materializer.matFromSystem + val wsClient = StandaloneAhcWSClient() override def afterAll: Unit = { wsClient.close()