From e20e55b14831ac99197f525fb8e6938b98b82e89 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Tue, 5 Oct 2021 09:11:55 +0200 Subject: [PATCH] Fix compilation error on Scala 2.12 (#30741) --- .../actor/testkit/typed/scaladsl/SyncTestingExampleSpec.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/akka-actor-testkit-typed/src/test/scala/docs/akka/actor/testkit/typed/scaladsl/SyncTestingExampleSpec.scala b/akka-actor-testkit-typed/src/test/scala/docs/akka/actor/testkit/typed/scaladsl/SyncTestingExampleSpec.scala index 8cdf188602..74a3815722 100644 --- a/akka-actor-testkit-typed/src/test/scala/docs/akka/actor/testkit/typed/scaladsl/SyncTestingExampleSpec.scala +++ b/akka-actor-testkit-typed/src/test/scala/docs/akka/actor/testkit/typed/scaladsl/SyncTestingExampleSpec.scala @@ -14,7 +14,6 @@ import akka.actor.typed.scaladsl._ import com.typesafe.config.ConfigFactory import org.slf4j.event.Level -import scala.jdk.CollectionConverters.MapHasAsJava //#imports import org.scalatest.matchers.should.Matchers import org.scalatest.wordspec.AnyWordSpec @@ -145,8 +144,7 @@ class SyncTestingExampleSpec extends AnyWordSpec with Matchers { "has access to the provided config" in { val conf = - BehaviorTestKit.ApplicationTestConfig.withFallback( - ConfigFactory.parseMap(Map("test.secret" -> "shhhhh").asJava)) + BehaviorTestKit.ApplicationTestConfig.withFallback(ConfigFactory.parseString("test.secret=shhhhh")) val testKit = BehaviorTestKit(ConfigAware(), "root", conf) val inbox = TestInbox[AnyRef]("Inboxer") testKit.run(ConfigAware.GetCfgString("test.secret", inbox.ref.narrow))