You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2025/09/19 17:16:45 UTC
(pekko) 01/01: chore: sort imports
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch sortImports
in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 09e8e1ebedc6a80e015d8b47b65e4d949e149819
Author: He-Pin <he...@gmail.com>
AuthorDate: Sat Sep 20 01:16:27 2025 +0800
chore: sort imports
---
.../actor/testkit/typed/CapturedLogEvent.scala | 7 +++---
.../apache/pekko/actor/testkit/typed/Effect.scala | 2 +-
.../pekko/actor/testkit/typed/LoggingEvent.scala | 6 ++---
.../actor/testkit/typed/TestKitSettings.scala | 6 ++---
.../testkit/typed/internal/ActorSystemStub.scala | 14 +++++++----
.../typed/internal/BehaviorTestKitImpl.scala | 5 ++--
.../typed/internal/EffectfulActorContext.scala | 10 ++++----
.../actor/testkit/typed/internal/LogbackUtil.scala | 7 +++---
.../typed/internal/LoggingTestKitImpl.scala | 4 ++--
.../typed/internal/StubbedActorContext.scala | 16 +++++++------
.../testkit/typed/internal/TestAppender.scala | 6 +++--
.../testkit/typed/internal/TestProbeImpl.scala | 4 ++--
.../actor/testkit/typed/javadsl/ActorTestKit.scala | 5 ++--
.../testkit/typed/javadsl/BehaviorTestKit.scala | 9 ++++----
.../actor/testkit/typed/javadsl/Effects.scala | 3 ++-
.../typed/javadsl/JUnit5TestKitBuilder.scala | 3 ++-
.../actor/testkit/typed/javadsl/LogCapturing.scala | 3 ++-
.../typed/javadsl/LogCapturingExtension.scala | 11 +++++----
.../testkit/typed/javadsl/LoggingTestKit.scala | 4 ++--
.../actor/testkit/typed/javadsl/ManualTime.scala | 6 ++---
.../actor/testkit/typed/javadsl/TestInbox.scala | 2 +-
.../typed/javadsl/TestKitJUnit5Extension.scala | 3 ++-
.../typed/javadsl/TestKitJunitResource.scala | 5 ++--
.../actor/testkit/typed/javadsl/TestProbe.scala | 2 +-
.../testkit/typed/scaladsl/ActorTestKit.scala | 9 ++++----
.../testkit/typed/scaladsl/ActorTestKitBase.scala | 6 ++---
.../testkit/typed/scaladsl/BehaviorTestKit.scala | 14 ++++++-----
.../testkit/typed/scaladsl/LogCapturing.scala | 5 ++--
.../testkit/typed/scaladsl/LoggingTestKit.scala | 4 ++--
.../actor/testkit/typed/scaladsl/ManualTime.scala | 4 ++--
.../typed/scaladsl/ScalaTestWithActorTestKit.scala | 11 +++++----
.../testkit/typed/scaladsl/ActorTestKitSpec.scala | 11 +++++----
.../typed/scaladsl/BehaviorTestKitSpec.scala | 14 ++++++-----
.../typed/scaladsl/JUnit5TestKitBuilderSpec.scala | 6 +++--
.../typed/scaladsl/LoggingEventFilterSpec.scala | 5 ++--
.../testkit/typed/scaladsl/TestAppenderSpec.scala | 5 ++--
.../testkit/typed/scaladsl/TestProbeSpec.scala | 5 ++--
.../org/apache/pekko/util/TypedMultiMapSpec.scala | 1 +
.../dispatch/ForkJoinPoolVirtualThreadSpec.scala | 4 ++--
.../dispatch/ThreadPoolVirtualThreadSpec.scala | 3 ++-
.../dispatch/VirtualThreadPoolDispatcherSpec.scala | 4 ++--
.../org/apache/pekko/PekkoExceptionSpec.scala | 4 ++--
.../actor/ActorConfigurationVerificationSpec.scala | 4 ++--
.../apache/pekko/actor/ActorCreationPerfSpec.scala | 6 +++--
.../apache/pekko/actor/ActorLifeCycleSpec.scala | 4 ++--
.../org/apache/pekko/actor/ActorMailboxSpec.scala | 6 ++---
.../pekko/actor/ActorSystemDispatcherSpec.scala | 4 ++--
.../org/apache/pekko/actor/ActorSystemSpec.scala | 5 ++--
.../pekko/actor/ActorWithBoundedStashSpec.scala | 7 +++---
.../apache/pekko/actor/ActorWithStashSpec.scala | 6 ++---
.../pekko/actor/CoordinatedShutdownSpec.scala | 20 ++++++++--------
.../pekko/actor/DeadLetterSupressionSpec.scala | 2 +-
.../pekko/actor/DeadLetterSuspensionSpec.scala | 2 +-
.../org/apache/pekko/actor/DeathWatchSpec.scala | 3 +--
.../org/apache/pekko/actor/DeployerSpec.scala | 6 ++---
.../org/apache/pekko/actor/ExtensionSpec.scala | 9 ++++----
.../org/apache/pekko/actor/FSMActorSpec.scala | 4 ++--
.../org/apache/pekko/actor/FunctionRefSpec.scala | 2 +-
.../pekko/actor/LocalActorRefProviderSpec.scala | 3 +--
.../apache/pekko/actor/ProviderSelectionSpec.scala | 4 ++--
.../apache/pekko/actor/RestartStrategySpec.scala | 5 ++--
.../org/apache/pekko/actor/SchedulerSpec.scala | 8 ++++---
.../pekko/actor/SupervisorHierarchySpec.scala | 5 ++--
.../apache/pekko/actor/SupervisorMiscSpec.scala | 5 ++--
.../org/apache/pekko/actor/SupervisorSpec.scala | 9 ++++----
.../org/apache/pekko/actor/Ticket669Spec.scala | 6 ++---
.../pekko/actor/dispatch/ActorModelSpec.scala | 9 ++++----
.../pekko/actor/dispatch/DispatcherActorSpec.scala | 2 +-
.../pekko/actor/dispatch/DispatchersSpec.scala | 6 ++---
.../pekko/actor/dispatch/PinnedActorSpec.scala | 4 ++--
.../pekko/actor/setup/ActorSystemSetupSpec.scala | 6 ++---
.../scala/org/apache/pekko/config/ConfigSpec.scala | 7 +++---
.../pekko/dispatch/DispatcherShutdownSpec.scala | 6 ++---
.../dispatch/ForkJoinPoolStarvationSpec.scala | 4 ++--
.../apache/pekko/dispatch/MailboxConfigSpec.scala | 7 +++---
.../pekko/dispatch/PriorityDispatcherSpec.scala | 4 ++--
.../dispatch/SameThreadExecutionContextSpec.scala | 4 ++--
.../dispatch/StablePriorityDispatcherSpec.scala | 4 ++--
.../org/apache/pekko/event/EventBusSpec.scala | 7 +++---
.../org/apache/pekko/event/EventStreamSpec.scala | 4 ++--
.../scala/org/apache/pekko/event/LoggerSpec.scala | 9 ++++----
.../apache/pekko/event/LoggingReceiveSpec.scala | 11 +++++----
.../org/apache/pekko/io/SimpleDnsCacheSpec.scala | 6 ++---
.../org/apache/pekko/io/TcpConnectionSpec.scala | 6 +++--
.../org/apache/pekko/io/TcpIntegrationSpec.scala | 4 ++--
.../pekko/io/TcpIntegrationSpecSupport.scala | 2 +-
.../pekko/io/UdpConnectedIntegrationSpec.scala | 2 +-
.../org/apache/pekko/io/UdpIntegrationSpec.scala | 1 +
.../io/dns/AsyncDnsResolverIntegrationSpec.scala | 10 ++++----
.../org/apache/pekko/io/dns/DnsSettingsSpec.scala | 4 ++--
.../apache/pekko/io/dns/DockerBindDnsService.scala | 8 ++++---
.../io/dns/internal/AsyncDnsResolverSpec.scala | 3 ++-
.../pekko/io/dns/internal/DnsClientSpec.scala | 2 ++
.../apache/pekko/io/dns/internal/MessageSpec.scala | 6 ++---
.../scala/org/apache/pekko/pattern/AskSpec.scala | 2 +-
.../pattern/BackoffOnRestartSupervisorSpec.scala | 3 +--
.../pekko/pattern/BackoffSupervisorSpec.scala | 6 ++---
.../apache/pekko/pattern/CircuitBreakerSpec.scala | 1 +
.../pekko/pattern/CircuitBreakerStressSpec.scala | 2 +-
.../org/apache/pekko/pattern/PatternSpec.scala | 1 +
.../scala/org/apache/pekko/pattern/RetrySpec.scala | 4 ++--
.../org/apache/pekko/pattern/StatusReplySpec.scala | 4 ++--
.../org/apache/pekko/routing/BalancingSpec.scala | 6 ++---
.../pekko/routing/ConfiguredLocalRoutingSpec.scala | 6 ++---
.../org/apache/pekko/routing/ResizerSpec.scala | 4 ++--
.../org/apache/pekko/routing/RoutingSpec.scala | 4 ++--
.../pekko/serialization/AsyncSerializeSpec.scala | 5 +++-
.../PrimitivesSerializationSpec.scala | 4 ++--
.../serialization/SerializationSetupSpec.scala | 4 ++--
.../apache/pekko/serialization/SerializeSpec.scala | 3 ++-
.../testkit/CallingThreadDispatcherModelSpec.scala | 4 ++--
.../pekko/util/BoundedBlockingQueueSpec.scala | 11 +++++----
.../org/apache/pekko/util/ByteIteratorSpec.scala | 4 ++--
.../org/apache/pekko/util/ByteStringSpec.scala | 5 ++--
.../org/apache/pekko/util/FrequencyListSpec.scala | 4 ++--
.../apache/pekko/util/FrequencySketchSpec.scala | 4 ++--
.../scala/org/apache/pekko/util/IndexSpec.scala | 6 ++---
.../org/apache/pekko/util/MessageBufferSpec.scala | 4 ++--
.../org/apache/pekko/util/RecencyListSpec.scala | 4 ++--
.../pekko/util/SegmentedRecencyListSpec.scala | 4 ++--
.../pekko/actor/typed/ActorContextSpec.scala | 4 ++--
.../pekko/actor/typed/ActorRefIgnoreSpec.scala | 6 ++---
.../pekko/actor/typed/ActorRefResolverSpec.scala | 8 +++----
.../apache/pekko/actor/typed/ActorSystemSpec.scala | 5 ++--
.../org/apache/pekko/actor/typed/AskSpec.scala | 5 ++--
.../apache/pekko/actor/typed/BehaviorSpec.scala | 8 ++++---
.../apache/pekko/actor/typed/DeferredSpec.scala | 6 ++---
.../apache/pekko/actor/typed/ExtensionsSpec.scala | 7 +++---
.../apache/pekko/actor/typed/InterceptSpec.scala | 4 ++--
.../LocalActorRefProviderLogMessagesSpec.scala | 1 +
.../apache/pekko/actor/typed/LogMessagesSpec.scala | 7 +++---
.../pekko/actor/typed/MailboxSelectorSpec.scala | 4 ++--
.../org/apache/pekko/actor/typed/MonitorSpec.scala | 4 ++--
.../org/apache/pekko/actor/typed/OrElseSpec.scala | 6 ++---
.../org/apache/pekko/actor/typed/PropsSpec.scala | 4 ++--
.../pekko/actor/typed/SpawnProtocolSpec.scala | 6 ++---
.../apache/pekko/actor/typed/SupervisionSpec.scala | 16 +++++++------
.../apache/pekko/actor/typed/TerminatedSpec.scala | 6 ++---
.../org/apache/pekko/actor/typed/TimerSpec.scala | 4 ++--
.../pekko/actor/typed/TransformMessagesSpec.scala | 4 ++--
.../org/apache/pekko/actor/typed/WatchSpec.scala | 4 ++--
.../coexistence/ClassicSupervisingTypedSpec.scala | 9 ++++----
.../coexistence/TypedSupervisingClassicSpec.scala | 4 ++--
.../typed/delivery/ConsumerControllerSpec.scala | 6 +++--
.../delivery/DurableProducerControllerSpec.scala | 7 +++---
.../typed/delivery/DurableProducerQueueSpec.scala | 8 +++----
.../typed/delivery/DurableWorkPullingSpec.scala | 3 ++-
.../typed/delivery/ProducerControllerSpec.scala | 7 +++---
.../delivery/ReliableDeliveryRandomSpec.scala | 9 ++++----
.../typed/delivery/ReliableDeliverySpec.scala | 9 ++++----
.../pekko/actor/typed/delivery/TestConsumer.scala | 10 ++++----
.../actor/typed/delivery/TestProducerWithAsk.scala | 2 +-
.../actor/typed/delivery/WorkPullingSpec.scala | 4 ++--
.../typed/eventstream/EventStreamDocSpec.scala | 1 +
.../actor/typed/eventstream/EventStreamSpec.scala | 4 ++--
.../typed/internal/ActorRefSerializationSpec.scala | 7 +++---
.../actor/typed/internal/ActorSystemSpec.scala | 18 +++++++--------
.../typed/internal/adpater/PropsAdapterSpec.scala | 6 ++---
.../receptionist/LocalReceptionistSpec.scala | 6 ++---
.../receptionist/ServiceKeySerializationSpec.scala | 4 ++--
.../typed/internal/routing/PoolRouterSpec.scala | 4 ++--
.../typed/internal/routing/RoutingLogicSpec.scala | 6 ++---
.../typed/javadsl/AdaptationFailureSpec.scala | 4 ++--
.../pekko/actor/typed/pubsub/LocalPubSubSpec.scala | 4 ++--
.../actor/typed/scaladsl/ActorContextAskSpec.scala | 10 ++++----
.../typed/scaladsl/ActorContextDelegateSpec.scala | 1 +
.../scaladsl/ActorContextPipeToSelfSpec.scala | 7 +++---
.../actor/typed/scaladsl/ActorLoggingSpec.scala | 14 ++++++-----
.../actor/typed/scaladsl/ActorThreadSpec.scala | 1 +
.../typed/scaladsl/AdaptationFailureSpec.scala | 4 ++--
.../typed/scaladsl/DispatcherSelectorSpec.scala | 11 +++++----
.../actor/typed/scaladsl/GracefulStopSpec.scala | 4 ++--
.../pekko/actor/typed/scaladsl/LoggerOpsSpec.scala | 7 +++---
.../actor/typed/scaladsl/MailboxSelectorSpec.scala | 9 ++++----
.../actor/typed/scaladsl/MessageAdapterSpec.scala | 10 ++++----
.../pekko/actor/typed/scaladsl/OnSignalSpec.scala | 4 ++--
.../actor/typed/scaladsl/ReceivePartialSpec.scala | 4 ++--
.../pekko/actor/typed/scaladsl/RoutersSpec.scala | 6 +++--
.../actor/typed/scaladsl/StashBufferSpec.scala | 6 ++---
.../pekko/actor/typed/scaladsl/StashSpec.scala | 4 ++--
.../pekko/actor/typed/scaladsl/StopSpec.scala | 4 ++--
.../actor/typed/scaladsl/adapter/AdapterSpec.scala | 8 +++----
.../scaladsl/adapter/GuardianStartupSpec.scala | 8 +++----
.../org/apache/pekko/actor/typed/ActorSystem.scala | 6 +++--
.../org/apache/pekko/actor/typed/LogOptions.scala | 4 ++--
.../scala/org/apache/pekko/actor/typed/Props.scala | 2 +-
.../pekko/actor/typed/SupervisorStrategy.scala | 6 ++---
.../actor/typed/delivery/ConsumerController.scala | 6 ++---
.../actor/typed/delivery/ProducerController.scala | 10 ++++----
.../delivery/WorkPullingProducerController.scala | 8 +++----
.../actor/typed/eventstream/EventStream.scala | 1 +
.../actor/typed/internal/ActorContextImpl.scala | 16 +++++++------
.../pekko/actor/typed/internal/ActorMdc.scala | 4 ++--
.../pekko/actor/typed/internal/BehaviorImpl.scala | 6 ++---
.../actor/typed/internal/ExtensionsImpl.scala | 2 +-
.../actor/typed/internal/InterceptorImpl.scala | 6 ++---
.../actor/typed/internal/StashBufferImpl.scala | 7 +++---
.../pekko/actor/typed/internal/Supervision.scala | 5 ++--
.../actor/typed/internal/TimerSchedulerImpl.scala | 7 +++---
.../internal/WithMdcBehaviorInterceptor.scala | 4 ++--
.../internal/adapter/ActorSystemAdapter.scala | 6 ++---
.../receptionist/ReceptionistMessages.scala | 3 ++-
.../typed/internal/routing/PoolRouterImpl.scala | 6 ++---
.../pekko/actor/typed/javadsl/ActorContext.scala | 4 +++-
.../pekko/actor/typed/javadsl/AskPattern.scala | 5 ++--
.../pekko/actor/typed/javadsl/Behaviors.scala | 2 +-
.../pekko/actor/typed/javadsl/ReceiveBuilder.scala | 4 ++--
.../apache/pekko/actor/typed/javadsl/Routers.scala | 4 ++--
.../pekko/actor/typed/javadsl/StashBuffer.scala | 4 ++--
.../actor/typed/receptionist/Receptionist.scala | 2 +-
.../pekko/actor/typed/scaladsl/ActorContext.scala | 4 +++-
.../pekko/actor/typed/scaladsl/AskPattern.scala | 3 ++-
.../pekko/actor/typed/scaladsl/Behaviors.scala | 1 +
.../actor/typed/scaladsl/TimerScheduler.scala | 4 ++--
.../org/apache/pekko/util/ByteIterator.scala | 5 ++--
.../org/apache/pekko/util/ByteString.scala | 1 +
.../scala/org/apache/pekko/actor/AbstractFSM.scala | 2 +-
.../org/apache/pekko/actor/AbstractProps.scala | 2 +-
.../scala/org/apache/pekko/actor/ActorPath.scala | 5 ++--
.../org/apache/pekko/actor/ActorSelection.scala | 7 +++---
.../scala/org/apache/pekko/actor/ActorSystem.scala | 10 ++++----
.../scala/org/apache/pekko/actor/Address.scala | 2 +-
.../apache/pekko/actor/CoordinatedShutdown.scala | 10 ++++----
.../scala/org/apache/pekko/actor/Deployer.scala | 6 ++---
.../org/apache/pekko/actor/FaultHandling.scala | 17 +++++++-------
.../apache/pekko/actor/IndirectActorProducer.scala | 3 +--
.../pekko/actor/LightArrayRevolverScheduler.scala | 3 ++-
.../apache/pekko/actor/RepointableActorRef.scala | 3 +--
.../main/scala/org/apache/pekko/actor/Timers.scala | 2 +-
.../org/apache/pekko/actor/dungeon/Children.scala | 3 ++-
.../org/apache/pekko/actor/dungeon/Dispatch.scala | 3 +--
.../pekko/actor/setup/ActorSystemSetup.scala | 2 +-
.../apache/pekko/dispatch/BatchingExecutor.scala | 7 +++---
.../apache/pekko/dispatch/CompletionStages.scala | 7 +++---
.../org/apache/pekko/dispatch/Dispatcher.scala | 3 +--
.../org/apache/pekko/dispatch/Dispatchers.scala | 4 +++-
.../dispatch/ForkJoinExecutorConfigurator.scala | 5 ++--
.../scala/org/apache/pekko/dispatch/Mailbox.scala | 5 +++-
.../org/apache/pekko/dispatch/Mailboxes.scala | 4 ++--
.../apache/pekko/dispatch/ThreadPoolBuilder.scala | 9 ++++----
.../pekko/dispatch/VirtualThreadSupport.scala | 9 ++++----
.../dispatch/VirtualizedExecutorService.scala | 4 ++--
.../pekko/dispatch/affinity/AffinityPool.scala | 7 +++---
.../org/apache/pekko/event/LoggerMailbox.scala | 4 ++--
.../scala/org/apache/pekko/event/Logging.scala | 10 ++++----
actor/src/main/scala/org/apache/pekko/io/Dns.scala | 3 ++-
.../apache/pekko/io/InetAddressDnsResolver.scala | 4 ++--
.../org/apache/pekko/io/SelectionHandler.scala | 4 ++--
.../org/apache/pekko/io/SimpleDnsManager.scala | 2 ++
actor/src/main/scala/org/apache/pekko/io/Tcp.scala | 10 ++++----
.../scala/org/apache/pekko/io/TcpConnection.scala | 3 +--
.../apache/pekko/io/TcpIncomingConnection.scala | 3 +--
actor/src/main/scala/org/apache/pekko/io/Udp.scala | 10 ++++----
.../scala/org/apache/pekko/io/UdpConnected.scala | 3 +--
.../main/scala/org/apache/pekko/io/UdpSender.scala | 2 +-
.../org/apache/pekko/io/dns/CachePolicy.scala | 2 +-
.../org/apache/pekko/io/dns/DnsProtocol.scala | 2 +-
.../org/apache/pekko/io/dns/DnsSettings.scala | 8 +++----
.../org/apache/pekko/io/dns/IdGenerator.scala | 4 ++--
.../pekko/io/dns/internal/AsyncDnsManager.scala | 4 ++--
.../pekko/io/dns/internal/AsyncDnsResolver.scala | 4 ++--
.../apache/pekko/io/dns/internal/DnsClient.scala | 4 +++-
.../apache/pekko/io/dns/internal/DnsMessage.scala | 3 +--
.../pekko/io/dns/internal/ResolvConfParser.scala | 3 +--
.../pekko/io/dns/internal/TcpDnsClient.scala | 1 +
.../org/apache/pekko/japi/function/Function.scala | 4 ++--
.../org/apache/pekko/pattern/AskSupport.scala | 2 +-
.../org/apache/pekko/pattern/BackoffOptions.scala | 6 ++---
.../org/apache/pekko/pattern/CircuitBreaker.scala | 10 ++++----
.../pekko/pattern/CircuitBreakersRegistry.scala | 4 +++-
.../apache/pekko/pattern/GracefulStopSupport.scala | 2 +-
.../scala/org/apache/pekko/pattern/Patterns.scala | 7 +++---
.../org/apache/pekko/pattern/RetrySupport.scala | 4 ++--
.../org/apache/pekko/pattern/StatusReply.scala | 3 ++-
.../pattern/internal/CircuitBreakerTelemetry.scala | 3 ++-
.../scala/org/apache/pekko/routing/Balancing.scala | 8 +++----
.../scala/org/apache/pekko/routing/Broadcast.scala | 6 ++---
.../apache/pekko/routing/ConsistentHashing.scala | 4 ++--
.../routing/OptimalSizeExploringResizer.scala | 5 ++--
.../scala/org/apache/pekko/routing/Random.scala | 6 ++---
.../scala/org/apache/pekko/routing/Resizer.scala | 4 ++--
.../org/apache/pekko/routing/RoundRobin.scala | 6 ++---
.../org/apache/pekko/routing/RouterConfig.scala | 3 +--
.../routing/ScatterGatherFirstCompleted.scala | 8 +++----
.../org/apache/pekko/routing/SmallestMailbox.scala | 6 ++---
.../org/apache/pekko/routing/TailChopping.scala | 6 ++---
.../apache/pekko/serialization/Serialization.scala | 4 ++--
.../pekko/serialization/SerializationSetup.scala | 2 +-
.../scala/org/apache/pekko/util/ConstantFun.scala | 4 ++--
.../org/apache/pekko/util/DoubleLinkedList.scala | 4 ++--
.../org/apache/pekko/util/FrequencyList.scala | 4 ++--
.../org/apache/pekko/util/FrequencySketch.scala | 4 ++--
.../org/apache/pekko/util/FunctionConverters.scala | 4 ++--
.../main/scala/org/apache/pekko/util/Helpers.scala | 2 ++
.../main/scala/org/apache/pekko/util/Index.scala | 1 -
.../scala/org/apache/pekko/util/ManifestInfo.scala | 3 +--
.../scala/org/apache/pekko/util/RecencyList.scala | 4 ++--
.../apache/pekko/util/SegmentedRecencyList.scala | 4 ++--
.../org/apache/pekko/actor/ActorBenchmark.scala | 3 ++-
.../actor/AffinityPoolComparativeBenchmark.scala | 3 ++-
.../actor/AffinityPoolIdleCPULevelBenchmark.scala | 3 ++-
.../AffinityPoolRequestResponseBenchmark.scala | 3 ++-
.../pekko/actor/ForkJoinActorBenchmark.scala | 3 ++-
.../org/apache/pekko/actor/JCToolsMailbox.scala | 3 ++-
.../apache/pekko/actor/ManyToOneArrayMailbox.scala | 3 ++-
.../pekko/actor/StashCreationBenchmark.scala | 3 ++-
.../org/apache/pekko/actor/TellOnlyBenchmark.scala | 3 ++-
.../pekko/actor/typed/TypedActorBenchmark.scala | 3 ++-
.../actor/typed/TypedForkJoinActorBenchmark.scala | 3 ++-
.../typed/delivery/ReliableDeliveryBenchmark.scala | 3 ++-
.../ddata/ORSetSerializationBenchmark.scala | 3 ++-
.../pekko/dispatch/CachingConfigBenchmark.scala | 3 ++-
.../apache/pekko/dispatch/NodeQueueBenchmark.scala | 3 ++-
.../apache/pekko/io/dns/IdGeneratorBanchmark.scala | 6 ++---
.../persistence/LevelDbBatchingBenchmark.scala | 6 +++--
.../pekko/remote/artery/CodecBenchmark.scala | 5 ++--
.../pekko/remote/artery/SendQueueBenchmark.scala | 3 ++-
.../SerializationFormatCacheBenchmark.scala | 23 +++++++++---------
.../jackson/JacksonSerializationBench.scala | 5 ++--
.../org/apache/pekko/stream/AskBenchmark.scala | 3 ++-
.../org/apache/pekko/stream/CollectBenchmark.scala | 17 ++++++++------
.../pekko/stream/FlatMapConcatBenchmark.scala | 3 ++-
.../org/apache/pekko/stream/FlowMapBenchmark.scala | 3 ++-
.../org/apache/pekko/stream/FramingBenchmark.scala | 5 ++--
.../apache/pekko/stream/FusedGraphsBenchmark.scala | 3 ++-
.../apache/pekko/stream/InterpreterBenchmark.scala | 2 +-
.../pekko/stream/LazyFutureSourceBenchmark.scala | 3 ++-
.../apache/pekko/stream/MapAsyncBenchmark.scala | 3 ++-
.../pekko/stream/PartitionHubBenchmark.scala | 3 ++-
.../apache/pekko/stream/SourceRefBenchmark.scala | 3 ++-
.../pekko/stream/ZipWithIndexBenchmark.scala | 4 ++--
.../apache/pekko/util/ArrayCopyOf_Benchmark.scala | 4 ++--
.../pekko/util/FastFrequencySketchBenchmark.scala | 4 ++--
.../pekko/util/FrequencySketchBenchmark.scala | 4 ++--
.../cluster/metrics/ClusterMetricsCollector.scala | 3 +--
.../cluster/metrics/ClusterMetricsExtension.scala | 4 ++--
.../cluster/metrics/ClusterMetricsRouting.scala | 6 ++---
.../cluster/metrics/ClusterMetricsSettings.scala | 4 ++--
.../cluster/metrics/ClusterMetricsStrategy.scala | 4 ++--
.../org/apache/pekko/cluster/metrics/Metric.scala | 3 +--
.../metrics/protobuf/MessageSerializer.scala | 4 +++-
.../metrics/ClusterMetricsExtensionSpec.scala | 4 ++--
.../metrics/ClusterMetricsRoutingSpec.scala | 8 +++----
.../metrics/ClusterMetricsRoutingSpec.scala | 6 ++---
.../metrics/ClusterMetricsSettingsSpec.scala | 4 ++--
.../apache/pekko/cluster/metrics/EWMASpec.scala | 3 +--
.../apache/pekko/cluster/metrics/MetricSpec.scala | 10 ++++----
.../cluster/metrics/MetricsCollectorSpec.scala | 3 +--
.../apache/pekko/cluster/metrics/TestUtil.scala | 3 ++-
.../cluster/metrics/WeightedRouteesSpec.scala | 4 ++--
.../metrics/protobuf/NumberInputStreamSpec.scala | 1 +
.../sharding/typed/ClusterShardingQuery.scala | 2 +-
.../sharding/typed/ClusterShardingSettings.scala | 6 ++---
.../sharding/typed/ReplicatedEntityProvider.scala | 14 +++++------
.../typed/ReplicatedShardingExtension.scala | 3 ++-
.../typed/ShardedDaemonProcessSettings.scala | 6 ++---
.../delivery/ShardingConsumerController.scala | 4 ++--
.../delivery/ShardingProducerController.scala | 8 +++----
.../typed/internal/ClusterShardingImpl.scala | 4 ++--
.../JoinConfigCompatCheckerClusterSharding.scala | 4 ++--
.../internal/ReplicatedShardingExtensionImpl.scala | 18 ++++++++-------
.../typed/internal/ShardedDaemonProcessImpl.scala | 5 ++--
.../typed/internal/ShardingSerializer.scala | 4 ++--
.../typed/internal/testkit/TestEntityRefImpl.scala | 5 ++--
.../sharding/typed/javadsl/ClusterSharding.scala | 3 ++-
.../typed/javadsl/ShardedDaemonProcess.scala | 2 +-
.../sharding/typed/scaladsl/ClusterSharding.scala | 1 +
.../ClusterShardingRememberEntitiesPerfSpec.scala | 8 ++++---
.../ClusterShardingPreparingForShutdownSpec.scala | 5 ++--
.../sharding/typed/ClusterShardingStatsSpec.scala | 7 +++---
.../typed/MultiDcClusterShardingSpec.scala | 7 ++++--
.../sharding/typed/ReplicatedShardingSpec.scala | 8 ++++---
.../sharding/typed/ShardedDaemonProcessSpec.scala | 7 +++---
.../typed/delivery/DeliveryThroughputSpec.scala | 4 ++--
...oinConfigCompatCheckerClusterShardingSpec.scala | 9 ++++----
.../ReplicatedShardingDirectReplicationSpec.scala | 5 ++--
.../sharding/typed/ReplicatedShardingSpec.scala | 17 ++++++++------
.../sharding/typed/ShardingSerializerSpec.scala | 7 +++---
.../typed/delivery/DurableShardingSpec.scala | 8 ++++---
.../delivery/ReliableDeliveryShardingSpec.scala | 7 +++---
.../sharding/typed/internal/Murmur2Spec.scala | 4 ++--
.../scaladsl/ClusterShardingPersistenceSpec.scala | 7 +++---
.../typed/scaladsl/ClusterShardingSpec.scala | 7 +++---
.../typed/scaladsl/ClusterShardingStateSpec.scala | 4 ++--
.../typed/scaladsl/ClusterShardingStatsSpec.scala | 4 ++--
.../typed/scaladsl/ShardedDaemonProcessSpec.scala | 7 +++---
.../typed/testkit/scaladsl/TestEntityRefSpec.scala | 4 ++--
.../pekko/cluster/sharding/ClusterSharding.scala | 2 +-
.../sharding/ClusterShardingHealthCheck.scala | 15 ++++++------
.../cluster/sharding/ClusterShardingSettings.scala | 9 ++++----
.../sharding/JoinConfigCompatCheckSharding.scala | 4 ++--
.../RemoveInternalClusterShardingData.scala | 4 ++--
.../org/apache/pekko/cluster/sharding/Shard.scala | 9 ++++----
.../pekko/cluster/sharding/ShardCoordinator.scala | 13 ++++++-----
.../pekko/cluster/sharding/ShardRegion.scala | 4 +++-
.../external/ExternalShardAllocationStrategy.scala | 2 +-
.../cluster/sharding/external/ShardLocations.scala | 3 ++-
.../ExternalShardAllocationClientImpl.scala | 6 ++---
.../AbstractLeastShardAllocationStrategy.scala | 8 +++----
.../internal/DDataRememberEntitiesShardStore.scala | 4 ++--
.../internal/EntityPassivationStrategy.scala | 8 +++----
...ntSourcedRememberEntitiesCoordinatorStore.scala | 8 +++----
.../internal/LeastShardAllocationStrategy.scala | 1 +
.../sharding/internal/RememberEntityStarter.scala | 6 ++---
.../cluster/sharding/internal/jfr/Events.scala | 3 ++-
.../ClusterShardingMessageSerializer.scala | 8 +++----
.../pekko/cluster/sbr/GremlinController.scala | 3 +--
.../RandomizedBrainResolverIntegrationSpec.scala | 9 ++++----
.../sbr/SplitBrainResolverIntegrationSpec.scala | 11 +++++----
.../ClusterShardCoordinatorDowning2Spec.scala | 3 +--
.../ClusterShardCoordinatorDowningSpec.scala | 3 +--
.../sharding/ClusterShardingGetStateSpec.scala | 4 ++--
.../sharding/ClusterShardingGetStatsSpec.scala | 1 +
...ClusterShardingGracefulShutdownOldestSpec.scala | 4 ++--
.../ClusterShardingGracefulShutdownSpec.scala | 7 +++---
.../sharding/ClusterShardingQueriesSpec.scala | 6 +++--
...rShardingRememberEntitiesNewExtractorSpec.scala | 4 ++--
.../ClusterShardingRememberEntitiesSpec.scala | 6 ++---
.../ClusterShardingRolePartitioningSpec.scala | 4 ++--
.../cluster/sharding/ClusterShardingSpec.scala | 7 +++---
.../sharding/ExternalShardAllocationSpec.scala | 6 ++---
.../sharding/MultiDcClusterShardingSpec.scala | 4 ++--
.../sharding/MultiNodeClusterShardingConfig.scala | 4 ++--
.../sharding/MultiNodeClusterShardingSpec.scala | 6 +++--
.../RollingUpdateShardAllocationSpec.scala | 6 +++--
.../sharding/ClusterShardingHealthCheckSpec.scala | 6 +++--
.../sharding/ClusterShardingInternalsSpec.scala | 2 +-
.../sharding/ClusterShardingLeaseSpec.scala | 6 +++--
.../sharding/ClusterShardingSettingsSpec.scala | 6 +++--
.../sharding/ConcurrentStartupShardingSpec.scala | 3 ++-
...eprecatedLeastShardAllocationStrategySpec.scala | 4 ++--
.../pekko/cluster/sharding/EntitiesSpec.scala | 1 +
.../cluster/sharding/EntityTerminationSpec.scala | 7 +++---
.../JoinConfigCompatCheckShardingSpec.scala | 6 ++---
...eastShardAllocationStrategyRandomizedSpec.scala | 4 ++--
.../LeastShardAllocationStrategySpec.scala | 4 ++--
.../sharding/PersistentShardingMigrationSpec.scala | 9 ++++----
.../RememberEntitiesAndStartEntitySpec.scala | 9 ++++----
.../RememberEntitiesBatchedUpdatesSpec.scala | 4 +++-
.../sharding/RememberEntitiesFailureSpec.scala | 14 ++++++-----
...ememberEntitiesShardIdExtractorChangeSpec.scala | 9 ++++----
.../RemoveInternalClusterShardingDataSpec.scala | 2 +-
.../pekko/cluster/sharding/ShardRegionSpec.scala | 8 ++++---
.../cluster/sharding/ShardWithLeaseSpec.scala | 12 +++++-----
.../pekko/cluster/sharding/StartEntitySpec.scala | 6 +++--
.../pekko/cluster/sharding/SupervisionSpec.scala | 6 +++--
.../internal/RememberEntitiesShardStoreSpec.scala | 6 +++--
.../internal/RememberEntitiesStarterSpec.scala | 5 ++--
.../sharding/passivation/CompositeSpec.scala | 5 ++--
.../passivation/EntityPassivationSpec.scala | 10 ++++----
.../HillClimbingAdmissionOptimizerSpec.scala | 1 +
.../cluster/sharding/passivation/IdleSpec.scala | 4 ++--
.../passivation/LeastFrequentlyUsedSpec.scala | 5 ++--
.../passivation/LeastRecentlyUsedSpec.scala | 5 ++--
.../passivation/MostRecentlyUsedSpec.scala | 5 ++--
.../passivation/simulator/AccessPattern.scala | 4 ++--
.../sharding/passivation/simulator/Simulator.scala | 15 ++++++------
.../passivation/simulator/SimulatorSettings.scala | 10 ++++----
.../passivation/simulator/SimulatorStats.scala | 4 ++--
.../ClusterShardingMessageSerializerSpec.scala | 1 +
.../pekko/cluster/client/ClusterClient.scala | 6 ++---
.../protobuf/ClusterClientMessageSerializer.scala | 2 +-
.../cluster/pubsub/DistributedPubSubMediator.scala | 4 ++--
.../DistributedPubSubMessageSerializer.scala | 4 +++-
.../singleton/ClusterSingletonManager.scala | 8 ++++---
.../cluster/singleton/ClusterSingletonProxy.scala | 4 ++--
.../cluster/client/ClusterClientHandoverSpec.scala | 6 ++---
.../pekko/cluster/client/ClusterClientSpec.scala | 4 ++--
.../cluster/client/ClusterClientStopSpec.scala | 6 ++---
.../pubsub/DistributedPubSubMediatorSpec.scala | 4 ++--
.../pubsub/DistributedPubSubRestartSpec.scala | 4 ++--
.../ClusterSingletonManagerChaosSpec.scala | 4 ++--
.../ClusterSingletonManagerDownedSpec.scala | 4 ++--
.../ClusterSingletonManagerLeaseSpec.scala | 4 ++--
.../ClusterSingletonManagerLeave2Spec.scala | 4 ++--
.../ClusterSingletonManagerLeaveSpec.scala | 4 ++--
...rSingletonManagerPreparingForShutdownSpec.scala | 5 ++--
.../singleton/ClusterSingletonManagerSpec.scala | 4 ++--
.../ClusterSingletonManagerStartupSpec.scala | 4 ++--
.../singleton/MultiDcSingletonManagerSpec.scala | 4 ++--
.../DistributedPubSubMediatorRouterSpec.scala | 7 +++---
.../singleton/ClusterSingletonLeaseSpec.scala | 4 ++--
.../ClusterSingletonLeavingSpeedSpec.scala | 4 ++--
.../singleton/ClusterSingletonProxySpec.scala | 11 +++++----
.../singleton/ClusterSingletonRestart2Spec.scala | 4 ++--
.../singleton/ClusterSingletonRestartSpec.scala | 4 ++--
.../ddata/typed/internal/ReplicatorBehavior.scala | 2 +-
.../ddata/typed/javadsl/DistributedData.scala | 3 ++-
.../cluster/ddata/typed/javadsl/Replicator.scala | 3 ++-
.../typed/javadsl/ReplicatorMessageAdapter.scala | 5 ++--
.../ddata/typed/javadsl/ReplicatorSettings.scala | 4 ++--
.../ddata/typed/scaladsl/DistributedData.scala | 6 ++---
.../ddata/typed/scaladsl/ReplicatorSettings.scala | 4 ++--
.../pekko/cluster/typed/ClusterSingleton.scala | 3 ++-
.../typed/internal/AdaptedClusterImpl.scala | 2 +-
.../delivery/ReliableDeliverySerializer.scala | 8 ++++---
.../ClusterReceptionistConfigCompatChecker.scala | 4 ++--
.../receptionist/ClusterReceptionistSettings.scala | 4 +++-
.../cluster/typed/ChunkLargeMessageSpec.scala | 3 ++-
.../typed/MultiDcClusterSingletonSpec.scala | 4 ++--
.../cluster/typed/MultiNodeTypedClusterSpec.scala | 12 +++++-----
.../apache/pekko/cluster/typed/PubSubSpec.scala | 4 ++--
.../ClusterReceptionistUnreachabilitySpec.scala | 4 ++--
.../ddata/typed/scaladsl/ReplicatorSpec.scala | 4 ++--
.../typed/ActorRefIgnoreSerializationSpec.scala | 13 ++++++-----
.../pekko/cluster/typed/ActorSystemSpec.scala | 17 +++++++-------
.../cluster/typed/ClusterActorLoggingSpec.scala | 9 ++++----
.../pekko/cluster/typed/ClusterApiSpec.scala | 7 +++---
.../typed/ClusterDispatcherSelectorSpec.scala | 4 ++--
.../cluster/typed/ClusterSingletonApiSpec.scala | 7 +++---
.../typed/ClusterSingletonPoisonPillSpec.scala | 4 ++--
.../pekko/cluster/typed/GroupRouterSpec.scala | 6 +++--
.../pekko/cluster/typed/RemoteContextAskSpec.scala | 7 +++---
.../cluster/typed/RemoteDeployNotAllowedSpec.scala | 7 +++---
.../pekko/cluster/typed/RemoteMessageSpec.scala | 4 ++--
.../internal/PekkoClusterTypedSerializerSpec.scala | 4 ++--
.../delivery/ReliableDeliverySerializerSpec.scala | 4 ++--
.../receptionist/ClusterReceptionistSpec.scala | 10 ++++----
.../ClusterReceptionistStateSpec.scala | 6 ++---
.../scala/org/apache/pekko/cluster/Cluster.scala | 4 ++--
.../pekko/cluster/ClusterActorRefProvider.scala | 5 ++--
.../org/apache/pekko/cluster/ClusterDaemon.scala | 4 ++--
.../org/apache/pekko/cluster/ClusterEvent.scala | 2 +-
.../pekko/cluster/ClusterRemoteWatcher.scala | 1 +
.../org/apache/pekko/cluster/ClusterSettings.scala | 8 +++----
.../org/apache/pekko/cluster/ConfigUtil.scala | 4 ++--
.../scala/org/apache/pekko/cluster/Gossip.scala | 1 +
.../cluster/JoinConfigCompatCheckCluster.scala | 4 ++--
.../pekko/cluster/JoinConfigCompatChecker.scala | 6 ++---
.../scala/org/apache/pekko/cluster/Member.scala | 3 +--
.../protobuf/ClusterMessageSerializer.scala | 7 ++++--
.../cluster/routing/ClusterRouterConfig.scala | 9 +++++---
.../apache/pekko/cluster/sbr/DowningStrategy.scala | 1 +
.../pekko/cluster/sbr/SplitBrainResolver.scala | 2 +-
.../cluster/sbr/SplitBrainResolverSettings.scala | 4 ++--
.../ClusterAccrualFailureDetectorSpec.scala | 4 ++--
.../pekko/cluster/ClusterDeathWatchSpec.scala | 7 +++---
.../apache/pekko/cluster/ClusterShutdownSpec.scala | 5 ++--
.../ClusterWatcherNoClusterWatcheeSpec.scala | 7 +++---
.../org/apache/pekko/cluster/ConvergenceSpec.scala | 4 ++--
.../DeterministicOldestWhenJoiningSpec.scala | 4 ++--
...henOtherHasQuarantinedThisActorSystemSpec.scala | 2 ++
.../pekko/cluster/InitialHeartbeatSpec.scala | 4 ++--
.../pekko/cluster/InitialMembersOfNewDcSpec.scala | 4 ++--
.../apache/pekko/cluster/JoinInProgressSpec.scala | 4 ++--
.../apache/pekko/cluster/JoinSeedNodeSpec.scala | 4 ++--
.../pekko/cluster/LargeMessageClusterSpec.scala | 3 ++-
.../cluster/LeaderDowningAllOtherNodesSpec.scala | 4 ++--
.../LeaderDowningNodeThatIsUnreachableSpec.scala | 4 ++--
.../apache/pekko/cluster/LeaderLeavingSpec.scala | 4 ++--
.../scala/org/apache/pekko/cluster/MBeanSpec.scala | 8 +++----
.../apache/pekko/cluster/MemberWeaklyUpSpec.scala | 4 ++--
.../pekko/cluster/MinMembersBeforeUpSpec.scala | 4 ++--
.../apache/pekko/cluster/MultiDcClusterSpec.scala | 4 ++--
.../cluster/MultiDcHeartbeatTakingOverSpec.scala | 4 ++--
.../apache/pekko/cluster/MultiDcJoin2Spec.scala | 4 ++--
.../org/apache/pekko/cluster/MultiDcJoinSpec.scala | 4 ++--
.../apache/pekko/cluster/MultiDcLastNodeSpec.scala | 4 ++--
.../pekko/cluster/MultiDcSplitBrainSpec.scala | 4 ++--
.../pekko/cluster/MultiDcSunnyWeatherSpec.scala | 4 ++--
.../pekko/cluster/MultiNodeClusterSpec.scala | 11 +++++----
.../org/apache/pekko/cluster/NodeChurnSpec.scala | 4 ++--
.../cluster/NodeDowningAndBeingRemovedSpec.scala | 4 ++--
.../apache/pekko/cluster/QuickRestartSpec.scala | 4 ++--
.../cluster/RemoteFeaturesWithClusterSpec.scala | 7 +++---
.../pekko/cluster/RestartFirstSeedNodeSpec.scala | 4 ++--
.../apache/pekko/cluster/RestartNode2Spec.scala | 4 ++--
.../apache/pekko/cluster/RestartNode3Spec.scala | 4 ++--
.../org/apache/pekko/cluster/RestartNodeSpec.scala | 4 ++--
.../pekko/cluster/SharedMediaDriverSupport.scala | 3 ++-
.../pekko/cluster/SingletonClusterSpec.scala | 4 ++--
.../pekko/cluster/SplitBrainQuarantineSpec.scala | 5 ++--
.../org/apache/pekko/cluster/SplitBrainSpec.scala | 4 ++--
.../org/apache/pekko/cluster/StreamRefSpec.scala | 6 ++---
.../org/apache/pekko/cluster/StressSpec.scala | 11 +++++----
.../apache/pekko/cluster/SunnyWeatherSpec.scala | 4 ++--
.../cluster/SurviveNetworkInstabilitySpec.scala | 6 ++---
.../org/apache/pekko/cluster/TransitionSpec.scala | 3 ++-
.../cluster/UnreachableNodeJoinsAgainSpec.scala | 4 ++--
.../ClusterConsistentHashingRouterSpec.scala | 4 ++--
.../cluster/routing/ClusterRoundRobinSpec.scala | 4 ++--
.../pekko/cluster/routing/UseRoleIgnoredSpec.scala | 4 ++--
.../sbr/DownAllIndirectlyConnected5NodeSpec.scala | 4 ++--
.../cluster/sbr/DownAllUnstable5NodeSpec.scala | 4 ++--
.../cluster/sbr/IndirectlyConnected3NodeSpec.scala | 4 ++--
.../cluster/sbr/IndirectlyConnected5NodeSpec.scala | 4 ++--
.../pekko/cluster/sbr/LeaseMajority5NodeSpec.scala | 8 +++----
.../apache/pekko/cluster/ClusterConfigSpec.scala | 6 ++---
.../ClusterDeathWatchNotificationSpec.scala | 6 ++---
.../apache/pekko/cluster/ClusterDeployerSpec.scala | 4 ++--
.../cluster/ClusterDomainEventPublisherSpec.scala | 6 ++---
.../pekko/cluster/ClusterDomainEventSpec.scala | 6 +++--
.../cluster/ClusterHeartbeatSenderStateSpec.scala | 6 ++---
.../org/apache/pekko/cluster/ClusterLogSpec.scala | 4 ++--
.../org/apache/pekko/cluster/ClusterSpec.scala | 8 +++----
.../org/apache/pekko/cluster/ClusterTestKit.scala | 4 ++--
.../org/apache/pekko/cluster/ConfigUtilSpec.scala | 4 ++--
.../pekko/cluster/CrossDcHeartbeatSenderSpec.scala | 2 +-
.../apache/pekko/cluster/DowningProviderSpec.scala | 11 +++++----
.../pekko/cluster/FailureDetectorPuppet.scala | 4 ++--
.../org/apache/pekko/cluster/GossipSpec.scala | 6 ++---
.../pekko/cluster/GossipTargetSelectorSpec.scala | 6 ++---
.../pekko/cluster/HeartbeatNodeRingPerfSpec.scala | 4 ++--
.../pekko/cluster/HeartbeatNodeRingSpec.scala | 4 ++--
.../cluster/JoinConfigCompatCheckClusterSpec.scala | 6 ++---
.../JoinConfigCompatCheckerRollingUpdateSpec.scala | 4 ++--
.../cluster/JoinConfigCompatCheckerSpec.scala | 4 ++--
.../JoinConfigCompatPreDefinedChecksSpec.scala | 3 ++-
.../apache/pekko/cluster/MemberOrderingSpec.scala | 6 ++---
.../apache/pekko/cluster/MembershipStateSpec.scala | 6 ++---
.../pekko/cluster/MixedProtocolClusterSpec.scala | 4 ++--
.../pekko/cluster/ReachabilityPerfSpec.scala | 5 ++--
.../apache/pekko/cluster/ReachabilitySpec.scala | 4 ++--
.../pekko/cluster/StartupWithOneThreadSpec.scala | 2 +-
.../protobuf/ClusterMessageSerializerSpec.scala | 7 +++---
.../pekko/cluster/sbr/LeaseMajoritySpec.scala | 4 +++-
.../pekko/cluster/sbr/SplitBrainResolverSpec.scala | 11 +++++----
.../coordination/lease/LeaseUsageSettings.scala | 2 +-
.../pekko/coordination/lease/TimeoutSettings.scala | 3 +--
.../coordination/lease/internal/LeaseAdapter.scala | 4 ++--
.../pekko/coordination/lease/TestLease.scala | 6 ++---
.../coordination/lease/TimeoutSettingsSpec.scala | 3 ++-
.../lease/scaladsl/LeaseProviderSpec.scala | 4 ++--
.../apache/pekko/discovery/ServiceDiscovery.scala | 2 +-
.../aggregate/AggregateServiceDiscovery.scala | 6 ++---
.../discovery/config/ConfigServiceDiscovery.scala | 6 ++---
.../discovery/DiscoveryConfigurationSpec.scala | 9 ++++----
.../aggregate/AggregateServiceDiscoverySpec.scala | 13 ++++++-----
.../config/ConfigServiceDiscoverySpec.scala | 11 +++++----
.../config/ConfigServicesParserSpec.scala | 9 ++++----
.../pekko/discovery/dns/DnsDiscoverySpec.scala | 4 +++-
.../discovery/dns/DnsServiceDiscoverySpec.scala | 8 +++----
.../apache/pekko/cluster/ddata/DurableStore.scala | 5 ++--
.../pekko/cluster/ddata/ReplicatedData.scala | 3 ++-
.../apache/pekko/cluster/ddata/Replicator.scala | 8 +++----
.../ddata/protobuf/ReplicatedDataSerializer.scala | 6 +++--
.../protobuf/ReplicatorMessageSerializer.scala | 4 +++-
.../ddata/protobuf/SerializationSupport.scala | 4 +++-
.../pekko/cluster/ddata/DurableDataSpec.scala | 7 +++---
.../pekko/cluster/ddata/DurablePruningSpec.scala | 4 ++--
.../cluster/ddata/JepsenInspiredInsertSpec.scala | 4 ++--
.../pekko/cluster/ddata/PerformanceSpec.scala | 4 ++--
.../pekko/cluster/ddata/ReplicatorChaosSpec.scala | 4 ++--
.../pekko/cluster/ddata/ReplicatorDeltaSpec.scala | 4 ++--
.../pekko/cluster/ddata/ReplicatorGossipSpec.scala | 4 ++--
.../cluster/ddata/ReplicatorMapDeltaSpec.scala | 4 ++--
.../cluster/ddata/ReplicatorORSetDeltaSpec.scala | 4 ++--
.../cluster/ddata/ReplicatorPruningSpec.scala | 4 ++--
.../pekko/cluster/ddata/ReplicatorSpec.scala | 4 ++--
.../pekko/cluster/ddata/STMultiNodeSpec.scala | 4 ++--
.../pekko/cluster/ddata/DataEnvelopeSpec.scala | 6 ++---
.../ddata/DeltaPropagationSelectorSpec.scala | 5 ++--
.../org/apache/pekko/cluster/ddata/FlagSpec.scala | 4 ++--
.../apache/pekko/cluster/ddata/GCounterSpec.scala | 6 ++---
.../org/apache/pekko/cluster/ddata/GSetSpec.scala | 4 ++--
.../apache/pekko/cluster/ddata/LWWMapSpec.scala | 6 ++---
.../pekko/cluster/ddata/LWWRegisterSpec.scala | 6 ++---
.../pekko/cluster/ddata/LocalConcurrencySpec.scala | 11 +++++----
.../apache/pekko/cluster/ddata/LotsOfDataBot.scala | 4 ++--
.../org/apache/pekko/cluster/ddata/ORMapSpec.scala | 6 ++---
.../pekko/cluster/ddata/ORMultiMapSpec.scala | 6 ++---
.../org/apache/pekko/cluster/ddata/ORSetSpec.scala | 6 ++---
.../pekko/cluster/ddata/PNCounterMapSpec.scala | 6 ++---
.../apache/pekko/cluster/ddata/PNCounterSpec.scala | 6 ++---
.../pekko/cluster/ddata/PruningStateSpec.scala | 6 ++---
.../cluster/ddata/ReplicatorSettingsSpec.scala | 5 ++--
.../pekko/cluster/ddata/VersionVectorSpec.scala | 8 +++----
.../protobuf/ReplicatedDataSerializerSpec.scala | 11 +++++----
.../protobuf/ReplicatorMessageSerializerSpec.scala | 11 +++++----
.../pekko/remote/testconductor/Conductor.scala | 5 ++--
.../pekko/remote/testconductor/DataTypes.scala | 6 +++--
.../pekko/remote/testconductor/Extension.scala | 4 ++--
.../apache/pekko/remote/testconductor/Player.scala | 6 ++---
.../remote/testconductor/RemoteConnection.scala | 8 +++----
.../pekko/remote/testkit/MultiNodeSpec.scala | 7 ++++--
.../apache/pekko/osgi/ActorSystemActivator.scala | 3 ++-
.../pekko/osgi/BundleDelegatingClassLoader.scala | 3 +--
.../apache/pekko/osgi/OsgiActorSystemFactory.scala | 3 ++-
.../pekko/osgi/ActorSystemActivatorTest.scala | 5 ++--
.../org/apache/pekko/osgi/PojoSRTestSupport.scala | 4 ++--
.../pekko/persistence/query/EventEnvelope.scala | 1 +
.../pekko/persistence/query/PersistenceQuery.scala | 4 ++--
.../query/internal/QuerySerializer.scala | 2 ++
.../query/javadsl/DurableStateStoreQuery.scala | 2 +-
.../persistence/query/journal/leveldb/Buffer.scala | 3 ++-
.../leveldb/EventsByPersistenceIdStage.scala | 1 +
.../query/journal/leveldb/EventsByTagStage.scala | 1 +
.../leveldb/LeveldbReadJournalProvider.scala | 3 ++-
.../leveldb/scaladsl/LeveldbReadJournal.scala | 4 ++--
.../query/scaladsl/DurableStateStoreQuery.scala | 2 +-
.../pekko/persistence/query/DummyReadJournal.scala | 4 ++--
.../persistence/query/PersistenceQuerySpec.scala | 9 ++++----
.../journal/leveldb/AllPersistenceIdsSpec.scala | 6 ++---
.../leveldb/EventsByPersistenceIdSpec.scala | 6 ++---
.../query/journal/leveldb/EventsByTagSpec.scala | 6 ++---
.../leveldb/PersistencePluginProxySpec.scala | 4 ++--
.../journal/leveldb/SharedLeveldbJournalSpec.scala | 4 +++-
.../persistence/serialization/SerializerSpec.scala | 3 ++-
.../org/apache/pekko/persistence/PluginSpec.scala | 9 ++++----
.../apache/pekko/persistence/TestSerializer.scala | 4 ++--
.../japi/journal/JavaJournalPerfSpec.scala | 6 +++--
.../persistence/japi/journal/JavaJournalSpec.scala | 4 +++-
.../japi/snapshot/JavaSnapshotStoreSpec.scala | 4 +++-
.../persistence/journal/JournalPerfSpec.scala | 6 ++---
.../pekko/persistence/journal/JournalSpec.scala | 4 ++--
.../pekko/persistence/scalatest/MayVerb.scala | 1 +
.../persistence/scalatest/OptionalTests.scala | 4 ++--
.../persistence/snapshot/SnapshotStoreSpec.scala | 6 ++---
.../apache/pekko/persistence/PluginCleanup.scala | 1 +
.../persistence/japi/JavaJournalSpecSpec.scala | 5 ++--
.../snapshot/local/LocalSnapshotStoreSpec.scala | 4 ++--
.../pekko/persistence/testkit/EventStorage.scala | 6 ++---
.../testkit/PersistenceTestKitPlugin.scala | 10 ++++----
.../persistence/testkit/ProcessingPolicy.scala | 4 ++--
.../persistence/testkit/SnapshotStorage.scala | 4 ++--
.../internal/EventSourcedBehaviorTestKitImpl.scala | 1 +
.../testkit/internal/InMemStorageExtension.scala | 2 +-
.../SnapshotStorageEmulatorExtension.scala | 2 +-
.../testkit/internal/TestKitStorage.scala | 4 ++--
.../javadsl/EventSourcedBehaviorTestKit.scala | 9 ++++----
.../testkit/javadsl/PersistenceInit.scala | 5 ++--
.../testkit/javadsl/PersistenceTestKit.scala | 5 ++--
.../testkit/javadsl/SnapshotTestKit.scala | 5 ++--
.../PersistenceTestKitReadJournalProvider.scala | 1 +
.../query/internal/EventsBySliceStage.scala | 8 +++----
.../testkit/query/internal/EventsByTagStage.scala | 6 ++---
.../scaladsl/PersistenceTestKitReadJournal.scala | 24 ++++++++++---------
.../scaladsl/EventSourcedBehaviorTestKit.scala | 6 +++--
.../testkit/scaladsl/PersistenceTestKit.scala | 4 +++-
...rsistenceTestKitDurableStateStoreProvider.scala | 4 ++--
.../PersistenceTestKitDurableStateStore.scala | 8 ++++---
.../PersistenceTestKitDurableStateStore.scala | 4 ++--
.../pekko/persistence/testkit/CommonUtils.scala | 7 +++---
.../testkit/javadsl/CommonSnapshotTests.scala | 5 ++--
.../testkit/javadsl/CommonTestKitTests.scala | 5 ++--
.../testkit/query/CurrentEventsBySlicesSpec.scala | 4 ++--
.../testkit/query/CurrentEventsByTagSpec.scala | 1 +
.../testkit/query/EventsByPersistenceIdSpec.scala | 6 +++--
.../testkit/query/EventsBySliceSpec.scala | 10 ++++----
.../testkit/query/EventsByTagSpec.scala | 10 ++++----
.../testkit/scaladsl/CommonSnapshotTests.scala | 4 ++--
.../testkit/scaladsl/CommonTestKitTests.scala | 4 ++--
...EventSourcedBehaviorNoSnapshotTestKitSpec.scala | 4 +++-
.../scaladsl/EventSourcedBehaviorTestKitSpec.scala | 4 +++-
.../testkit/scaladsl/MultipleJournalsSpec.scala | 4 +++-
.../testkit/scaladsl/RuntimeJournalsSpec.scala | 4 +++-
.../PersistenceTestKitDurableStateStoreSpec.scala | 3 ++-
.../persistence/typed/EventPublishingSpec.scala | 1 +
.../typed/EventSourcedBehaviorLoggingSpec.scala | 7 +++---
.../typed/MultiJournalReplicationSpec.scala | 8 ++++---
.../typed/ReplicatedEventPublishingSpec.scala | 3 ++-
.../typed/ReplicatedEventSourcingSpec.scala | 1 +
.../typed/ReplicatedEventSourcingTaggingSpec.scala | 5 ++--
.../persistence/typed/ReplicationBaseSpec.scala | 1 +
.../typed/ReplicationIllegalAccessSpec.scala | 1 +
.../typed/ReplicationSnapshotSpec.scala | 3 ++-
.../pekko/persistence/typed/crdt/CounterSpec.scala | 2 +-
.../pekko/persistence/typed/crdt/LwwSpec.scala | 10 ++++----
.../pekko/persistence/typed/crdt/ORSetSpec.scala | 9 ++++----
.../ReplicatedEventSourcingJacksonSpec.scala | 4 +++-
.../scaladsl/EventSourcedBehaviorFailureSpec.scala | 14 ++++++-----
.../EventSourcedBehaviorInterceptorSpec.scala | 8 ++++---
.../EventSourcedBehaviorRecoveryTimeoutSpec.scala | 11 +++++----
.../scaladsl/EventSourcedBehaviorReplySpec.scala | 5 ++--
.../EventSourcedBehaviorRetentionSpec.scala | 12 ++++++----
.../scaladsl/EventSourcedBehaviorSignalSpec.scala | 14 ++++++-----
.../typed/scaladsl/EventSourcedBehaviorSpec.scala | 27 ++++++++++++----------
.../scaladsl/EventSourcedBehaviorStashSpec.scala | 15 +++++++-----
.../scaladsl/EventSourcedBehaviorTimersSpec.scala | 8 ++++---
.../scaladsl/EventSourcedBehaviorWatchSpec.scala | 16 +++++++------
.../scaladsl/EventSourcedEventAdapterSpec.scala | 6 +++--
.../scaladsl/EventSourcedSequenceNumberSpec.scala | 6 +++--
.../scaladsl/EventSourcedSnapshotAdapterSpec.scala | 6 +++--
.../scaladsl/EventSourcedStashOverflowSpec.scala | 6 +++--
.../typed/scaladsl/LoggerSourceSpec.scala | 6 +++--
.../typed/scaladsl/NullEmptyStateSpec.scala | 4 +++-
.../typed/scaladsl/OptionalSnapshotStoreSpec.scala | 5 ++--
.../typed/scaladsl/PerformanceSpec.scala | 9 +++++---
.../typed/scaladsl/PrimitiveStateSpec.scala | 4 +++-
.../typed/scaladsl/SlowInMemorySnapshotStore.scala | 8 +++----
.../typed/scaladsl/SnapshotMutableStateSpec.scala | 8 ++++---
.../SnapshotRecoveryWithEmptyJournalSpec.scala | 13 +++++++----
.../DurableStateBehaviorInterceptorSpec.scala | 10 ++++----
.../scaladsl/DurableStateBehaviorReplySpec.scala | 10 ++++----
.../DurableStateBehaviorStashOverflowSpec.scala | 10 ++++----
.../scaladsl/DurableStateBehaviorTimersSpec.scala | 12 ++++++----
.../state/scaladsl/DurableStateRevisionSpec.scala | 9 ++++----
.../typed/state/scaladsl/NullEmptyStateSpec.scala | 7 +++---
.../typed/state/scaladsl/PrimitiveStateSpec.scala | 7 +++---
.../pekko/persistence/typed/crdt/ORSet.scala | 3 ++-
.../typed/delivery/EventSourcedProducerQueue.scala | 6 ++---
.../persistence/typed/internal/BehaviorSetup.scala | 10 +++++---
.../typed/internal/EventSourcedBehaviorImpl.scala | 6 +++--
.../typed/internal/EventSourcedSettings.scala | 4 ++--
.../typed/internal/ExternalInteractions.scala | 1 +
.../typed/internal/ReplayingEvents.scala | 4 ++--
.../typed/internal/ReplayingSnapshot.scala | 2 +-
.../typed/internal/ReplicationSetup.scala | 3 ++-
.../pekko/persistence/typed/internal/Running.scala | 14 ++++++-----
.../persistence/typed/internal/VersionVector.scala | 1 +
.../pekko/persistence/typed/javadsl/Effect.scala | 3 ++-
.../persistence/typed/javadsl/EventHandler.scala | 2 +-
.../typed/javadsl/EventSourcedBehavior.scala | 6 +++--
.../typed/javadsl/PersistentFSMMigration.scala | 5 ++--
.../typed/javadsl/ReplicatedEventSourcing.scala | 7 +++---
.../typed/scaladsl/EventSourcedBehavior.scala | 5 ++--
.../ReplicatedEventSourcingSerializer.scala | 14 +++++------
.../typed/state/internal/BehaviorSetup.scala | 12 +++++-----
.../state/internal/DurableStateBehaviorImpl.scala | 6 ++---
.../state/internal/DurableStateSettings.scala | 6 ++---
.../typed/state/javadsl/CommandHandler.scala | 4 ++--
.../state/javadsl/CommandHandlerWithReply.scala | 4 ++--
.../typed/state/javadsl/DurableStateBehavior.scala | 4 ++--
.../persistence/typed/state/javadsl/Effect.scala | 2 +-
.../state/scaladsl/DurableStateBehavior.scala | 2 +-
.../persistence/typed/state/scaladsl/Effect.scala | 2 +-
.../typed/ClusterSingletonPersistenceSpec.scala | 7 +++---
.../persistence/typed/ManyRecoveriesSpec.scala | 4 ++--
.../persistence/typed/PersistenceIdSpec.scala | 4 ++--
.../ReplicatedEventSourcingSerializationSpec.scala | 1 +
.../typed/StashingWhenSnapshottingSpec.scala | 7 +++---
.../delivery/EventSourcedProducerQueueSpec.scala | 9 ++++----
...DeliveryWithEventSourcedProducerQueueSpec.scala | 9 ++++----
...kPullingWithEventSourcedProducerQueueSpec.scala | 10 ++++----
.../typed/internal/RecoveryPermitterSpec.scala | 4 ++--
.../typed/internal/RetentionCriteriaSpec.scala | 8 +++----
.../typed/internal/StashStateSpec.scala | 4 ++--
.../scaladsl/PersistentActorCompileOnlyTest.scala | 10 ++++----
.../typed/scaladsl/SnapshotIsOptionalSpec.scala | 8 ++++---
.../ReplicatedEventSourcingSerializerSpec.scala | 1 +
.../apache/pekko/persistence/Eventsourced.scala | 6 ++---
.../org/apache/pekko/persistence/Persistence.scala | 4 ++--
.../pekko/persistence/PersistencePlugin.scala | 4 ++--
.../apache/pekko/persistence/PersistentActor.scala | 6 ++---
.../pekko/persistence/fsm/PersistentFSM.scala | 6 ++---
.../pekko/persistence/fsm/PersistentFSMBase.scala | 4 ++--
.../pekko/persistence/journal/EventAdapters.scala | 4 ++--
.../journal/PersistencePluginProxy.scala | 4 ++--
.../persistence/journal/inmem/InmemJournal.scala | 13 ++++++-----
.../persistence/journal/japi/AsyncRecovery.scala | 4 ++--
.../journal/japi/AsyncWriteJournal.scala | 6 ++---
.../journal/leveldb/LeveldbJournal.scala | 6 ++---
.../persistence/journal/leveldb/LeveldbStore.scala | 5 ++--
.../journal/leveldb/SharedLeveldbStore.scala | 4 ++--
.../serialization/MessageSerializer.scala | 4 +++-
.../persistence/snapshot/japi/SnapshotStore.scala | 4 ++--
.../snapshot/local/LocalSnapshotStore.scala | 4 ++--
.../state/DurableStateStoreRegistry.scala | 4 ++--
.../state/javadsl/DurableStateStore.scala | 3 ++-
.../state/scaladsl/DurableStateStore.scala | 2 +-
.../AtLeastOnceDeliveryFailureSpec.scala | 4 ++--
.../persistence/EndToEndEventAdapterSpec.scala | 10 ++++----
.../pekko/persistence/EventAdapterSpec.scala | 4 ++--
.../apache/pekko/persistence/LoadPluginSpec.scala | 4 ++--
.../pekko/persistence/ManyRecoveriesSpec.scala | 4 ++--
.../persistence/OptionalSnapshotStoreSpec.scala | 4 ++--
.../apache/pekko/persistence/PerformanceSpec.scala | 4 ++--
.../apache/pekko/persistence/PersistenceSpec.scala | 8 ++++---
.../PersistentActorBoundedStashingSpec.scala | 7 +++---
.../PersistentActorJournalProtocolSpec.scala | 4 ++--
.../PersistentActorRecoveryTimeoutSpec.scala | 4 ++--
.../pekko/persistence/PersistentActorSpec.scala | 6 +++--
.../persistence/PersistentActorStashingSpec.scala | 4 ++--
.../pekko/persistence/RecoveryPermitterSpec.scala | 4 ++--
.../SnapshotFailureRobustnessSpec.scala | 4 ++--
.../persistence/TimerPersistentActorSpec.scala | 4 ++--
.../pekko/persistence/fsm/PersistentFSMSpec.scala | 5 ++--
.../AsyncWriteJournalResponseOrderSpec.scala | 6 ++---
.../journal/InmemEventAdaptersSpec.scala | 5 ++--
.../persistence/journal/SteppingInmemJournal.scala | 4 ++--
.../journal/leveldb/JournalCompactionSpec.scala | 3 ++-
.../SnapshotSerializerMigrationAkkaSpec.scala | 7 +++---
.../SnapshotSerializerNoMigrationSpec.scala | 6 ++---
.../serialization/SnapshotSerializerSpec.scala | 4 ++--
.../exception/DurableStateExceptionsSpec.scala | 2 +-
.../apache/pekko/pki/pem/DERPrivateKeyLoader.scala | 7 +++---
.../pekko/remote/AttemptSysMsgRedeliverySpec.scala | 3 ++-
.../pekko/remote/LookupRemoteActorSpec.scala | 3 ++-
.../apache/pekko/remote/NewRemoteActorSpec.scala | 3 ++-
.../remote/PiercingShouldKeepQuarantineSpec.scala | 4 ++--
.../apache/pekko/remote/RemoteDeliverySpec.scala | 4 ++--
.../remote/RemoteDeploymentDeathWatchSpec.scala | 4 ++--
.../apache/pekko/remote/RemoteFeaturesSpec.scala | 4 ++--
.../pekko/remote/RemoteNodeDeathWatchSpec.scala | 4 ++--
.../remote/RemoteNodeRestartDeathWatchSpec.scala | 4 ++--
.../remote/RemoteQuarantinePiercingSpec.scala | 4 ++--
.../pekko/remote/RemoteReDeploymentSpec.scala | 4 ++--
.../pekko/remote/RemotingMultiNodeSpec.scala | 7 +++---
.../apache/pekko/remote/TransportFailSpec.scala | 8 +++----
.../pekko/remote/artery/DirectMemorySpec.scala | 4 ++--
.../pekko/remote/artery/FanInThrougputSpec.scala | 4 ++--
.../pekko/remote/artery/FanOutThrougputSpec.scala | 4 ++--
.../artery/HandshakeRestartReceiverSpec.scala | 4 ++--
.../apache/pekko/remote/artery/LatencySpec.scala | 3 ++-
.../pekko/remote/artery/MaxThroughputSpec.scala | 3 ++-
.../artery/RemoteRestartedQuarantinedSpec.scala | 4 ++--
...dStreamRestartWithCompressionInFlightSpec.scala | 7 +++---
.../artery/SurviveNetworkPartitionSpec.scala | 6 ++---
.../apache/pekko/remote/artery/TestMessage.scala | 4 ++--
.../artery/aeron/AeronStreamConcistencySpec.scala | 3 ++-
.../artery/aeron/AeronStreamLatencySpec.scala | 3 ++-
.../aeron/AeronStreamMaxThroughputSpec.scala | 3 ++-
.../remote/classic/RemoteGatePiercingSpec.scala | 6 ++---
.../remote/classic/RemoteNodeRestartGateSpec.scala | 6 ++---
.../RemoteNodeShutdownAndComesBackSpec.scala | 4 ++--
.../pekko/remote/classic/Ticket15109Spec.scala | 6 ++---
.../pekko/remote/routing/RemoteRandomSpec.scala | 4 ++--
.../remote/routing/RemoteRoundRobinSpec.scala | 4 ++--
.../remote/routing/RemoteScatterGatherSpec.scala | 4 ++--
.../remote/testconductor/TestConductorSpec.scala | 4 ++--
.../remote/artery/ArteryFailedToBindSpec.scala | 9 ++++----
.../remote/classic/RemotingFailedToBindSpec.scala | 10 ++++----
.../remote/testconductor/ControllerSpec.scala | 2 +-
.../org/apache/pekko/remote/ByteStringUtils.scala | 2 +-
.../pekko/remote/DeadlineFailureDetector.scala | 4 ++--
.../scala/org/apache/pekko/remote/Endpoint.scala | 5 ++--
.../pekko/remote/FailureDetectorRegistry.scala | 4 ++--
.../apache/pekko/remote/MessageSerializer.scala | 1 +
.../pekko/remote/PhiAccrualFailureDetector.scala | 5 +++-
.../pekko/remote/RemoteActorRefProvider.scala | 3 +--
.../org/apache/pekko/remote/RemoteDeployer.scala | 5 ++--
.../pekko/remote/RemoteMetricsExtension.scala | 3 +--
.../org/apache/pekko/remote/RemoteSettings.scala | 10 ++++----
.../org/apache/pekko/remote/RemoteTransport.scala | 2 +-
.../org/apache/pekko/remote/RemoteWatcher.scala | 3 +--
.../scala/org/apache/pekko/remote/Remoting.scala | 6 ++---
.../pekko/remote/artery/ArterySettings.scala | 12 +++++-----
.../pekko/remote/artery/ArteryTransport.scala | 3 +--
.../apache/pekko/remote/artery/Association.scala | 2 +-
.../org/apache/pekko/remote/artery/Codecs.scala | 4 ++--
.../pekko/remote/artery/EnvelopeBufferPool.scala | 2 ++
.../pekko/remote/artery/FlushOnShutdown.scala | 1 +
.../org/apache/pekko/remote/artery/Handshake.scala | 2 +-
.../pekko/remote/artery/RemoteInstrument.scala | 4 ++--
.../remote/artery/SystemMessageDelivery.scala | 2 +-
.../org/apache/pekko/remote/artery/TestStage.scala | 2 ++
.../artery/tcp/ConfigSSLEngineProvider.scala | 19 +++++++--------
.../remote/artery/tcp/SSLEngineProvider.scala | 5 ++--
.../remote/artery/tcp/SecureRandomFactory.scala | 1 +
.../artery/tcp/ssl/PemManagersProvider.scala | 7 +++---
.../tcp/ssl/RotatingKeysSSLEngineProvider.scala | 15 ++++++------
.../remote/artery/tcp/ssl/SSLEngineConfig.scala | 9 ++++----
.../remote/artery/tcp/ssl/SessionVerifier.scala | 2 +-
.../pekko/remote/artery/tcp/ssl/X509Readers.scala | 5 ++--
.../pekko/remote/routing/RemoteRouterConfig.scala | 5 ++--
.../serialization/ArteryMessageSerializer.scala | 4 ++--
.../serialization/DaemonMsgCreateSerializer.scala | 6 +++--
.../serialization/MessageContainerSerializer.scala | 1 +
.../serialization/MiscMessageSerializer.scala | 6 +++--
.../serialization/WrappedPayloadSupport.scala | 6 ++---
.../FailureInjectorTransportAdapter.scala | 2 +-
.../pekko/remote/transport/PekkoPduCodec.scala | 1 +
.../remote/transport/PekkoProtocolTransport.scala | 8 +++----
.../pekko/remote/transport/TestTransport.scala | 4 ++--
.../transport/ThrottlerTransportAdapter.scala | 7 +++---
.../apache/pekko/remote/transport/Transport.scala | 3 +--
.../remote/transport/netty/NettySSLSupport.scala | 4 ++--
.../remote/transport/netty/NettyTransport.scala | 7 +++---
.../pekko/remote/AccrualFailureDetectorSpec.scala | 3 +--
.../apache/pekko/remote/AckedDeliverySpec.scala | 3 +--
.../org/apache/pekko/remote/DaemonicSpec.scala | 6 ++---
.../apache/pekko/remote/MessageLoggingSpec.scala | 5 ++--
.../apache/pekko/remote/NetworkFailureSpec.scala | 2 +-
.../pekko/remote/RemoteActorMailboxSpec.scala | 4 ++--
.../org/apache/pekko/remote/RemoteConfigSpec.scala | 6 ++---
.../apache/pekko/remote/RemoteDeployerSpec.scala | 4 ++--
.../apache/pekko/remote/RemoteFeaturesSpec.scala | 8 +++----
.../org/apache/pekko/remote/RemoteRouterSpec.scala | 4 ++--
.../pekko/remote/Ticket1978CommunicationSpec.scala | 6 ++---
.../remote/TransientSerializationErrorSpec.scala | 4 ++--
.../ActorRefResolveCacheQuarantineSpec.scala | 4 ++--
.../pekko/remote/artery/ArteryMultiNodeSpec.scala | 7 +++---
.../remote/artery/BindCanonicalAddressSpec.scala | 9 ++++----
.../pekko/remote/artery/DuplicateFlushSpec.scala | 2 +-
.../remote/artery/DuplicateHandshakeSpec.scala | 2 +-
.../pekko/remote/artery/EnvelopeBufferSpec.scala | 1 +
.../pekko/remote/artery/HandshakeDenySpec.scala | 4 ++--
.../pekko/remote/artery/HandshakeFailureSpec.scala | 4 ++--
.../pekko/remote/artery/HandshakeRetrySpec.scala | 4 ++--
.../remote/artery/HarmlessQuarantineSpec.scala | 6 ++---
.../pekko/remote/artery/ImmutableLongMapSpec.scala | 4 ++--
.../remote/artery/InboundControlJunctionSpec.scala | 2 +-
.../pekko/remote/artery/InboundHandshakeSpec.scala | 2 +-
.../pekko/remote/artery/LateConnectSpec.scala | 4 ++--
.../pekko/remote/artery/LruBoundedCacheSpec.scala | 3 +--
.../artery/OutboundControlJunctionSpec.scala | 2 +-
.../remote/artery/OutboundHandshakeSpec.scala | 2 +-
.../remote/artery/OutboundIdleShutdownSpec.scala | 6 ++---
.../pekko/remote/artery/RemoteDeathWatchSpec.scala | 6 ++---
.../pekko/remote/artery/RemoteDeployerSpec.scala | 4 ++--
.../pekko/remote/artery/RemoteDeploymentSpec.scala | 4 ++--
.../RemoteInstrumentsSerializationSpec.scala | 5 ++--
.../remote/artery/RemoteInstrumentsSpec.scala | 3 ++-
.../artery/RemoteMessageSerializationSpec.scala | 3 ++-
.../pekko/remote/artery/RemoteRouterSpec.scala | 4 ++--
.../remote/artery/RemoteSendConsistencySpec.scala | 4 ++--
.../pekko/remote/artery/RemoteWatcherSpec.scala | 4 ++--
.../remote/artery/RemotingFlightRecorderSpec.scala | 4 ++--
.../apache/pekko/remote/artery/SendQueueSpec.scala | 2 +-
.../remote/artery/SystemMessageAckerSpec.scala | 2 +-
.../remote/artery/SystemMessageDeliverySpec.scala | 6 ++---
.../apache/pekko/remote/artery/TestContext.scala | 6 ++---
.../apache/pekko/remote/artery/UntrustedSpec.scala | 4 ++--
.../pekko/remote/artery/aeron/AeronSinkSpec.scala | 2 +-
.../compress/CompressionIntegrationSpec.scala | 6 +++--
.../HandshakeShouldDropCompressionTableSpec.scala | 7 +++---
.../artery/jfr/JFRRemotingFlightRecorderSpec.scala | 4 ++--
.../pekko/remote/artery/tcp/TcpFramingSpec.scala | 2 +-
.../pekko/remote/artery/tcp/TlsTcpSpec.scala | 14 ++++++-----
.../artery/tcp/ssl/CipherSuiteSupportCheck.scala | 7 +++---
.../artery/tcp/ssl/PeerSubjectVerifierSpec.scala | 2 +-
.../artery/tcp/ssl/PemManagersProviderSpec.scala | 1 +
.../ssl/RotatingKeysSSLEngineProviderSpec.scala | 13 ++++++-----
.../remote/artery/tcp/ssl/TlsResourcesSpec.scala | 7 +++---
.../pekko/remote/classic/ActorsLeakSpec.scala | 6 ++---
.../remote/classic/RemoteDeathWatchSpec.scala | 6 ++---
.../classic/RemoteDeploymentAllowListSpec.scala | 6 +++--
.../pekko/remote/classic/RemoteInitErrorSpec.scala | 9 ++++----
.../pekko/remote/classic/RemoteSettingsSpec.scala | 8 ++++---
.../pekko/remote/classic/RemoteWatcherSpec.scala | 3 +--
.../apache/pekko/remote/classic/RemotingSpec.scala | 3 ++-
.../pekko/remote/classic/UntrustedSpec.scala | 6 ++---
.../classic/transport/GenericTransportSpec.scala | 3 +--
.../classic/transport/PekkoProtocolSpec.scala | 8 +++----
.../transport/PekkoProtocolStressTest.scala | 4 ++--
.../SystemMessageDeliveryStressTest.scala | 6 ++---
.../classic/transport/TestTransportSpec.scala | 3 +--
.../transport/ThrottlerTransportAdapterSpec.scala | 6 ++---
.../AllowJavaSerializationOffSpec.scala | 4 ++--
.../ArteryMessageSerializerSpec.scala | 4 ++--
...reateSerializerAllowJavaSerializationSpec.scala | 6 ++---
.../serialization/MiscMessageSerializerSpec.scala | 5 ++--
.../SerializationTransportInformationSpec.scala | 9 ++++----
.../SystemMessageSerializationSpec.scala | 4 ++--
.../remote/transport/NettyTransportSpec.scala | 14 ++++++-----
.../jackson/FiniteDurationModule.scala | 2 +-
.../jackson/JacksonObjectMapperProvider.scala | 7 ++++--
.../jackson/PekkoSerializationModule.scala | 1 +
.../serialization/jackson/JacksonFactorySpec.scala | 11 +++++----
.../jackson/JacksonSerializerSpec.scala | 16 ++++++++-----
.../org/apache/pekko/event/slf4j/Slf4jLogger.scala | 4 ++--
.../apache/pekko/event/slf4j/Slf4jLoggerSpec.scala | 6 +++--
.../pekko/event/slf4j/Slf4jLoggingFilterSpec.scala | 4 ++--
.../pekko/stream/testkit/StreamTestKit.scala | 4 ++--
.../stream/testkit/javadsl/StreamTestKit.scala | 9 ++++----
.../pekko/stream/testkit/StreamConfiguration.scala | 5 ++--
.../apache/pekko/stream/testkit/StreamSpec.scala | 4 ++--
.../pekko/stream/tck/ActorSystemLifecycle.scala | 7 +++---
.../stream/tck/CancelledSinkSubscriberTest.scala | 3 ++-
.../org/apache/pekko/stream/tck/ConcatTest.scala | 4 ++--
.../pekko/stream/tck/EmptyPublisherTest.scala | 4 ++--
.../pekko/stream/tck/FanoutPublisherTest.scala | 4 ++--
.../pekko/stream/tck/FilePublisherTest.scala | 3 ++-
.../tck/FlatMapConcatDoubleSubscriberTest.scala | 4 ++--
.../pekko/stream/tck/FlatMapPrefixTest.scala | 4 ++--
.../org/apache/pekko/stream/tck/FlattenTest.scala | 4 ++--
.../pekko/stream/tck/FoldSinkSubscriberTest.scala | 4 ++--
.../stream/tck/ForeachSinkSubscriberTest.scala | 4 ++--
.../pekko/stream/tck/FusableProcessorTest.scala | 4 ++--
.../pekko/stream/tck/FuturePublisherTest.scala | 4 ++--
.../org/apache/pekko/stream/tck/GroupByTest.scala | 4 ++--
.../pekko/stream/tck/InputStreamSourceTest.scala | 4 ++--
.../pekko/stream/tck/IterablePublisherTest.scala | 4 ++--
.../org/apache/pekko/stream/tck/MapTest.scala | 4 ++--
.../apache/pekko/stream/tck/MaybeSourceTest.scala | 4 ++--
.../tck/PekkoIdentityProcessorVerification.scala | 7 +++---
.../stream/tck/PekkoPublisherVerification.scala | 10 ++++----
.../stream/tck/PekkoSubscriberVerification.scala | 7 +++---
.../pekko/stream/tck/PrefixAndTailTest.scala | 4 ++--
.../pekko/stream/tck/SingleElementSourceTest.scala | 4 ++--
.../pekko/stream/tck/SinkholeSubscriberTest.scala | 7 +++---
.../apache/pekko/stream/tck/SplitWhenTest.scala | 4 ++--
.../pekko/stream/tck/TransformProcessorTest.scala | 4 ++--
.../pekko/stream/tck/VirtualPublisherTest.scala | 4 ++--
.../pekko/stream/impl/SubInletOutletSpec.scala | 2 +-
.../pekko/stream/impl/TraversalBuilderSpec.scala | 8 +++----
.../stream/impl/fusing/AsyncCallbackSpec.scala | 6 ++---
.../stream/scaladsl/FlowCollectFirstSpec.scala | 2 +-
.../pekko/stream/scaladsl/FlowDispatcherSpec.scala | 2 +-
.../stream/scaladsl/FlowDropRepeatedSpec.scala | 4 ++--
.../FlowFlatMapConcatParallelismSpec.scala | 18 +++++++--------
.../FlowGroupedAdjacentByWeightedSpec.scala | 2 +-
.../pekko/stream/scaladsl/FlowSwitchSpec.scala | 6 ++---
.../stream/scaladsl/FlowWithContextSpec.scala | 5 ++--
.../stream/scaladsl/SourceWithContextSpec.scala | 5 ++--
.../stream/scaladsl/StreamConvertersSpec.scala | 2 +-
.../pekko/stream/MapAsyncPartitionedSpec.scala | 21 +++++++++--------
.../pekko/stream/typed/javadsl/ActorFlow.scala | 4 ++--
.../pekko/stream/typed/scaladsl/ActorFlow.scala | 3 ++-
.../typed/scaladsl/ActorSourceSinkSpec.scala | 4 ++--
.../typed/scaladsl/MaterializerForTypedSpec.scala | 4 +++-
.../pekko/stream/typed/scaladsl/PubSubSpec.scala | 1 +
.../pekko/stream/javadsl/CollectionUtil.scala | 2 +-
.../scala/org/apache/pekko/stream/Attributes.scala | 4 ++--
.../apache/pekko/stream/MapAsyncPartitioned.scala | 2 +-
.../org/apache/pekko/stream/RestartSettings.scala | 4 ++--
.../main/scala/org/apache/pekko/stream/Shape.scala | 2 +-
.../apache/pekko/stream/SystemMaterializer.scala | 2 +-
.../pekko/stream/impl/JavaStreamSource.scala | 6 ++---
.../org/apache/pekko/stream/impl/MaybeSource.scala | 2 +-
.../scala/org/apache/pekko/stream/impl/Sinks.scala | 2 +-
.../stream/impl/UnfoldResourceSourceAsync.scala | 2 +-
.../pekko/stream/impl/fusing/DropRepeated.scala | 6 ++---
.../pekko/stream/impl/fusing/FlattenConcat.scala | 10 ++++----
.../pekko/stream/impl/fusing/FutureFlow.scala | 2 +-
.../pekko/stream/impl/fusing/GraphStages.scala | 2 +-
.../impl/fusing/GroupedAdjacentByWeighted.scala | 6 ++---
.../stream/impl/fusing/LazyFutureSource.scala | 2 +-
.../org/apache/pekko/stream/impl/fusing/Ops.scala | 1 +
.../pekko/stream/impl/fusing/StreamOfStreams.scala | 2 +-
.../apache/pekko/stream/impl/fusing/Switch.scala | 2 +-
.../pekko/stream/impl/io/FileOutputStage.scala | 2 +-
.../apache/pekko/stream/impl/io/TcpStages.scala | 2 +-
.../pekko/stream/javadsl/DelayStrategy.scala | 2 +-
.../org/apache/pekko/stream/javadsl/FileIO.scala | 3 ++-
.../org/apache/pekko/stream/javadsl/Flow.scala | 11 +++++----
.../pekko/stream/javadsl/FlowWithContext.scala | 8 +++----
.../org/apache/pekko/stream/javadsl/Graph.scala | 2 +-
.../org/apache/pekko/stream/javadsl/Hub.scala | 2 +-
.../apache/pekko/stream/javadsl/MergeLatest.scala | 3 ++-
.../org/apache/pekko/stream/javadsl/Queue.scala | 6 ++---
.../apache/pekko/stream/javadsl/RetryFlow.scala | 5 ++--
.../org/apache/pekko/stream/javadsl/Sink.scala | 6 ++---
.../org/apache/pekko/stream/javadsl/Source.scala | 12 +++++-----
.../pekko/stream/javadsl/SourceWithContext.scala | 8 +++----
.../javadsl/StatefulMapConcatAccumulator.scala | 7 +++---
.../pekko/stream/javadsl/StreamConverters.scala | 3 ++-
.../org/apache/pekko/stream/javadsl/SubFlow.scala | 10 ++++----
.../apache/pekko/stream/javadsl/SubSource.scala | 10 ++++----
.../org/apache/pekko/stream/javadsl/Tcp.scala | 10 ++++----
.../pekko/stream/scaladsl/FlowWithContext.scala | 2 +-
.../pekko/stream/scaladsl/FlowWithContextOps.scala | 2 +-
.../org/apache/pekko/stream/scaladsl/Hub.scala | 4 +++-
.../org/apache/pekko/stream/scaladsl/Queue.scala | 6 ++---
.../org/apache/pekko/stream/scaladsl/Sink.scala | 2 +-
.../org/apache/pekko/stream/scaladsl/Source.scala | 2 +-
.../org/apache/pekko/stream/scaladsl/SubFlow.scala | 4 ++--
.../org/apache/pekko/stream/scaladsl/Tcp.scala | 2 +-
.../org/apache/pekko/stream/scaladsl/package.scala | 1 -
.../org/apache/pekko/stream/stage/GraphStage.scala | 3 +--
.../pekko/testkit/CallingThreadDispatcher.scala | 4 ++--
.../testkit/ExplicitlyTriggeredScheduler.scala | 6 ++---
.../org/apache/pekko/testkit/TestActorRef.scala | 3 +--
.../scala/org/apache/pekko/testkit/TestKit.scala | 3 +--
.../apache/pekko/testkit/TestKitExtension.scala | 4 ++--
.../org/apache/pekko/testkit/javadsl/TestKit.scala | 4 ++--
.../apache/pekko/testkit/DefaultTimeoutSpec.scala | 4 ++--
.../apache/pekko/testkit/ImplicitSenderSpec.scala | 4 ++--
.../scala/org/apache/pekko/testkit/PekkoSpec.scala | 21 +++++++++--------
.../org/apache/pekko/testkit/PekkoSpecSpec.scala | 12 +++++-----
.../apache/pekko/testkit/TestActorRefSpec.scala | 4 ++--
.../org/apache/pekko/testkit/TestProbeSpec.scala | 4 ++--
.../apache/pekko/testkit/WithLogCapturing.scala | 4 ++--
.../testkit/metrics/FileDescriptorMetricSet.scala | 4 ++--
.../apache/pekko/testkit/metrics/MetricsKit.scala | 10 ++++----
.../pekko/testkit/metrics/MetricsKitOps.scala | 1 +
.../pekko/testkit/metrics/MetricsKitSpec.scala | 3 ++-
1157 files changed, 3299 insertions(+), 2721 deletions(-)
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala
index 13c06cac00..836156e042 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/CapturedLogEvent.scala
@@ -15,14 +15,15 @@ package org.apache.pekko.actor.testkit.typed
import java.util.Optional
-import org.slf4j.Marker
-import org.slf4j.event.Level
+import scala.jdk.OptionConverters._
import org.apache.pekko
import pekko.annotation.InternalApi
-import scala.jdk.OptionConverters._
import pekko.util.OptionVal
+import org.slf4j.Marker
+import org.slf4j.event.Level
+
/**
* Representation of a Log Event issued by a [[pekko.actor.typed.Behavior]]
* when testing with [[pekko.actor.testkit.typed.scaladsl.BehaviorTestKit]]
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala
index 10bcdba274..51f57c6514 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/Effect.scala
@@ -14,12 +14,12 @@
package org.apache.pekko.actor.testkit.typed
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.typed.{ ActorRef, Behavior, Props }
import pekko.annotation.{ DoNotInherit, InternalApi }
import pekko.util.FunctionConverters._
-import scala.jdk.DurationConverters._
import pekko.util.unused
/**
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/LoggingEvent.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/LoggingEvent.scala
index 6fd5c79ad8..87a03768e8 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/LoggingEvent.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/LoggingEvent.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.actor.testkit.typed
import java.util.Optional
-import org.slf4j.Marker
-import org.slf4j.event.Level
-
import scala.jdk.CollectionConverters._
import scala.jdk.OptionConverters._
+import org.slf4j.Marker
+import org.slf4j.event.Level
+
object LoggingEvent {
/**
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala
index 69818c9715..42251512a3 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/TestKitSettings.scala
@@ -14,16 +14,16 @@
package org.apache.pekko.actor.testkit.typed
import scala.concurrent.duration.{ Duration, FiniteDuration }
-
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.typed.ActorSystem
import pekko.actor.typed.Extension
import pekko.actor.typed.ExtensionId
-import scala.jdk.DurationConverters._
import pekko.util.Timeout
+import com.typesafe.config.Config
+
object TestKitSettings {
/**
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala
index ac4f841b57..325cfb89c4 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/ActorSystemStub.scala
@@ -14,11 +14,11 @@
package org.apache.pekko.actor.testkit.typed.internal
import java.util.concurrent.{ CompletionStage, ThreadFactory }
-import scala.concurrent._
+
import scala.annotation.nowarn
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+import scala.concurrent._
+import scala.jdk.FutureConverters._
+
import org.apache.pekko
import pekko.{ actor => classic }
import pekko.Done
@@ -37,7 +37,11 @@ import pekko.actor.typed.internal.ActorRefImpl
import pekko.actor.typed.internal.InternalRecipientRef
import pekko.actor.typed.receptionist.Receptionist
import pekko.annotation.InternalApi
-import scala.jdk.FutureConverters._
+
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import com.typesafe.config.{ Config, ConfigFactory }
/**
* INTERNAL API
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
index 0b5e0e7027..29e3c371cb 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/BehaviorTestKitImpl.scala
@@ -17,19 +17,20 @@ import java.util
import scala.annotation.tailrec
import scala.collection.immutable
+import scala.jdk.CollectionConverters._
import scala.reflect.ClassTag
import scala.util.control.Exception.Catcher
import scala.util.control.NonFatal
+
import org.apache.pekko
import pekko.actor.ActorPath
import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect }
import pekko.actor.testkit.typed.Effect._
-import pekko.actor.typed.internal.AdaptWithRegisteredMessageAdapter
import pekko.actor.typed.{ ActorRef, Behavior, BehaviorInterceptor, PostStop, Signal, TypedActorContext }
+import pekko.actor.typed.internal.AdaptWithRegisteredMessageAdapter
import pekko.actor.typed.receptionist.Receptionist
import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.InternalApi
-import scala.jdk.CollectionConverters._
/**
* INTERNAL API
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala
index 67e24c75e4..ed2b47bea5 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/EffectfulActorContext.scala
@@ -15,17 +15,17 @@ package org.apache.pekko.actor.testkit.typed.internal
import java.util.concurrent.ConcurrentLinkedQueue
+import scala.concurrent.duration.FiniteDuration
+import scala.reflect.ClassTag
+
import org.apache.pekko
+import pekko.actor.{ ActorPath, Cancellable }
import pekko.actor.testkit.typed.Effect
import pekko.actor.testkit.typed.Effect._
-import pekko.actor.typed.internal.TimerSchedulerCrossDslSupport
import pekko.actor.typed.{ ActorRef, Behavior, Props }
-import pekko.actor.{ ActorPath, Cancellable }
+import pekko.actor.typed.internal.TimerSchedulerCrossDslSupport
import pekko.annotation.InternalApi
-import scala.concurrent.duration.FiniteDuration
-import scala.reflect.ClassTag
-
/**
* INTERNAL API
*/
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LogbackUtil.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LogbackUtil.scala
index 4e7cd82f31..d0c2c538e3 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LogbackUtil.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LogbackUtil.scala
@@ -13,11 +13,12 @@
package org.apache.pekko.actor.testkit.typed.internal
-import org.slf4j.LoggerFactory
-import org.slf4j.event.Level
+import scala.annotation.tailrec
+
import org.apache.pekko.annotation.InternalApi
-import scala.annotation.tailrec
+import org.slf4j.LoggerFactory
+import org.slf4j.event.Level
/**
* INTERNAL API
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala
index 0c4b5568e6..d2187e9176 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/LoggingTestKitImpl.scala
@@ -19,8 +19,6 @@ import scala.concurrent.duration.Duration
import scala.reflect.ClassTag
import scala.util.matching.Regex
-import org.slf4j.event.Level
-
import org.apache.pekko
import pekko.actor.testkit.typed.LoggingEvent
import pekko.actor.testkit.typed.TestKitSettings
@@ -30,6 +28,8 @@ import pekko.actor.typed.ActorSystem
import pekko.annotation.InternalApi
import pekko.testkit.TestKit
+import org.slf4j.event.Level
+
/**
* INTERNAL API
*/
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala
index 6a0450fefd..4bf7f51746 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/StubbedActorContext.scala
@@ -13,22 +13,24 @@
package org.apache.pekko.actor.testkit.typed.internal
+import java.util.concurrent.ThreadLocalRandom.{ current => rnd }
+
+import scala.collection.immutable.TreeMap
+import scala.concurrent.ExecutionContextExecutor
+import scala.concurrent.duration.FiniteDuration
+
import org.apache.pekko
+import pekko.{ actor => classic }
+import pekko.actor.{ ActorPath, ActorRefProvider, InvalidMessageException }
import pekko.actor.testkit.typed.CapturedLogEvent
import pekko.actor.typed._
import pekko.actor.typed.internal._
-import pekko.actor.{ ActorPath, ActorRefProvider, InvalidMessageException }
import pekko.annotation.InternalApi
import pekko.util.Helpers
-import pekko.{ actor => classic }
+
import org.slf4j.{ Logger, Marker }
import org.slf4j.helpers.{ MessageFormatter, SubstituteLoggerFactory }
-import java.util.concurrent.ThreadLocalRandom.{ current => rnd }
-import scala.collection.immutable.TreeMap
-import scala.concurrent.ExecutionContextExecutor
-import scala.concurrent.duration.FiniteDuration
-
/**
* INTERNAL API
*
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala
index 8b143ad6e7..917ed1119b 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestAppender.scala
@@ -13,15 +13,17 @@
package org.apache.pekko.actor.testkit.typed.internal
+import java.util.Collections
+
import ch.qos.logback.classic.spi.ILoggingEvent
import ch.qos.logback.classic.spi.ThrowableProxy
import ch.qos.logback.core.AppenderBase
-import org.slf4j.{ MDC, Marker }
+
import org.apache.pekko
import pekko.actor.testkit.typed.LoggingEvent
import pekko.annotation.InternalApi
-import java.util.Collections
+import org.slf4j.{ MDC, Marker }
/**
* INTERNAL API
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala
index d4b9f75d08..1bb38e9e93 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/internal/TestProbeImpl.scala
@@ -22,6 +22,8 @@ import java.util.function.Supplier
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.duration._
+import scala.jdk.CollectionConverters._
+import scala.jdk.DurationConverters._
import scala.reflect.ClassTag
import scala.util.control.NonFatal
@@ -43,9 +45,7 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.InternalApi
import pekko.japi.function.Creator
import pekko.util.BoxedType
-import scala.jdk.DurationConverters._
import pekko.util.PrettyDuration._
-import scala.jdk.CollectionConverters._
@InternalApi
private[pekko] object TestProbeImpl {
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala
index 093e95294c..bbc650021b 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ActorTestKit.scala
@@ -15,7 +15,7 @@ package org.apache.pekko.actor.testkit.typed.javadsl
import java.time.Duration
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.DeadLetter
@@ -29,9 +29,10 @@ import pekko.actor.typed.ActorSystem
import pekko.actor.typed.Behavior
import pekko.actor.typed.Props
import pekko.actor.typed.Scheduler
-import scala.jdk.DurationConverters._
import pekko.util.Timeout
+import com.typesafe.config.Config
+
object ActorTestKit {
/**
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala
index 385b6549e2..20909fc06b 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/BehaviorTestKit.scala
@@ -13,15 +13,16 @@
package org.apache.pekko.actor.testkit.typed.javadsl
+import java.util.concurrent.ThreadLocalRandom
+
import org.apache.pekko
-import pekko.actor.testkit.typed.internal.{ ActorSystemStub, BehaviorTestKitImpl }
import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect }
-import pekko.actor.typed.receptionist.Receptionist
+import pekko.actor.testkit.typed.internal.{ ActorSystemStub, BehaviorTestKitImpl }
import pekko.actor.typed.{ ActorRef, Behavior, Signal }
+import pekko.actor.typed.receptionist.Receptionist
import pekko.annotation.{ ApiMayChange, DoNotInherit }
-import com.typesafe.config.Config
-import java.util.concurrent.ThreadLocalRandom
+import com.typesafe.config.Config
object BehaviorTestKit {
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala
index 5bbedea2ad..ad7d77d4a4 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/Effects.scala
@@ -15,9 +15,10 @@ package org.apache.pekko.actor.testkit.typed.javadsl
import java.time.Duration
+import scala.jdk.DurationConverters._
+
import org.apache.pekko
import pekko.actor.typed.{ ActorRef, Behavior, Props }
-import scala.jdk.DurationConverters._
/**
* Factories for behavior effects for [[BehaviorTestKit]], each effect has a suitable equals and can be used to compare
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala
index ac3ae80e6e..cb6558b013 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/JUnit5TestKitBuilder.scala
@@ -18,11 +18,12 @@
package org.apache.pekko.actor.testkit.typed.javadsl
import org.apache.pekko
-import com.typesafe.config.Config
import pekko.actor.testkit.typed.internal.TestKitUtils
import pekko.actor.testkit.typed.scaladsl.ActorTestKit.ApplicationTestConfig
import pekko.actor.typed.ActorSystem
+import com.typesafe.config.Config
+
final class JUnit5TestKitBuilder() {
var system: Option[ActorSystem[_]] = None
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala
index 57028154c0..e8b670504f 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturing.scala
@@ -18,10 +18,11 @@ import scala.util.control.NonFatal
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
-import org.slf4j.LoggerFactory
import org.apache.pekko.actor.testkit.typed.internal.CapturingAppender
+import org.slf4j.LoggerFactory
+
/**
* JUnit `TestRule` to make log lines appear only when the test failed.
*
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala
index e4fd37c41e..01586dc983 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LogCapturingExtension.scala
@@ -9,13 +9,16 @@
package org.apache.pekko.actor.testkit.typed.javadsl
-import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation
+import java.lang.reflect.Method
+
+import scala.util.control.NonFatal
+
import org.junit.jupiter.api.extension.{ ExtensionContext, InvocationInterceptor, ReflectiveInvocationContext }
-import org.slf4j.LoggerFactory
+import org.junit.jupiter.api.extension.InvocationInterceptor.Invocation
+
import org.apache.pekko.actor.testkit.typed.internal.CapturingAppender
-import java.lang.reflect.Method
-import scala.util.control.NonFatal
+import org.slf4j.LoggerFactory
final class LogCapturingExtension extends InvocationInterceptor {
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala
index 63432d9e96..d8a7723722 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala
@@ -15,14 +15,14 @@ package org.apache.pekko.actor.testkit.typed.javadsl
import java.util.function.Supplier
-import org.slf4j.event.Level
-
import org.apache.pekko
import pekko.actor.testkit.typed.LoggingEvent
import pekko.actor.testkit.typed.internal.LoggingTestKitImpl
import pekko.actor.typed.ActorSystem
import pekko.annotation.DoNotInherit
+import org.slf4j.event.Level
+
/**
* Facilities for verifying logs.
*
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala
index 7d7a7bda7a..896932a58f 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/ManualTime.scala
@@ -16,13 +16,13 @@ package org.apache.pekko.actor.testkit.typed.javadsl
import java.time.Duration
import scala.annotation.varargs
-
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.typed.ActorSystem
import pekko.actor.typed.internal.adapter.SchedulerAdapter
-import scala.jdk.DurationConverters._
+
+import com.typesafe.config.Config
/**
* Manual time allows you to do async tests while controlling the scheduler of the system.
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala
index dbf462f0c5..ca3ff85c4e 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestInbox.scala
@@ -16,12 +16,12 @@ package org.apache.pekko.actor.testkit.typed.javadsl
import java.util.concurrent.ThreadLocalRandom
import scala.collection.immutable
+import scala.jdk.CollectionConverters._
import org.apache.pekko
import pekko.actor.testkit.typed.internal.TestInboxImpl
import pekko.actor.typed.ActorRef
import pekko.annotation.DoNotInherit
-import scala.jdk.CollectionConverters._
object TestInbox {
import pekko.actor.testkit.typed.scaladsl.TestInbox.address
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala
index 50d63af760..9dc544b0b0 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJUnit5Extension.scala
@@ -17,10 +17,11 @@
package org.apache.pekko.actor.testkit.typed.javadsl
-import org.apache.pekko.actor.testkit.typed.annotations.JUnit5TestKit
import org.junit.jupiter.api.extension.{ AfterAllCallback, BeforeTestExecutionCallback, ExtensionContext }
import org.junit.platform.commons.support.AnnotationSupport
+import org.apache.pekko.actor.testkit.typed.annotations.JUnit5TestKit
+
final class TestKitJUnit5Extension() extends AfterAllCallback with BeforeTestExecutionCallback {
var testKit: Option[ActorTestKit] = None
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala
index ad7e445b6b..3c240c662f 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestKitJunitResource.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.actor.testkit.typed.javadsl
import java.time.Duration
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
import org.junit.Rule
import org.junit.rules.ExternalResource
@@ -33,6 +31,9 @@ import pekko.actor.typed.Props
import pekko.actor.typed.Scheduler
import pekko.util.Timeout
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
/**
* A Junit external resource for the [[ActorTestKit]], making it possible to have Junit manage the lifecycle of the testkit.
* The testkit will be automatically shut down when the test completes or fails.
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala
index 1d7bf62122..b93c6f321d 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/javadsl/TestProbe.scala
@@ -18,7 +18,6 @@ import java.util.{ List => JList }
import java.util.function.Supplier
import org.apache.pekko
-import pekko.japi.function.Creator
import pekko.actor.testkit.typed.FishingOutcome
import pekko.actor.testkit.typed.TestKitSettings
import pekko.actor.testkit.typed.internal.TestProbeImpl
@@ -27,6 +26,7 @@ import pekko.actor.typed.ActorSystem
import pekko.actor.typed.RecipientRef
import pekko.actor.typed.internal.InternalRecipientRef
import pekko.annotation.DoNotInherit
+import pekko.japi.function.Creator
import pekko.util.unused
object FishingOutcomes {
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala
index ffad923a50..2d1fb7be35 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKit.scala
@@ -20,10 +20,6 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import scala.reflect.ClassTag
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.slf4j.LoggerFactory
-
import org.apache.pekko
import pekko.actor.DeadLetter
import pekko.actor.DeadLetterSuppression
@@ -43,6 +39,11 @@ import pekko.actor.typed.scaladsl.adapter._
import pekko.annotation.InternalApi
import pekko.util.Timeout
+import org.slf4j.LoggerFactory
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object ActorTestKit {
private val testKitGuardianCounter = new AtomicInteger(0)
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala
index a9f6b1afe5..357f3c5f7b 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitBase.scala
@@ -13,9 +13,6 @@
package org.apache.pekko.actor.testkit.typed.scaladsl
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.DeadLetter
import pekko.actor.Dropped
@@ -28,6 +25,9 @@ import pekko.actor.typed.Behavior
import pekko.actor.typed.Props
import pekko.util.Timeout
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object ActorTestKitBase {
@noinline def testNameFromCallStack(): String = TestKitUtils.testNameFromCallStack(classOf[ActorTestKitBase])
}
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala
index a69b05778b..9dd5efe821 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKit.scala
@@ -13,17 +13,19 @@
package org.apache.pekko.actor.testkit.typed.scaladsl
+import java.util.concurrent.ThreadLocalRandom
+
+import scala.collection.immutable
+import scala.reflect.ClassTag
+
import org.apache.pekko
-import pekko.actor.testkit.typed.internal.{ ActorSystemStub, BehaviorTestKitImpl }
import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect }
-import pekko.actor.typed.receptionist.Receptionist
+import pekko.actor.testkit.typed.internal.{ ActorSystemStub, BehaviorTestKitImpl }
import pekko.actor.typed.{ ActorRef, Behavior, Signal, TypedActorContext }
+import pekko.actor.typed.receptionist.Receptionist
import pekko.annotation.{ ApiMayChange, DoNotInherit }
-import com.typesafe.config.Config
-import java.util.concurrent.ThreadLocalRandom
-import scala.collection.immutable
-import scala.reflect.ClassTag
+import com.typesafe.config.Config
@ApiMayChange
object BehaviorTestKit {
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LogCapturing.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LogCapturing.scala
index 9241c9fdcb..334fceb714 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LogCapturing.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LogCapturing.scala
@@ -15,12 +15,13 @@ package org.apache.pekko.actor.testkit.typed.scaladsl
import scala.util.control.NonFatal
+import org.apache.pekko.actor.testkit.typed.internal.CapturingAppender
+
import org.scalatest.BeforeAndAfterAll
import org.scalatest.Outcome
import org.scalatest.TestSuite
-import org.slf4j.LoggerFactory
-import org.apache.pekko.actor.testkit.typed.internal.CapturingAppender
+import org.slf4j.LoggerFactory
/**
* Mixin this trait to a ScalaTest test to make log lines appear only when the test failed.
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala
index 26c2ed13da..23d238c0b6 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala
@@ -15,14 +15,14 @@ package org.apache.pekko.actor.testkit.typed.scaladsl
import scala.reflect.ClassTag
-import org.slf4j.event.Level
-
import org.apache.pekko
import pekko.actor.testkit.typed.LoggingEvent
import pekko.actor.testkit.typed.internal.LoggingTestKitImpl
import pekko.actor.typed.ActorSystem
import pekko.annotation.DoNotInherit
+import org.slf4j.event.Level
+
/**
* Facilities for verifying logs.
*
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala
index 2499cb683e..7074941447 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ManualTime.scala
@@ -16,12 +16,12 @@ package org.apache.pekko.actor.testkit.typed.scaladsl
import scala.annotation.varargs
import scala.concurrent.duration.{ Duration, FiniteDuration }
-import com.typesafe.config.{ Config, ConfigFactory }
-
import org.apache.pekko
import pekko.actor.typed.ActorSystem
import pekko.actor.typed.internal.adapter.SchedulerAdapter
+import com.typesafe.config.{ Config, ConfigFactory }
+
/**
* Manual time allows you to do async tests while controlling the scheduler of the system.
*
diff --git a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala
index ee244dff23..cfa2a49248 100644
--- a/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala
+++ b/actor-testkit-typed/src/main/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ScalaTestWithActorTestKit.scala
@@ -13,17 +13,18 @@
package org.apache.pekko.actor.testkit.typed.scaladsl
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
+import org.apache.pekko
+import pekko.actor.testkit.typed.TestKitSettings
+import pekko.actor.typed.ActorSystem
+
import org.scalatest.{ BeforeAndAfterAll, TestSuite }
import org.scalatest.concurrent.Eventually
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.matchers.should.Matchers
import org.scalatest.time.Span
-import org.apache.pekko
-import pekko.actor.testkit.typed.TestKitSettings
-import pekko.actor.typed.ActorSystem
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
/**
* A ScalaTest base class for the [[ActorTestKit]], making it possible to have ScalaTest manage the lifecycle of the testkit.
diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala
index c3cdc0eb79..5061ca4fe5 100644
--- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala
+++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/ActorTestKitSpec.scala
@@ -15,11 +15,6 @@ package org.apache.pekko.actor.testkit.typed.scaladsl
import scala.concurrent.Promise
-import com.typesafe.config.ConfigFactory
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
-
import org.apache.pekko
import pekko.Done
import pekko.actor.Dropped
@@ -29,6 +24,12 @@ import pekko.actor.typed.ActorSystem
import pekko.actor.typed.eventstream.EventStream
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.BeforeAndAfterAll
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
+
+import com.typesafe.config.ConfigFactory
+
class ActorTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
"the Scala testkit" should {
diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala
index f41be488a8..d5497952b1 100644
--- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala
+++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/BehaviorTestKitSpec.scala
@@ -13,22 +13,24 @@
package org.apache.pekko.actor.testkit.typed.scaladsl
+import scala.concurrent.duration.{ FiniteDuration, _ }
+import scala.reflect.ClassTag
+
import org.apache.pekko
import pekko.Done
import pekko.actor.Address
+import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect }
import pekko.actor.testkit.typed.Effect._
-import pekko.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.Parent._
import pekko.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.{ Child, Parent }
-import pekko.actor.testkit.typed.{ CapturedLogEvent, Effect }
+import pekko.actor.testkit.typed.scaladsl.BehaviorTestKitSpec.Parent._
+import pekko.actor.typed.{ ActorRef, Behavior, Props, Terminated }
import pekko.actor.typed.receptionist.{ Receptionist, ServiceKey }
import pekko.actor.typed.scaladsl.Behaviors
-import pekko.actor.typed.{ ActorRef, Behavior, Props, Terminated }
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import org.slf4j.event.Level
-import scala.concurrent.duration.{ FiniteDuration, _ }
-import scala.reflect.ClassTag
+import org.slf4j.event.Level
object BehaviorTestKitSpec {
object Parent {
diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala
index 15bc751dad..46b6e8ba69 100644
--- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala
+++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/JUnit5TestKitBuilderSpec.scala
@@ -18,11 +18,13 @@
package org.apache.pekko.actor.testkit.typed.scaladsl
import org.apache.pekko
-import pekko.actor.typed.ActorSystem
-import com.typesafe.config.ConfigFactory
import org.apache.pekko.actor.testkit.typed.javadsl.JUnit5TestKitBuilder
+import pekko.actor.typed.ActorSystem
+
import org.scalatest.wordspec.AnyWordSpec
+import com.typesafe.config.ConfigFactory
+
class JUnit5TestKitBuilderSpec extends AnyWordSpec {
"the JUnit5TestKitBuilder" should {
diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingEventFilterSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingEventFilterSpec.scala
index d695dff73b..45cf33530e 100644
--- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingEventFilterSpec.scala
+++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/LoggingEventFilterSpec.scala
@@ -13,10 +13,11 @@
package org.apache.pekko.actor.testkit.typed.scaladsl
+import org.apache.pekko.actor.testkit.typed.LoggingEvent
+
import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.event.Level
-import org.apache.pekko.actor.testkit.typed.LoggingEvent
+import org.slf4j.event.Level
class LoggingTestKitSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestAppenderSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestAppenderSpec.scala
index 10ea14dc4c..cbfa24cf41 100644
--- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestAppenderSpec.scala
+++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestAppenderSpec.scala
@@ -17,10 +17,11 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Future
+import org.apache.pekko.actor.testkit.typed.TestException
+
import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.LoggerFactory
-import org.apache.pekko.actor.testkit.typed.TestException
+import org.slf4j.LoggerFactory
class TestAppenderSpec
extends ScalaTestWithActorTestKit(
diff --git a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbeSpec.scala b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbeSpec.scala
index c74509c757..4935d54a15 100644
--- a/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbeSpec.scala
+++ b/actor-testkit-typed/src/test/scala/org/apache/pekko/actor/testkit/typed/scaladsl/TestProbeSpec.scala
@@ -15,10 +15,11 @@ package org.apache.pekko.actor.testkit.typed.scaladsl
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
+import org.apache.pekko.actor.typed.scaladsl.Behaviors
+
import org.scalatest.wordspec.AnyWordSpecLike
-import org.apache.pekko.actor.typed.scaladsl.Behaviors
+import com.typesafe.config.ConfigFactory
class TestProbeSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
diff --git a/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala b/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala
index 591b9e168b..98f7f213d7 100644
--- a/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala
+++ b/actor-tests/src/test/scala-2/org/apache/pekko/util/TypedMultiMapSpec.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.util
import org.scalactic.TypeCheckedTripleEquals
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
diff --git a/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ForkJoinPoolVirtualThreadSpec.scala b/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ForkJoinPoolVirtualThreadSpec.scala
index 1d4ca6db94..550f34ef90 100644
--- a/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ForkJoinPoolVirtualThreadSpec.scala
+++ b/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ForkJoinPoolVirtualThreadSpec.scala
@@ -17,12 +17,12 @@
package org.apache.pekko.dispatch
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.testkit.{ ImplicitSender, PekkoSpec }
+import com.typesafe.config.ConfigFactory
+
object ForkJoinPoolVirtualThreadSpec {
val config = ConfigFactory.parseString("""
|custom {
diff --git a/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ThreadPoolVirtualThreadSpec.scala b/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ThreadPoolVirtualThreadSpec.scala
index 583f911877..406730c233 100644
--- a/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ThreadPoolVirtualThreadSpec.scala
+++ b/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/ThreadPoolVirtualThreadSpec.scala
@@ -17,11 +17,12 @@
package org.apache.pekko.dispatch
-import com.typesafe.config.ConfigFactory
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.testkit.{ ImplicitSender, PekkoSpec }
+import com.typesafe.config.ConfigFactory
+
object ThreadPoolVirtualThreadSpec {
val config = ConfigFactory.parseString("""
|custom {
diff --git a/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/VirtualThreadPoolDispatcherSpec.scala b/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/VirtualThreadPoolDispatcherSpec.scala
index 3050d70db5..2c8266c6fa 100644
--- a/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/VirtualThreadPoolDispatcherSpec.scala
+++ b/actor-tests/src/test/scala-jdk21-only/org/apache/pekko/dispatch/VirtualThreadPoolDispatcherSpec.scala
@@ -17,12 +17,12 @@
package org.apache.pekko.dispatch
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.testkit.{ ImplicitSender, PekkoSpec }
+import com.typesafe.config.ConfigFactory
+
object VirtualThreadPoolDispatcherSpec {
val config = ConfigFactory.parseString("""
|virtual-thread-dispatcher {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/PekkoExceptionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/PekkoExceptionSpec.scala
index 79439d1cb4..8a0ec42f9a 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/PekkoExceptionSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/PekkoExceptionSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko
+import org.apache.pekko.actor._
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import org.apache.pekko.actor._
-
/**
* A spec that verified that the PekkoException has at least a single argument constructor of type String.
*
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala
index 6bcd2a1c44..cf47b35b54 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorConfigurationVerificationSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.actor
import scala.concurrent.duration._
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.routing._
@@ -24,6 +22,8 @@ import pekko.testkit._
import pekko.testkit.DefaultTimeout
import pekko.testkit.TestEvent._
+import org.scalatest.BeforeAndAfterEach
+
object ActorConfigurationVerificationSpec {
class TestActor extends Actor {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala
index d09e922191..606e6f22f1 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorCreationPerfSpec.scala
@@ -16,14 +16,16 @@ package org.apache.pekko.actor
import scala.concurrent.duration._
import com.codahale.metrics.Histogram
-import com.typesafe.config.ConfigFactory
-import org.scalatest.BeforeAndAfterAll
import org.apache.pekko
import pekko.testkit.{ ImplicitSender, PekkoSpec, PerformanceTest }
import pekko.testkit.metrics._
import pekko.testkit.metrics.HeapMemoryUsage
+import org.scalatest.BeforeAndAfterAll
+
+import com.typesafe.config.ConfigFactory
+
object ActorCreationPerfSpec {
val config = ConfigFactory.parseString("""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala
index 24f4bd18c8..9ae6d2480e 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorLifeCycleSpec.scala
@@ -19,13 +19,13 @@ import java.util.concurrent.atomic._
import scala.concurrent.{ Await, Future }
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.actor.Actor._
import pekko.pattern.ask
import pekko.testkit._
+import org.scalatest.BeforeAndAfterEach
+
object ActorLifeCycleSpec {
class LifeCycleTestActor(testActor: ActorRef, id: String, generationProvider: AtomicInteger) extends Actor {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala
index 99222249ff..2d49a608d1 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorMailboxSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.actor
import scala.concurrent.duration.{ Duration, FiniteDuration }
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.dispatch._
@@ -25,6 +22,9 @@ import pekko.testkit._
import pekko.util.Helpers.ConfigOps
import pekko.util.unused
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object ActorMailboxSpec {
val mailboxConf = ConfigFactory.parseString(s"""
unbounded-dispatcher {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala
index 82620268eb..26593792f0 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemDispatcherSpec.scala
@@ -16,14 +16,14 @@ package org.apache.pekko.actor
import scala.concurrent.ExecutionContext
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor.setup.ActorSystemSetup
import pekko.dispatch.{ Dispatchers, ExecutionContexts }
import pekko.testkit.{ ImplicitSender, PekkoSpec, TestActors, TestProbe }
+import com.typesafe.config.ConfigFactory
+
object ActorSystemDispatchersSpec {
class SnitchingExecutionContext(testActor: ActorRef, underlying: ExecutionContext) extends ExecutionContext {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala
index 0e9f7e29f7..8b51fe9e2e 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorSystemSpec.scala
@@ -16,11 +16,10 @@ package org.apache.pekko.actor
import java.util.concurrent.{ ConcurrentLinkedQueue, RejectedExecutionException }
import java.util.concurrent.atomic.AtomicInteger
+import scala.annotation.nowarn
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
-import scala.annotation.nowarn
-import com.typesafe.config.{ Config, ConfigFactory }
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.apache.pekko
@@ -32,6 +31,8 @@ import pekko.testkit.{ TestKit, _ }
import pekko.util.{ Switch, Timeout }
import pekko.util.Helpers.ConfigOps
+import com.typesafe.config.{ Config, ConfigFactory }
+
object ActorSystemSpec {
class Waves extends Actor {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala
index f179d807d3..bcc8c37e7f 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithBoundedStashSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.actor
import scala.concurrent.duration._
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.actor.ActorSystem.Settings
import pekko.dispatch.BoundedDequeBasedMailbox
@@ -26,6 +23,10 @@ import pekko.testkit.DefaultTimeout
import pekko.testkit.TestEvent._
import pekko.util.unused
+import org.scalatest.BeforeAndAfterEach
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
object ActorWithBoundedStashSpec {
class StashingActor extends Actor with Stash {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala
index 25526c80b5..c31c81c294 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ActorWithStashSpec.scala
@@ -13,18 +13,18 @@
package org.apache.pekko.actor
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
-import scala.annotation.nowarn
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.pattern.ask
import pekko.testkit._
import pekko.testkit.DefaultTimeout
import pekko.testkit.TestEvent._
+import org.scalatest.BeforeAndAfterEach
+
object ActorWithStashSpec {
class StashingActor extends Actor with Stash {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala
index 9cb9e5ca75..f2dfe81ba6 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/CoordinatedShutdownSpec.scala
@@ -13,26 +13,28 @@
package org.apache.pekko.actor
+import java.util.concurrent.Executors
+import java.util.concurrent.TimeoutException
+
+import scala.concurrent.Await
+import scala.concurrent.ExecutionContext
+import scala.concurrent.Future
+import scala.concurrent.Promise
+import scala.concurrent.duration._
+
import org.apache.pekko
import pekko.ConfigurationException
import pekko.Done
import pekko.actor.CoordinatedShutdown.Phase
import pekko.actor.CoordinatedShutdown.UnknownReason
-import pekko.testkit.PekkoSpec
import pekko.testkit.EventFilter
+import pekko.testkit.PekkoSpec
import pekko.testkit.TestKit
import pekko.testkit.TestProbe
+
import com.typesafe.config.Config
import com.typesafe.config.ConfigFactory
-import java.util.concurrent.Executors
-import java.util.concurrent.TimeoutException
-import scala.concurrent.duration._
-import scala.concurrent.Await
-import scala.concurrent.ExecutionContext
-import scala.concurrent.Future
-import scala.concurrent.Promise
-
class CoordinatedShutdownSpec
extends PekkoSpec(ConfigFactory.parseString("""
pekko.loglevel=INFO
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala
index 22a777057b..3d6b03945a 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSupressionSpec.scala
@@ -17,8 +17,8 @@ import scala.concurrent.duration._
import org.apache.pekko
import pekko.event.Logging
-import pekko.testkit.PekkoSpec
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
import pekko.testkit.TestActors
import pekko.testkit.TestProbe
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala
index 2b05e6199c..a05548c883 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeadLetterSuspensionSpec.scala
@@ -14,9 +14,9 @@
package org.apache.pekko.actor
import org.apache.pekko
-import pekko.testkit.PekkoSpec
import pekko.testkit.EventFilter
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
import pekko.testkit.TestActors
object DeadLetterSuspensionSpec {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala
index 835f277f3e..60b15f3d17 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeathWatchSpec.scala
@@ -13,11 +13,10 @@
package org.apache.pekko.actor
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.actor.Props.EmptyActor
import pekko.dispatch.sysmsg.{ DeathWatchNotification, Failed }
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala
index 1a49950f88..511823bb4c 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/DeployerSpec.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.actor
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import com.typesafe.config.ConfigParseOptions
-
import org.apache.pekko
import pekko.routing._
import pekko.testkit.PekkoSpec
+import com.typesafe.config.ConfigFactory
+import com.typesafe.config.ConfigParseOptions
+
object DeployerSpec {
val deployerConf = ConfigFactory.parseString(
"""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala
index 28975a7f23..18707cd610 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ExtensionSpec.scala
@@ -17,14 +17,15 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.util.control.NoStackTrace
-import com.typesafe.config.ConfigFactory
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.testkit.EventFilter
import pekko.testkit.TestKit._
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
+import com.typesafe.config.ConfigFactory
+
object TestExtension extends ExtensionId[TestExtension] with ExtensionIdProvider {
def lookup = this
def createExtension(s: ExtendedActorSystem) = new TestExtension(s)
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala
index ecc8579999..06d8e3db39 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/FSMActorSpec.scala
@@ -16,13 +16,13 @@ package org.apache.pekko.actor
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.event._
import pekko.testkit._
import pekko.util.{ unused, Timeout }
+import com.typesafe.config.ConfigFactory
+
object FSMActorSpec {
class Latches(implicit system: ActorSystem) {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala
index 11ddaf7acd..c897f26df1 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/FunctionRefSpec.scala
@@ -15,9 +15,9 @@ package org.apache.pekko.actor
import org.apache.pekko
import pekko.actor.dungeon.SerializationCheckFailedException
-import pekko.testkit.PekkoSpec
import pekko.testkit.EventFilter
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
object FunctionRefSpec {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala
index 5876747385..b0fe725657 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/LocalActorRefProviderSpec.scala
@@ -13,14 +13,13 @@
package org.apache.pekko.actor
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.util.Failure
import scala.util.Success
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.testkit._
import pekko.util.Timeout
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala
index 745094fee6..efc3b8d9f5 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/ProviderSelectionSpec.scala
@@ -13,14 +13,14 @@
package org.apache.pekko.actor
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.ActorSystem.Settings
import pekko.actor.ActorSystem.findClassLoader
import pekko.actor.setup.ActorSystemSetup
import pekko.testkit.AbstractSpec
+import com.typesafe.config.ConfigFactory
+
class ProviderSelectionSpec extends AbstractSpec {
import ProviderSelection.{ ClusterActorRefProvider, RemoteActorRefProvider }
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala
index 3fd012f554..891a5f2995 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/RestartStrategySpec.scala
@@ -15,16 +15,15 @@ package org.apache.pekko.actor
import java.lang.Thread.sleep
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.pattern.ask
-import pekko.testkit.PekkoSpec
import pekko.testkit.DefaultTimeout
import pekko.testkit.EventFilter
+import pekko.testkit.PekkoSpec
import pekko.testkit.TestEvent._
import pekko.testkit.TestLatch
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala
index f9e30481f9..9d6cc95a15 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SchedulerSpec.scala
@@ -17,6 +17,7 @@ import java.io.Closeable
import java.util.concurrent._
import java.util.concurrent.ThreadLocalRandom
+import scala.annotation.nowarn
import scala.concurrent.{ Await, ExecutionContext, Future }
import scala.concurrent.duration._
import scala.util.Try
@@ -24,15 +25,16 @@ import scala.util.control.NoStackTrace
import scala.util.control.NonFatal
import atomic.{ AtomicInteger, AtomicReference }
-import scala.annotation.nowarn
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.BeforeAndAfterEach
import org.apache.pekko
import pekko.pattern.ask
import pekko.testkit._
import pekko.util.Helpers
+import org.scalatest.BeforeAndAfterEach
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
object SchedulerSpec {
val testConfRevolver =
ConfigFactory.parseString("""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala
index edbee05493..8e7daa5ce7 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorHierarchySpec.scala
@@ -19,14 +19,13 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit }
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicInteger
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.Random
import scala.util.control.NoStackTrace
import SupervisorStrategy.{ Directive, Restart, Resume, Stop }
-import scala.annotation.nowarn
-import com.typesafe.config.{ Config, ConfigFactory }
import org.apache.pekko
import pekko.actor.SupervisorStrategy.seqThrowable2Decider
@@ -39,6 +38,8 @@ import pekko.testkit.LongRunningTest
import pekko.testkit.TestEvent.Mute
import pekko.util.Helpers.ConfigOps
+import com.typesafe.config.{ Config, ConfigFactory }
+
object SupervisorHierarchySpec {
class FireWorkerException(msg: String) extends Exception(msg)
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala
index e115f4a10b..d46996ef49 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorMiscSpec.scala
@@ -15,17 +15,16 @@ package org.apache.pekko.actor
import java.util.concurrent.{ CountDownLatch, TimeUnit }
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.control.NonFatal
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.pattern.ask
import pekko.testkit.{ filterEvents, EventFilter }
-import pekko.testkit.PekkoSpec
import pekko.testkit.DefaultTimeout
+import pekko.testkit.PekkoSpec
object SupervisorMiscSpec {
val config = """
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala
index 9df4e76f15..ee97967c38 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/SupervisorSpec.scala
@@ -18,10 +18,6 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.{ Die, Ping }
import pekko.ConfigurationException
@@ -33,6 +29,11 @@ import pekko.testkit._
import pekko.testkit.TestEvent._
import pekko.util.unused
+import org.scalatest.BeforeAndAfterEach
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object SupervisorSpec {
val Timeout = 5.seconds
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala
index faf1968b0a..0a29353210 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/Ticket669Spec.scala
@@ -16,14 +16,14 @@ package org.apache.pekko.actor
import scala.concurrent.Await
import scala.concurrent.duration._
-import org.scalatest.BeforeAndAfterAll
-
import org.apache.pekko
import pekko.pattern.ask
import pekko.testkit.{ filterEvents, EventFilter }
-import pekko.testkit.PekkoSpec
import pekko.testkit.DefaultTimeout
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
+
+import org.scalatest.BeforeAndAfterAll
class Ticket669Spec extends PekkoSpec with BeforeAndAfterAll with ImplicitSender with DefaultTimeout {
import Ticket669Spec._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala
index 02e6b8f894..39bc418e69 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/ActorModelSpec.scala
@@ -17,14 +17,11 @@ import java.rmi.RemoteException
import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch, TimeUnit }
import java.util.concurrent.atomic.{ AtomicInteger, AtomicLong }
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
-import scala.annotation.nowarn
-import com.typesafe.config.Config
-import org.scalatest.Assertions._
-
import org.apache.pekko
import pekko.actor._
import pekko.dispatch._
@@ -33,6 +30,10 @@ import pekko.pattern.ask
import pekko.testkit._
import pekko.util.Switch
+import org.scalatest.Assertions._
+
+import com.typesafe.config.Config
+
object ActorModelSpec {
sealed trait ActorModelMessage extends NoSerializationVerificationNeeded
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala
index f505b3a3ef..8d8407c6be 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatcherActorSpec.scala
@@ -22,8 +22,8 @@ import scala.concurrent.duration._
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.pattern.ask
-import pekko.testkit.PekkoSpec
import pekko.testkit.DefaultTimeout
+import pekko.testkit.PekkoSpec
object DispatcherActorSpec {
val config = """
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala
index b52868b585..d0b21786f1 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/DispatchersSpec.scala
@@ -18,9 +18,6 @@ import java.util.concurrent.atomic.AtomicBoolean
import scala.reflect.ClassTag
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor._
@@ -29,6 +26,9 @@ import pekko.routing.FromConfig
import pekko.testkit.{ ImplicitSender, PekkoSpec }
import pekko.util.unused
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object DispatchersSpec {
val config = """
myapp {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala
index ac1b443b32..716452157e 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/dispatch/PinnedActorSpec.scala
@@ -17,14 +17,14 @@ import java.util.concurrent.{ CountDownLatch, TimeUnit }
import scala.concurrent.Await
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.pattern.ask
import pekko.testkit._
import pekko.testkit.PekkoSpec
+import org.scalatest.BeforeAndAfterEach
+
object PinnedActorSpec {
val config = """
pinned-dispatcher {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala
index b4dbcd31ef..ce79405f8c 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/actor/setup/ActorSystemSetupSpec.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.actor.setup
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.ActorSystem
import pekko.testkit.TestKit
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
case class DummySetup(name: String) extends Setup
case class DummySetup2(name: String) extends Setup
case class DummySetup3(name: String) extends Setup
diff --git a/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala
index 90cc700fdb..264ff45ee6 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/config/ConfigSpec.scala
@@ -17,9 +17,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.Assertions
-
import org.apache.pekko
import pekko.actor.ActorSystem
import pekko.actor.ExtendedActorSystem
@@ -27,6 +24,10 @@ import pekko.event.DefaultLoggingFilter
import pekko.event.Logging.DefaultLogger
import pekko.testkit.PekkoSpec
+import org.scalatest.Assertions
+
+import com.typesafe.config.ConfigFactory
+
class ConfigSpec extends PekkoSpec(ConfigFactory.defaultReference(ActorSystem.findClassLoader())) with Assertions {
"The default configuration file (i.e. reference.conf)" must {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala
index 465f4041e8..2e00f0195b 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/DispatcherShutdownSpec.scala
@@ -18,13 +18,13 @@ import java.lang.management.ManagementFactory
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.ActorSystem
import pekko.testkit.TestKit
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class DispatcherShutdownSpec extends AnyWordSpec with Matchers {
"pekko dispatcher" should {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala
index bce7b584fa..4816990c5d 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/ForkJoinPoolStarvationSpec.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.dispatch
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.testkit.{ ImplicitSender, PekkoSpec }
import pekko.util.JavaVersion
+import com.typesafe.config.ConfigFactory
+
object ForkJoinPoolStarvationSpec {
val config = ConfigFactory.parseString("""
|actorhang {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala
index d9e26a4d86..223cf259ab 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/MailboxConfigSpec.scala
@@ -18,14 +18,15 @@ import java.util.concurrent.{ BlockingQueue, ConcurrentLinkedQueue }
import scala.concurrent.{ Await, ExecutionContext, Future }
import scala.concurrent.duration._
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach }
-
import org.apache.pekko
import pekko.actor._
import pekko.testkit.{ EventFilter, PekkoSpec }
import pekko.util.unused
+import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach }
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
abstract class MailboxSpec extends PekkoSpec with BeforeAndAfterAll with BeforeAndAfterEach {
def name: String
diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala
index 088446bcc9..765a1ecdf1 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/PriorityDispatcherSpec.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.dispatch
import scala.concurrent.duration._
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.{ Actor, ActorSystem, Props }
import pekko.testkit.{ DefaultTimeout, PekkoSpec }
import pekko.util.unused
+import com.typesafe.config.Config
+
object PriorityDispatcherSpec {
case object Result
diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala
index f4c7c04e88..eb7681bf14 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/SameThreadExecutionContextSpec.scala
@@ -16,12 +16,12 @@ package org.apache.pekko.dispatch
import scala.concurrent.ExecutionContext
import scala.concurrent.Promise
-import org.scalatest.matchers.should.Matchers
-
import org.apache.pekko
import pekko.Done
import pekko.testkit.PekkoSpec
+import org.scalatest.matchers.should.Matchers
+
class SameThreadExecutionContextSpec extends PekkoSpec with Matchers {
"The SameThreadExecutionContext" should {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala
index 9289409e4a..943b28fd91 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/dispatch/StablePriorityDispatcherSpec.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.dispatch
import scala.concurrent.duration._
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.{ Actor, ActorSystem, Props }
import pekko.testkit.{ DefaultTimeout, PekkoSpec }
import pekko.util.unused
+import com.typesafe.config.Config
+
object StablePriorityDispatcherSpec {
case object Result
diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala
index ce93d92568..bdffc760fb 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/event/EventBusSpec.scala
@@ -13,14 +13,15 @@
package org.apache.pekko.event
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.BeforeAndAfterEach
-
import org.apache.pekko
import pekko.actor.{ Actor, ActorRef, ActorSystem, PoisonPill, Props }
import pekko.japi.function.Procedure
import pekko.testkit._
+import org.scalatest.BeforeAndAfterEach
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
object EventBusSpec {
class TestActorWrapperActor(testActor: ActorRef) extends Actor {
def receive = {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala
index ac19fb1c18..476135829e 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/event/EventStreamSpec.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.event
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor._
import pekko.testkit.{ PekkoSpec, TestProbe }
+import com.typesafe.config.ConfigFactory
+
object EventStreamSpec {
val config = ConfigFactory.parseString("""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala
index 409027a5e9..6cb61dd31b 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/event/LoggerSpec.scala
@@ -22,10 +22,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor._
import pekko.event.Logging._
@@ -35,6 +31,11 @@ import pekko.serialization.SerializationExtension
import pekko.testkit._
import pekko.util.Helpers
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
object LoggerSpec {
val defaultConfig = ConfigFactory.parseString("""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala
index b0418cca8c..e40858e408 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/event/LoggingReceiveSpec.scala
@@ -15,15 +15,16 @@ package org.apache.pekko.event
import scala.annotation.tailrec
import scala.concurrent.duration._
-
-import com.typesafe.config.ConfigFactory
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.wordspec.AnyWordSpec
+import scala.jdk.CollectionConverters._
import org.apache.pekko
import pekko.actor._
import pekko.testkit._
-import scala.jdk.CollectionConverters._
+
+import org.scalatest.BeforeAndAfterAll
+import org.scalatest.wordspec.AnyWordSpec
+
+import com.typesafe.config.ConfigFactory
object LoggingReceiveSpec {
class TestLogActor extends Actor {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala
index e1a478c386..4360018f41 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/SimpleDnsCacheSpec.scala
@@ -19,15 +19,15 @@ import java.util.concurrent.atomic.AtomicLong
import scala.collection.immutable
import scala.concurrent.duration._
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.io.dns.ARecord
import pekko.io.dns.CachePolicy.Ttl
import pekko.io.dns.DnsProtocol
import pekko.io.dns.DnsProtocol.Ip
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class SimpleDnsCacheSpec extends AnyWordSpec with Matchers {
"Cache" should {
"not reply with expired but not yet swept out entries" in {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala
index 1c65489214..abf3f1608f 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpConnectionSpec.scala
@@ -30,8 +30,6 @@ import scala.util.Try
import scala.util.control.NonFatal
import com.google.common.jimfs.{ Configuration, Jimfs }
-import com.typesafe.config.ConfigFactory
-import org.scalatest.matchers._
import org.apache.pekko
import pekko.actor._
@@ -43,6 +41,10 @@ import pekko.testkit.SocketUtil.temporaryServerAddress
import pekko.testkit.WithLogCapturing
import pekko.util.{ ByteString, Helpers }
+import org.scalatest.matchers._
+
+import com.typesafe.config.ConfigFactory
+
object TcpConnectionSpec {
case class Ack(i: Int) extends Event
object Ack extends Ack(0)
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala
index 499b8ed021..f7e3b857fe 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpec.scala
@@ -18,8 +18,6 @@ import java.net.{ InetSocketAddress, ServerSocket }
import scala.concurrent.duration._
-import org.scalatest.concurrent.TimeLimits
-
import org.apache.pekko
import pekko.actor.{ ActorRef, PoisonPill }
import pekko.io.Tcp._
@@ -27,6 +25,8 @@ import pekko.testkit.{ PekkoSpec, TestProbe }
import pekko.testkit.WithLogCapturing
import pekko.util.ByteString
+import org.scalatest.concurrent.TimeLimits
+
class TcpIntegrationSpec extends PekkoSpec("""
pekko.loglevel = debug
pekko.loggers = ["org.apache.pekko.testkit.SilenceAllTestEventListener"]
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala
index 170d949fca..658f4bfd31 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/TcpIntegrationSpecSupport.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.io
import scala.annotation.tailrec
import scala.collection.immutable
+import scala.concurrent.ExecutionContext
import Tcp._
import org.apache.pekko
import pekko.actor.ActorRef
import pekko.actor.ActorSystem
-import scala.concurrent.ExecutionContext
import pekko.io.Inet.SocketOption
import pekko.testkit.{ PekkoSpec, TestProbe }
import pekko.testkit.SocketUtil.temporaryServerAddress
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala
index 18ea067e9c..d509c55958 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/UdpConnectedIntegrationSpec.scala
@@ -19,8 +19,8 @@ import scala.concurrent.duration._
import org.apache.pekko
import pekko.actor.ActorRef
-import pekko.testkit.PekkoSpec
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
import pekko.testkit.SocketUtil.temporaryServerAddresses
import pekko.testkit.TestProbe
import pekko.testkit.WithLogCapturing
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala
index e716d329f1..957b7828e8 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/UdpIntegrationSpec.scala
@@ -15,6 +15,7 @@ package org.apache.pekko.io
import java.net.DatagramSocket
import java.net.InetSocketAddress
+
import org.apache.pekko
import pekko.actor.ActorRef
import pekko.io.Inet._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
index 1f7e658b58..0aed5bc0aa 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/AsyncDnsResolverIntegrationSpec.scala
@@ -17,11 +17,8 @@ import java.net.InetAddress
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.time.Millis
-import org.scalatest.time.Span
-
import CachePolicy.Ttl
+
import org.apache.pekko
import pekko.io.{ Dns, IO }
import pekko.io.dns.DnsProtocol.{ Ip, RequestType, Srv }
@@ -31,6 +28,11 @@ import pekko.testkit.SocketUtil.Both
import pekko.testkit.WithLogCapturing
import pekko.util.Timeout
+import org.scalatest.time.Millis
+import org.scalatest.time.Span
+
+import com.typesafe.config.ConfigFactory
+
/**
* These tests rely on a DNS server with 2 zones configured, foo.test and bar.example.
*
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala
index 74509863c5..c658106a23 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DnsSettingsSpec.scala
@@ -17,12 +17,12 @@ import java.net.InetAddress
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.ExtendedActorSystem
import pekko.testkit.PekkoSpec
+import com.typesafe.config.ConfigFactory
+
class DnsSettingsSpec extends PekkoSpec {
val eas = system.asInstanceOf[ExtendedActorSystem]
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
index 97fe875866..e8d10a7d15 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/DockerBindDnsService.scala
@@ -14,21 +14,23 @@
package org.apache.pekko.io.dns
import scala.concurrent.duration._
+import scala.jdk.CollectionConverters._
import scala.util.Try
import scala.util.control.NonFatal
-import com.typesafe.config.Config
import com.github.dockerjava.api.DockerClient
import com.github.dockerjava.api.async.ResultCallback
import com.github.dockerjava.api.command.CreateContainerCmd
import com.github.dockerjava.api.model._
import com.github.dockerjava.core.{ DefaultDockerClientConfig, DockerClientConfig, DockerClientImpl }
import com.github.dockerjava.httpclient5.ApacheDockerHttpClient
-import org.scalatest.concurrent.Eventually
import org.apache.pekko
import pekko.testkit.PekkoSpec
-import scala.jdk.CollectionConverters._
+
+import org.scalatest.concurrent.Eventually
+
+import com.typesafe.config.Config
abstract class DockerBindDnsService(config: Config) extends PekkoSpec(config) with Eventually {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala
index 2c504f6bca..51b51d88eb 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolverSpec.scala
@@ -18,7 +18,6 @@ import java.net.{ Inet6Address, InetAddress }
import scala.collection.{ immutable => im }
import scala.concurrent.duration._
-import com.typesafe.config.{ Config, ConfigFactory, ConfigValueFactory }
import org.apache.pekko
import pekko.actor.{ ActorRef, ExtendedActorSystem, Props }
import pekko.actor.Status.Failure
@@ -30,6 +29,8 @@ import pekko.io.dns.internal.AsyncDnsResolver.ResolveFailedException
import pekko.io.dns.internal.DnsClient.{ Answer, DuplicateId, Question4, Question6, SrvQuestion }
import pekko.testkit.{ PekkoSpec, TestProbe, WithLogCapturing }
+import com.typesafe.config.{ Config, ConfigFactory, ConfigValueFactory }
+
class AsyncDnsResolverSpec extends PekkoSpec("""
pekko.loglevel = DEBUG
pekko.loggers = ["org.apache.pekko.testkit.SilenceAllTestEventListener"]
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala
index 11c4910de9..8c8e9bb4de 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/DnsClientSpec.scala
@@ -15,7 +15,9 @@ package org.apache.pekko.io.dns.internal
import java.net.{ InetAddress, InetSocketAddress }
import java.util.concurrent.atomic.AtomicBoolean
+
import scala.collection.{ immutable => im }
+
import org.apache.pekko
import org.apache.pekko.actor.Status.Failure
import pekko.actor.Props
diff --git a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala
index 18b10d4843..cffbd246ab 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/io/dns/internal/MessageSpec.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.io.dns.internal
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.io.dns.{ RecordClass, RecordType }
import pekko.util.ByteString
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class MessageSpec extends AnyWordSpec with Matchers {
"The Message" should {
"parse a response that is truncated mid-message" in {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala
index e79024c34d..b34e001f1c 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/AskSpec.scala
@@ -13,10 +13,10 @@
package org.apache.pekko.pattern
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.Failure
-import scala.annotation.nowarn
import org.apache.pekko
import pekko.actor._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala
index f17bff441b..f25635be66 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffOnRestartSupervisorSpec.scala
@@ -15,9 +15,8 @@ package org.apache.pekko.pattern
import java.util.concurrent.{ CountDownLatch, TimeUnit }
-import scala.concurrent.duration._
-
import scala.annotation.nowarn
+import scala.concurrent.duration._
import org.apache.pekko
import pekko.actor._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala
index 6e9ab97419..1ae76002e2 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/BackoffSupervisorSpec.scala
@@ -16,13 +16,13 @@ package org.apache.pekko.pattern
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
-import org.scalatest.concurrent.Eventually
-import org.scalatest.prop.TableDrivenPropertyChecks._
-
import org.apache.pekko
import pekko.actor._
import pekko.testkit._
+import org.scalatest.concurrent.Eventually
+import org.scalatest.prop.TableDrivenPropertyChecks._
+
object BackoffSupervisorSpec {
class TestException extends RuntimeException with NoStackTrace
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala
index 72f3691d58..b64e0a9e59 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerSpec.scala
@@ -22,6 +22,7 @@ import scala.concurrent.duration._
import scala.util.Failure
import scala.util.Success
import scala.util.Try
+
import org.apache.pekko
import pekko.actor.{ ActorSystem, ExtendedActorSystem }
import pekko.testkit._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala
index 2123862d05..b74d5442da 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/CircuitBreakerStressSpec.scala
@@ -24,8 +24,8 @@ import pekko.actor.Actor
import pekko.actor.ActorLogging
import pekko.actor.Props
import pekko.actor.Status.Failure
-import pekko.testkit.PekkoSpec
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
object CircuitBreakerStressSpec {
case object JobDone
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala
index e18148d849..04111fee20 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/PatternSpec.scala
@@ -15,6 +15,7 @@ package org.apache.pekko.pattern
import scala.concurrent.{ Await, ExecutionContextExecutor, Future, Promise, TimeoutException }
import scala.concurrent.duration._
+
import org.apache.pekko
import pekko.actor.{ Actor, Props }
import pekko.testkit.{ PekkoSpec, TestLatch }
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala
index 26b78b37a9..bc7168876c 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/RetrySpec.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.pattern
+import java.util.concurrent.atomic.AtomicInteger
+
import scala.concurrent.{ Await, ExecutionContextExecutor, Future }
import scala.concurrent.duration._
@@ -20,8 +22,6 @@ import org.apache.pekko
import pekko.actor.Scheduler
import pekko.testkit.PekkoSpec
-import java.util.concurrent.atomic.AtomicInteger
-
class RetrySpec extends PekkoSpec with RetrySupport {
implicit val ec: ExecutionContextExecutor = system.dispatcher
implicit val scheduler: Scheduler = system.scheduler
diff --git a/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala b/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala
index cc0cffb91c..364dc8529d 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/pattern/StatusReplySpec.scala
@@ -16,8 +16,6 @@ package org.apache.pekko.pattern
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
-import org.scalatest.concurrent.ScalaFutures
-
import org.apache.pekko
import pekko.Done
import pekko.testkit.PekkoSpec
@@ -25,6 +23,8 @@ import pekko.testkit.TestException
import pekko.testkit.TestProbe
import pekko.util.Timeout
+import org.scalatest.concurrent.ScalaFutures
+
class StatusReplySpec extends PekkoSpec with ScalaFutures {
"StatusReply" should {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala
index 8049e3d60d..518f233e9a 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/routing/BalancingSpec.scala
@@ -21,13 +21,13 @@ import scala.concurrent.duration._
import org.apache.pekko
import pekko.actor.{ Actor, ActorLogging, ActorRef, PoisonPill, Props }
-import pekko.testkit.PekkoSpec
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
import pekko.testkit.TestLatch
-import org.scalatest.BeforeAndAfterEach
-
import pekko.testkit.TestProbe
+import org.scalatest.BeforeAndAfterEach
+
object BalancingSpec {
val counter = new AtomicInteger(1)
diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala
index cbd6b97c89..d12addc319 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/routing/ConfiguredLocalRoutingSpec.scala
@@ -13,13 +13,11 @@
package org.apache.pekko.routing
+import scala.annotation.nowarn
import scala.collection.immutable
import scala.concurrent.Await
import scala.concurrent.duration._
-import scala.annotation.nowarn
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor.{ Actor, ActorRef, Deploy, Props }
@@ -32,6 +30,8 @@ import pekko.testkit.{ DefaultTimeout, ImplicitSender, PekkoSpec }
import pekko.testkit.TestActors.echoActorProps
import pekko.testkit.TestProbe
+import com.typesafe.config.Config
+
object ConfiguredLocalRoutingSpec {
val config = """
pekko {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala
index 1e7a4ab77b..198b7144cf 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/routing/ResizerSpec.scala
@@ -16,14 +16,14 @@ package org.apache.pekko.routing
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.{ Config, ConfigFactory }
-
import org.apache.pekko
import pekko.actor.{ Actor, ActorRef, ActorSystem, Props }
import pekko.pattern.ask
import pekko.testkit._
import pekko.testkit.TestEvent._
+import com.typesafe.config.{ Config, ConfigFactory }
+
object ResizerSpec {
val config = """
diff --git a/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala
index eed7e6bb81..90ca2eaec1 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/routing/RoutingSpec.scala
@@ -18,14 +18,14 @@ import scala.concurrent.Await
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor._
import pekko.pattern.{ ask, pipe }
import pekko.testkit._
+import com.typesafe.config.ConfigFactory
+
object RoutingSpec {
val config = """
diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala
index 5f503528cd..14f7bd46d8 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/AsyncSerializeSpec.scala
@@ -15,12 +15,15 @@ package org.apache.pekko.serialization
import java.util.concurrent.CompletableFuture
import java.util.concurrent.CompletionStage
+
import scala.concurrent.Future
-import com.typesafe.config.ConfigFactory
+
import org.apache.pekko
import pekko.actor.ExtendedActorSystem
import pekko.testkit.{ EventFilter, PekkoSpec }
+import com.typesafe.config.ConfigFactory
+
object AsyncSerializeSpec {
case class Message1(str: String)
diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala
index baebb5a8fa..0fdbdd44d5 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/PrimitivesSerializationSpec.scala
@@ -18,12 +18,12 @@ import java.nio.ByteOrder
import scala.util.Random
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.testkit.PekkoSpec
import pekko.util.ByteString
+import com.typesafe.config.ConfigFactory
+
object PrimitivesSerializationSpec {
val serializationTestOverrides = ""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala
index 9b8aac0896..0b4a59bd79 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializationSetupSpec.scala
@@ -18,13 +18,13 @@ import java.util.{ Date => SerializableDummy }
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicInteger
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.{ ActorSystem, BootstrapSetup, ExtendedActorSystem }
import pekko.actor.setup.ActorSystemSetup
import pekko.testkit.{ PekkoSpec, TestKit }
+import com.typesafe.config.ConfigFactory
+
class ConfigurationDummy
class ProgrammaticDummy
diff --git a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala
index cb379ee854..88e5517033 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/serialization/SerializeSpec.scala
@@ -22,7 +22,6 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import SerializationTests._
-import com.typesafe.config._
import test.org.apache.pekko.serialization.NoVerification
import org.apache.pekko
@@ -33,6 +32,8 @@ import pekko.testkit.{ EventFilter, PekkoSpec }
import pekko.util.{ unused, Timeout }
import pekko.util.ByteString
+import com.typesafe.config._
+
object SerializationTests {
val serializeConf = s"""
diff --git a/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala
index 720c84e267..ef189a231c 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/testkit/CallingThreadDispatcherModelSpec.scala
@@ -15,14 +15,14 @@ package org.apache.pekko.testkit
import java.util.concurrent.atomic.AtomicInteger
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.dispatch.ActorModelSpec
import pekko.dispatch.DispatcherPrerequisites
import pekko.dispatch.MessageDispatcher
import pekko.dispatch.MessageDispatcherConfigurator
+import com.typesafe.config.Config
+
object CallingThreadDispatcherModelSpec {
import ActorModelSpec._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala
index cb7c433992..4045f50b61 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/BoundedBlockingQueueSpec.scala
@@ -19,9 +19,15 @@ import java.util.concurrent.locks.{ Condition, LockSupport, ReentrantLock }
import scala.collection.mutable
import scala.concurrent.{ Await, ExecutionContext, ExecutionContextExecutor, Future }
+import scala.jdk.CollectionConverters._
import scala.util.control.Exception
import org.scalactic.source.Position
+
+import org.apache.pekko
+import pekko.testkit.TimingTest
+import pekko.util.DefaultExecutionContext._
+
import org.scalatest.concurrent.{ Signaler, ThreadSignaler }
import org.scalatest.exceptions.TestFailedDueToTimeoutException
import org.scalatest.matchers.{ MatchResult, Matcher }
@@ -30,11 +36,6 @@ import org.scalatest.time.Span
import org.scalatest.time.SpanSugar._
import org.scalatest.wordspec.AnyWordSpec
-import org.apache.pekko
-import pekko.testkit.TimingTest
-import pekko.util.DefaultExecutionContext._
-import scala.jdk.CollectionConverters._
-
class BoundedBlockingQueueSpec
extends AnyWordSpec
with Matchers
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/ByteIteratorSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/ByteIteratorSpec.scala
index 29e430362a..56fc8ca7e5 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/ByteIteratorSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/ByteIteratorSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
+import org.apache.pekko.util.ByteIterator.ByteArrayIterator
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import org.apache.pekko.util.ByteIterator.ByteArrayIterator
-
class ByteIteratorSpec extends AnyWordSpec with Matchers {
"A ByteIterator" should {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala
index 27ee54ae69..563562a471 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/ByteStringSpec.scala
@@ -26,13 +26,14 @@ import scala.collection.mutable.Builder
import org.apache.commons.codec.binary.Hex.encodeHex
import org.scalacheck.{ Arbitrary, Gen }
import org.scalacheck.Arbitrary.arbitrary
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
import org.scalatestplus.scalacheck.Checkers
import org.apache.pekko
import pekko.util.ByteString.{ ByteString1, ByteString1C, ByteStrings }
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class ByteStringSpec extends AnyWordSpec with Matchers with Checkers {
implicit val betterGeneratorDrivenConfig: PropertyCheckConfiguration =
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/FrequencyListSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/FrequencyListSpec.scala
index 3398c6b540..b3dbe1837b 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/FrequencyListSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/FrequencyListSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
+import scala.concurrent.duration._
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import scala.concurrent.duration._
-
object FrequencyListSpec {
// controlled clock for testing recency windows
// durations are always in seconds
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/FrequencySketchSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/FrequencySketchSpec.scala
index 942042feb8..1e6b112884 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/FrequencySketchSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/FrequencySketchSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
+import scala.collection.mutable
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import scala.collection.mutable
-
class FrequencySketchSpec extends AnyWordSpec with Matchers {
"FrequencySketch" must {
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala
index 741782e66b..d08c3d6c90 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/IndexSpec.scala
@@ -20,11 +20,11 @@ import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.Future
import scala.util.Random
-import org.scalatest.matchers.should.Matchers
-
import org.apache.pekko
-import pekko.testkit.PekkoSpec
import pekko.testkit.DefaultTimeout
+import pekko.testkit.PekkoSpec
+
+import org.scalatest.matchers.should.Matchers
class IndexSpec extends PekkoSpec with Matchers with DefaultTimeout {
implicit val ec: ExecutionContextExecutor = system.dispatcher
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/MessageBufferSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/MessageBufferSpec.scala
index fa3404c393..1fdafb5de2 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/MessageBufferSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/MessageBufferSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
+import org.apache.pekko.actor.{ ActorPath, ActorRef, ActorRefProvider, MinimalActorRef }
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import org.apache.pekko.actor.{ ActorPath, ActorRef, ActorRefProvider, MinimalActorRef }
-
class MessageBufferSpec extends AnyWordSpec with Matchers {
import MessageBufferSpec._
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/RecencyListSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/RecencyListSpec.scala
index 0e7eb07153..0e4766f91d 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/RecencyListSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/RecencyListSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
+import scala.concurrent.duration._
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import scala.concurrent.duration._
-
object RecencyListSpec {
// controlled clock for testing recency windows
// durations are always in seconds
diff --git a/actor-tests/src/test/scala/org/apache/pekko/util/SegmentedRecencyListSpec.scala b/actor-tests/src/test/scala/org/apache/pekko/util/SegmentedRecencyListSpec.scala
index ebfe64e5fd..99aaa560dd 100644
--- a/actor-tests/src/test/scala/org/apache/pekko/util/SegmentedRecencyListSpec.scala
+++ b/actor-tests/src/test/scala/org/apache/pekko/util/SegmentedRecencyListSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
+import scala.concurrent.duration._
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import scala.concurrent.duration._
-
object SegmentedRecencyListSpec {
// controlled clock for testing recency windows
// durations are always in seconds
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala
index 8f53e10267..bda008a286 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorContextSpec.scala
@@ -17,8 +17,6 @@ import scala.annotation.nowarn
import scala.concurrent.duration._
import scala.reflect.ClassTag
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.InvalidMessageException
import pekko.actor.testkit.typed.TestException
@@ -28,6 +26,8 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.wordspec.AnyWordSpecLike
+
object ActorSpecMessages {
sealed trait Command
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala
index ae1376300a..3e4771bfe6 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala
@@ -18,9 +18,6 @@ import java.util.concurrent.TimeoutException
import scala.concurrent.duration._
import scala.util.{ Failure, Success }
-import org.scalatest.concurrent.PatienceConfiguration.{ Timeout => PatienceTimeout }
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe }
import pekko.actor.typed.scaladsl.AskPattern._
@@ -28,6 +25,9 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.adapter._
import pekko.util.Timeout
+import org.scalatest.concurrent.PatienceConfiguration.{ Timeout => PatienceTimeout }
+import org.scalatest.wordspec.AnyWordSpecLike
+
class ActorRefIgnoreSpec extends ScalaTestWithActorTestKit() with AnyWordSpecLike {
case class Request(replyTo: ActorRef[Int])
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala
index fb2dbade39..55653d218e 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorRefResolverSpec.scala
@@ -13,10 +13,6 @@
package org.apache.pekko.actor.typed
-import org.scalatest.concurrent.ScalaFutures
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.ActorPath
import pekko.actor.ActorRefProvider
@@ -25,6 +21,10 @@ import pekko.actor.MinimalActorRef
import pekko.actor.RootActorPath
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.concurrent.ScalaFutures
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class ActorRefResolverSpec extends AnyWordSpec with ScalaFutures with Matchers {
"ActorRefResolver" should {
"not allow serialization of ref originating from other system" in {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala
index cfd411d59b..2cab64f2d8 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ActorSystemSpec.scala
@@ -17,12 +17,13 @@
package org.apache.pekko.actor.typed
-import com.typesafe.config.ConfigFactory
+import scala.annotation.nowarn
+
import org.apache.pekko
import pekko.actor.typed.scaladsl.Behaviors
import pekko.testkit.PekkoSpec
-import scala.annotation.nowarn
+import com.typesafe.config.ConfigFactory
@nowarn("msg=possible missing interpolator")
class ActorSystemSpec extends PekkoSpec {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala
index 0a6b650dd0..a03dee2841 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/AskSpec.scala
@@ -17,8 +17,9 @@ import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.TimeoutException
import scala.concurrent.duration._
+import scala.util.Failure
import scala.util.Success
-import org.scalatest.wordspec.AnyWordSpecLike
+
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
@@ -32,7 +33,7 @@ import pekko.pattern.StatusReply
import pekko.testkit.TestException
import pekko.util.Timeout
-import scala.util.Failure
+import org.scalatest.wordspec.AnyWordSpecLike
object AskSpec {
sealed trait Msg
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala
index 03980e4ed3..9f9cba1715 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/BehaviorSpec.scala
@@ -16,9 +16,8 @@ package org.apache.pekko.actor.typed
import java.util.function.{ Function => F1 }
import scala.annotation.nowarn
+
import org.scalactic.TypeCheckedTripleEquals
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpecLike
import org.apache.pekko
import pekko.Done
@@ -28,8 +27,11 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.typed.javadsl.{ Behaviors => JBehaviors }
import pekko.actor.typed.scaladsl.{ AbstractBehavior => SAbstractBehavior }
import pekko.actor.typed.scaladsl.{ Behaviors => SBehaviors }
-import pekko.japi.pf.PFBuilder
import pekko.japi.function.Function
+import pekko.japi.pf.PFBuilder
+
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpecLike
object BehaviorSpec {
sealed trait Command {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala
index ac71495980..6600bdf3f2 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/DeferredSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.actor.typed
import scala.util.control.NoStackTrace
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
-
import org.apache.pekko
import pekko.actor.ActorInitializationException
import pekko.actor.testkit.typed.TestKitSettings
@@ -25,6 +22,9 @@ import pekko.actor.testkit.typed.scaladsl._
import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
+
object DeferredSpec {
sealed trait Command
case object Ping extends Command
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala
index 17bfa5d4ce..8a6eff66fb 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/ExtensionsSpec.scala
@@ -17,9 +17,6 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.Future
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.BootstrapSetup
import pekko.actor.setup.ActorSystemSetup
@@ -29,6 +26,10 @@ import pekko.actor.typed.receptionist.Receptionist
import pekko.actor.typed.receptionist.ServiceKey
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
class DummyExtension1 extends Extension
object DummyExtension1 extends ExtensionId[DummyExtension1] {
def createExtension(system: ActorSystem[_]) = new DummyExtension1
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala
index 3f786e36b8..208258315e 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/InterceptSpec.scala
@@ -17,8 +17,6 @@ import java.util.concurrent.atomic.AtomicBoolean
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.ActorInitializationException
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -29,6 +27,8 @@ import pekko.actor.typed.internal.PoisonPill
import pekko.actor.typed.internal.PoisonPillInterceptor
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.wordspec.AnyWordSpecLike
+
object InterceptSpec {
final case class Msg(hello: String, replyTo: ActorRef[String])
case object MyPoisonPill
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala
index dd8b9dc05c..c2a05fd6c8 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LocalActorRefProviderLogMessagesSpec.scala
@@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, LoggingTestKit, ScalaTestWithActorTestKit }
import pekko.actor.typed.internal.adapter.ActorSystemAdapter
+
import org.scalatest.wordspec.AnyWordSpecLike
object LocalActorRefProviderLogMessagesSpec {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala
index 0787193474..f8d865bc1b 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/LogMessagesSpec.scala
@@ -13,9 +13,6 @@
package org.apache.pekko.actor.typed
-import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.event.Level
-
import org.apache.pekko
import pekko.actor
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -24,6 +21,10 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.adapter._
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import org.slf4j.event.Level
+
class LogMessagesSpec extends ScalaTestWithActorTestKit("""
pekko.loglevel = DEBUG # test verifies debug
""") with AnyWordSpecLike with LogCapturing {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala
index e90eab5909..36a029a634 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MailboxSelectorSpec.scala
@@ -16,8 +16,6 @@ package org.apache.pekko.actor.typed
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.ActorCell
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -31,6 +29,8 @@ import pekko.dispatch.BoundedNodeMessageQueue
import pekko.dispatch.MessageQueue
import pekko.dispatch.UnboundedMessageQueueSemantics
+import org.scalatest.wordspec.AnyWordSpecLike
+
class MailboxSelectorSpec extends ScalaTestWithActorTestKit("""
specific-mailbox {
mailbox-type = "org.apache.pekko.dispatch.NonBlockingBoundedMailbox"
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala
index 70f37e565f..53cd0297b6 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/MonitorSpec.scala
@@ -13,14 +13,14 @@
package org.apache.pekko.actor.typed
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.wordspec.AnyWordSpecLike
+
class MonitorSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
"The monitor behavior" should {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala
index 3727268d9f..ac46eef74b 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/OrElseSpec.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.actor.typed
import scala.annotation.tailrec
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl._
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
/**
* Background: Originally there was an `OrElseBehavior` that could compose two `Behavior`, but that
* wasn't safe when used together with narrow so `OrElseBehavior` was removed. Kept this
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/PropsSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/PropsSpec.scala
index 75a88c9351..bf14b2ee60 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/PropsSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/PropsSpec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.actor.typed
+import org.apache.pekko.actor.testkit.typed.scaladsl.LogCapturing
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
-import org.apache.pekko.actor.testkit.typed.scaladsl.LogCapturing
-
class PropsSpec extends AnyWordSpec with Matchers with LogCapturing {
val dispatcherFirst = Props.empty.withDispatcherFromConfig("pool").withDispatcherDefault
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala
index 8732279f45..6038f3eb06 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SpawnProtocolSpec.scala
@@ -16,15 +16,15 @@ package org.apache.pekko.actor.typed
import scala.concurrent.Future
import scala.concurrent.duration._
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
-
import org.apache.pekko
import pekko.actor.testkit.typed.TestKitSettings
import pekko.actor.testkit.typed.scaladsl._
import pekko.actor.typed.scaladsl.Behaviors
import pekko.util.Timeout
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
+
object SpawnProtocolSpec {
sealed trait Message
final case class Ping(replyTo: ActorRef[Pong.type]) extends Message
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala
index 9950127d5c..76368df75f 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/SupervisionSpec.scala
@@ -19,27 +19,29 @@ import java.util.concurrent.TimeUnit
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger
+import scala.concurrent.Future
+import scala.concurrent.duration._
+import scala.util.Failure
+import scala.util.Success
+import scala.util.control.NoStackTrace
+
import org.apache.pekko
import pekko.actor.ActorInitializationException
import pekko.actor.Dropped
import pekko.actor.testkit.typed._
-import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.testkit.typed.scaladsl._
+import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.typed.SupervisorStrategy.Resume
import pekko.actor.typed.scaladsl.AbstractBehavior
import pekko.actor.typed.scaladsl.ActorContext
import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.Behaviors._
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpec
import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.event.Level
-import scala.concurrent.Future
-import scala.concurrent.duration._
-import scala.util.Failure
-import scala.util.Success
-import scala.util.control.NoStackTrace
+import org.slf4j.event.Level
object SupervisionSpec {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala
index 6552d2ccd3..4709337899 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TerminatedSpec.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.actor.typed
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.TestInbox
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class TerminatedSpec extends AnyWordSpec with Matchers with LogCapturing {
"Child Failed" must {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala
index 056db0b9ca..f47e8d69c9 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TimerSpec.scala
@@ -20,8 +20,6 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.duration._
import scala.util.control.NoStackTrace
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.DeadLetter
import pekko.actor.testkit.typed.TestException
@@ -31,6 +29,8 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.TimerScheduler
import pekko.testkit.TimingTest
+import org.scalatest.wordspec.AnyWordSpecLike
+
class TimerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
sealed trait Command
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala
index 290ba148c4..9999d86885 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/TransformMessagesSpec.scala
@@ -17,8 +17,6 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor
import pekko.actor.ActorInitializationException
@@ -29,6 +27,8 @@ import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.adapter._
+import org.scalatest.wordspec.AnyWordSpecLike
+
object TransformMessagesSpec {
// this is the sample from the Scaladoc
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala
index 5bddfc6da7..ee29aaf85a 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/WatchSpec.scala
@@ -16,8 +16,6 @@ package org.apache.pekko.actor.typed
import scala.concurrent._
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor
@@ -30,6 +28,8 @@ import pekko.actor.typed.scaladsl.AbstractBehavior
import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.adapter._
+import org.scalatest.wordspec.AnyWordSpecLike
+
object WatchSpec {
case object Stop
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala
index 3014042166..f647146e77 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/ClassicSupervisingTypedSpec.scala
@@ -12,10 +12,6 @@
*/
package org.apache.pekko.actor.typed.coexistence
-import com.typesafe.config.ConfigFactory
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.{ actor => u }
import pekko.actor.Actor
@@ -26,6 +22,11 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.adapter._
import pekko.testkit.TestProbe
+import org.scalatest.BeforeAndAfterAll
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ProbedBehavior {
def behavior(probe: u.ActorRef): Behavior[String] = {
Behaviors
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala
index 4989bd0d7e..5edfec293d 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/coexistence/TypedSupervisingClassicSpec.scala
@@ -12,8 +12,6 @@
*/
package org.apache.pekko.actor.typed.coexistence
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.{ actor => classic }
import pekko.actor.Actor
@@ -24,6 +22,8 @@ import pekko.actor.typed.ActorRef
import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.adapter._
+import org.scalatest.wordspec.AnyWordSpecLike
+
object TypedSupervisingClassicSpec {
sealed trait Protocol
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala
index 7fa2245f66..a442ddb282 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ConsumerControllerSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.actor.typed.delivery
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -25,6 +23,10 @@ import pekko.actor.typed.delivery.internal.ConsumerControllerImpl
import pekko.actor.typed.delivery.internal.ProducerControllerImpl
import pekko.serialization.SerializationExtension
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
class ConsumerControllerSpec
extends ScalaTestWithActorTestKit(ConfigFactory.parseString("""
pekko.reliable-delivery.consumer-controller {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala
index 9c8a2047e8..9483a46c4c 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerControllerSpec.scala
@@ -17,9 +17,6 @@ import java.util.concurrent.atomic.AtomicReference
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -29,6 +26,10 @@ import pekko.actor.typed.delivery.internal.ChunkedMessage
import pekko.actor.typed.delivery.internal.ProducerControllerImpl
import pekko.util.ByteString
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
class DurableProducerControllerSpec
extends ScalaTestWithActorTestKit(
ConfigFactory.parseString("""
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala
index d637b7850b..fee91853d7 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableProducerQueueSpec.scala
@@ -13,16 +13,16 @@
package org.apache.pekko.actor.typed.delivery
-import org.scalatest.TestSuite
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.typed.delivery.DurableProducerQueue.MessageSent
import pekko.actor.typed.delivery.DurableProducerQueue.State
import pekko.actor.typed.delivery.internal.ChunkedMessage
import pekko.util.ByteString
+import org.scalatest.TestSuite
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class DurableProducerQueueSpec extends AnyWordSpec with TestSuite with Matchers {
"DurableProducerQueue.State" must {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala
index 617e27c9f1..264e4e64eb 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/DurableWorkPullingSpec.scala
@@ -18,7 +18,6 @@ import java.util.concurrent.atomic.AtomicReference
import scala.concurrent.duration._
import DurableProducerQueue.MessageSent
-import org.scalatest.wordspec.AnyWordSpecLike
import org.apache.pekko
import pekko.Done
@@ -29,6 +28,8 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl
import pekko.actor.typed.receptionist.Receptionist
import pekko.actor.typed.receptionist.ServiceKey
+import org.scalatest.wordspec.AnyWordSpecLike
+
class DurableWorkPullingSpec
extends ScalaTestWithActorTestKit("""
pekko.reliable-delivery.consumer-controller.flow-control-window = 20
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala
index e62de6ce8d..77fb97e9ff 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ProducerControllerSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.actor.typed.delivery
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -25,6 +22,10 @@ import pekko.actor.typed.delivery.ProducerController.MessageWithConfirmation
import pekko.actor.typed.delivery.internal.ChunkedMessage
import pekko.actor.typed.delivery.internal.ProducerControllerImpl
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
class ProducerControllerSpec
extends ScalaTestWithActorTestKit(
ConfigFactory.parseString("""
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala
index 99ec8e49c9..0aa75315c1 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryRandomSpec.scala
@@ -18,10 +18,6 @@ import java.util.concurrent.atomic.AtomicReference
import scala.concurrent.duration._
import scala.util.Random
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -32,6 +28,11 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl
import pekko.actor.typed.scaladsl.Behaviors
import pekko.actor.typed.scaladsl.LoggerOps
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object ReliableDeliveryRandomSpec {
val config: Config = ConfigFactory.parseString("""
pekko.reliable-delivery.consumer-controller {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala
index 616f187890..66f2d57cfd 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliverySpec.scala
@@ -15,14 +15,15 @@ package org.apache.pekko.actor.typed.delivery
import scala.concurrent.duration._
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object ReliableDeliverySpec {
val config: Config = ConfigFactory.parseString("""
pekko.reliable-delivery.consumer-controller.flow-control-window = 20
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala
index fd565d095f..0164d68c66 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestConsumer.scala
@@ -13,12 +13,13 @@
package org.apache.pekko.actor.typed.delivery
+import java.io.NotSerializableException
import java.nio.charset.StandardCharsets
+
+import scala.concurrent.duration._
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
-import scala.concurrent.duration._
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
+
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.Behavior
@@ -28,7 +29,8 @@ import pekko.actor.typed.scaladsl.ActorContext
import pekko.actor.typed.scaladsl.Behaviors
import pekko.serialization.SerializerWithStringManifest
-import java.io.NotSerializableException
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
object TestConsumer {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala
index 0510b66b36..f028d45414 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/TestProducerWithAsk.scala
@@ -13,8 +13,8 @@
package org.apache.pekko.actor.typed.delivery
-import scala.concurrent.duration.FiniteDuration
import scala.concurrent.duration._
+import scala.concurrent.duration.FiniteDuration
import scala.util.Failure
import scala.util.Success
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala
index 1a29952d87..bf384c439d 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/delivery/WorkPullingSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.actor.typed.delivery
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -26,6 +24,8 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl
import pekko.actor.typed.receptionist.Receptionist
import pekko.actor.typed.receptionist.ServiceKey
+import org.scalatest.wordspec.AnyWordSpecLike
+
class WorkPullingSpec
extends ScalaTestWithActorTestKit("""
pekko.reliable-delivery.consumer-controller.flow-control-window = 20
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala
index b47c81769f..2bac08ea45 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamDocSpec.scala
@@ -21,6 +21,7 @@ import org.apache.pekko.actor.{ AllDeadLetters, DeadLetter, Dropped, SuppressedD
import org.apache.pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit }
import org.apache.pekko.actor.typed.ActorSystem
import org.apache.pekko.actor.typed.scaladsl.Behaviors
+
import org.scalatest.wordspec.AnyWordSpecLike
object EventStreamDocSpec {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala
index f47998052b..922768cc5d 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/eventstream/EventStreamSpec.scala
@@ -18,14 +18,14 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.DeadLetter
import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe }
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.wordspec.AnyWordSpecLike
+
class EventStreamSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
import EventStream._
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala
index c51891668c..0ac9739d46 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorRefSerializationSpec.scala
@@ -13,9 +13,6 @@
package org.apache.pekko.actor.typed.internal
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -23,6 +20,10 @@ import pekko.actor.typed.ActorRef
import pekko.actor.typed.scaladsl.Behaviors
import pekko.serialization.{ JavaSerializer, SerializationExtension }
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ActorRefSerializationSpec {
def config = ConfigFactory.parseString("""
pekko.actor {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala
index 38a181640d..a7f603f845 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/ActorSystemSpec.scala
@@ -18,24 +18,24 @@ import scala.concurrent.Future
import scala.concurrent.Promise
import scala.util.control.NonFatal
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.concurrent.Eventually
-import org.scalatest.concurrent.ScalaFutures
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.Done
-import pekko.actor.dungeon.Dispatch
import pekko.actor.{ Address, CoordinatedShutdown, InvalidMessageException }
+import pekko.actor.dungeon.Dispatch
+import pekko.actor.testkit.typed.TestKitSettings
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.TestInbox
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.scaladsl.Behaviors
-import com.typesafe.config.ConfigFactory
+
+import org.scalatest.BeforeAndAfterAll
+import org.scalatest.concurrent.Eventually
+import org.scalatest.concurrent.ScalaFutures
+import org.scalatest.matchers.should.Matchers
import org.scalatest.time.Span
+import org.scalatest.wordspec.AnyWordSpec
-import pekko.actor.testkit.typed.TestKitSettings
+import com.typesafe.config.ConfigFactory
class ActorSystemSpec
extends AnyWordSpec
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adpater/PropsAdapterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adpater/PropsAdapterSpec.scala
index 417e8bc6e2..659fe51e1c 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adpater/PropsAdapterSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/adpater/PropsAdapterSpec.scala
@@ -13,15 +13,15 @@
package org.apache.pekko.actor.typed.internal.adpater
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor
import pekko.actor.typed.Props
import pekko.actor.typed.internal.adapter.PropsAdapter
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class PropsAdapterSpec extends AnyWordSpec with Matchers {
"PropsAdapter" should {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala
index d463f23c44..e0a2236d2a 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/LocalReceptionistSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.actor.typed.internal.receptionist
import scala.concurrent.Future
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.BehaviorTestKit
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -31,6 +28,9 @@ import pekko.actor.typed.receptionist.ServiceKey
import pekko.actor.typed.scaladsl.AskPattern._
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.{ AnyWordSpec, AnyWordSpecLike }
+
object LocalReceptionistSpec {
trait ServiceA
val ServiceKeyA = ServiceKey[ServiceA]("service-a")
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala
index 0409add021..16ba38012b 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/receptionist/ServiceKeySerializationSpec.scala
@@ -13,8 +13,6 @@
package org.apache.pekko.actor.typed.internal.receptionist
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -22,6 +20,8 @@ import pekko.actor.typed.internal.ActorRefSerializationSpec
import pekko.actor.typed.receptionist.ServiceKey
import pekko.serialization.SerializationExtension
+import org.scalatest.wordspec.AnyWordSpecLike
+
class ServiceKeySerializationSpec
extends ScalaTestWithActorTestKit(ActorRefSerializationSpec.config)
with AnyWordSpecLike
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala
index c7ee0aa492..3fde4ee16f 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterSpec.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.actor.typed.internal.routing
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit }
import pekko.actor.typed.{ ActorRef, Behavior, DispatcherSelector }
import pekko.actor.typed.scaladsl.{ Behaviors, Routers }
+import org.scalatest.wordspec.AnyWordSpecLike
+
object PoolRouterSpec {
object RouteeBehavior {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala
index 2cc5111b54..fd197c38ad 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/internal/routing/RoutingLogicSpec.scala
@@ -13,9 +13,6 @@
package org.apache.pekko.actor.typed.internal.routing
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.Address
import pekko.actor.testkit.typed.scaladsl.{ LogCapturing, ScalaTestWithActorTestKit, TestProbe }
@@ -23,6 +20,9 @@ import pekko.actor.typed.{ ActorSystem, Behavior }
import pekko.actor.typed.internal.routing.RoutingLogics.ConsistentHashingLogic
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpecLike
+
class RoutingLogicSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with Matchers with LogCapturing {
val emptyMessage: Any = ""
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala
index 93270fc148..d59ea1cb5f 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/javadsl/AdaptationFailureSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.actor.typed.javadsl
import scala.concurrent.Promise
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.TestException
@@ -27,6 +25,8 @@ import pekko.actor.typed.MessageAdaptionFailure
import pekko.actor.typed.PreRestart
import pekko.actor.typed.Terminated
+import org.scalatest.wordspec.AnyWordSpecLike
+
object AdaptationFailureSpec {
def emptyAbstractBehavior: Behavior[Any] = Behaviors.setup(new EmptyAbstractBehavior(_))
class EmptyAbstractBehavior(ctx: ActorContext[Any]) extends AbstractBehavior[Any](ctx) {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala
index 08198f23dc..0d658409b2 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/pubsub/LocalPubSubSpec.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.actor.typed.pubsub
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
+import org.scalatest.wordspec.AnyWordSpecLike
+
class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
"A pub-sub topic running locally" must {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala
index 42341dea04..b8e8ab731e 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextAskSpec.scala
@@ -13,15 +13,13 @@
package org.apache.pekko.actor.typed.scaladsl
-import org.apache.pekko.actor.testkit.typed.TestException
-
import scala.concurrent.TimeoutException
import scala.concurrent.duration._
import scala.reflect.ClassTag
import scala.util.{ Failure, Success }
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
+
import org.apache.pekko
+import org.apache.pekko.actor.testkit.typed.TestException
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -29,6 +27,10 @@ import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.{ ActorRef, PostStop, Props }
import pekko.pattern.StatusReply
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ActorContextAskSpec {
val config = ConfigFactory.parseString("""
ping-pong-dispatcher {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala
index 28aa1d6354..7c5a239132 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextDelegateSpec.scala
@@ -18,6 +18,7 @@ import pekko.actor.UnhandledMessage
import pekko.actor.testkit.typed.TestKitSettings
import pekko.actor.testkit.typed.scaladsl.{ FishingOutcomes, LogCapturing, ScalaTestWithActorTestKit, TestProbe }
import pekko.actor.typed.{ ActorRef, Behavior }
+
import org.scalatest.wordspec.AnyWordSpecLike
object ActorContextDelegateSpec {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala
index 1282f63caa..29b21b396c 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorContextPipeToSelfSpec.scala
@@ -18,15 +18,16 @@ import scala.concurrent.Promise
import scala.util.{ Failure, Success }
import scala.util.control.NoStackTrace
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe }
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.typed.Props
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ActorContextPipeToSelfSpec {
val config = ConfigFactory.parseString("""
|pipe-to-self-spec-dispatcher {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala
index 769855a14c..b8c7d9792d 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorLoggingSpec.scala
@@ -16,12 +16,6 @@ package org.apache.pekko.actor.typed.scaladsl
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicReference
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.LoggerFactory
-import org.slf4j.MDC
-import org.slf4j.helpers.BasicMarkerFactory
-
import org.apache.pekko
import pekko.actor.ActorPath
import pekko.actor.ActorSystem
@@ -41,6 +35,14 @@ import pekko.event.Logging.DefaultLogger
import pekko.event.slf4j.Slf4jLogger
import pekko.event.slf4j.Slf4jLoggingFilter
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import org.slf4j.LoggerFactory
+import org.slf4j.MDC
+import org.slf4j.helpers.BasicMarkerFactory
+
+import com.typesafe.config.ConfigFactory
+
class SomeClass
object WhereTheBehaviorIsDefined {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala
index f13ddd45f1..8f79e5ff23 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ActorThreadSpec.scala
@@ -27,6 +27,7 @@ import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.typed.ActorRef
import pekko.actor.typed.Behavior
import pekko.actor.typed.scaladsl.ActorThreadSpec.Echo
+
import org.scalatest.wordspec.AnyWordSpecLike
object ActorThreadSpec {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala
index a9cc64e1e5..2a8aa0c1aa 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/AdaptationFailureSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.actor.typed.scaladsl
import scala.concurrent.Promise
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.TestException
@@ -28,6 +26,8 @@ import pekko.actor.typed.PreRestart
import pekko.actor.typed.Signal
import pekko.actor.typed.Terminated
+import org.scalatest.wordspec.AnyWordSpecLike
+
object AdaptationFailureSpec {
def emptyAbstractBehavior: Behavior[Any] = Behaviors.setup(new EmptyAbstractBehavior(_))
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala
index 62dcd12c5e..9f8160647a 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/DispatcherSelectorSpec.scala
@@ -13,10 +13,6 @@
package org.apache.pekko.actor.typed.scaladsl
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.BootstrapSetup
import pekko.actor.setup.ActorSystemSetup
@@ -30,8 +26,13 @@ import pekko.actor.typed.ActorSystem
import pekko.actor.typed.Behavior
import pekko.actor.typed.DispatcherSelector
import pekko.actor.typed.Props
-import pekko.actor.typed.scaladsl.AskPattern._
import pekko.actor.typed.SpawnProtocol
+import pekko.actor.typed.scaladsl.AskPattern._
+
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
object DispatcherSelectorSpec {
val config = ConfigFactory.parseString("""
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala
index dcbce75095..d3ad36b3c8 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/GracefulStopSpec.scala
@@ -14,8 +14,6 @@
package org.apache.pekko.actor.typed
package scaladsl
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.NotUsed
@@ -23,6 +21,8 @@ import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.testkit.typed.scaladsl.TestProbe
+import org.scalatest.wordspec.AnyWordSpecLike
+
final class GracefulStopSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
"Graceful stop" must {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala
index 4bea708d6a..b4775e4f1b 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/LoggerOpsSpec.scala
@@ -13,14 +13,15 @@
package org.apache.pekko.actor.typed.scaladsl
-import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.LoggerFactory
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import org.slf4j.LoggerFactory
+
object LoggerOpsSpec {
case class Value1(i: Int)
case class Value2(i: Int)
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala
index 0f9b6a42c7..32f549bc5b 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MailboxSelectorSpec.scala
@@ -17,10 +17,6 @@
package org.apache.pekko.actor.typed.scaladsl
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.ActorCell
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -38,6 +34,11 @@ import pekko.dispatch.Dispatchers
import pekko.dispatch.MessageQueue
import pekko.dispatch.NodeMessageQueue
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object MailboxSelectorSpec {
val config = ConfigFactory.parseString(
"""
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala
index a45a03e875..d05d42e02e 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/MessageAdapterSpec.scala
@@ -13,10 +13,6 @@
package org.apache.pekko.actor.typed.scaladsl
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-import org.slf4j.LoggerFactory
-
import org.apache.pekko
import pekko.actor.DeadLetter
import pekko.actor.testkit.typed.TestException
@@ -31,6 +27,12 @@ import pekko.actor.typed.PostStop
import pekko.actor.typed.Props
import pekko.actor.typed.internal.AdaptMessage
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import org.slf4j.LoggerFactory
+
+import com.typesafe.config.ConfigFactory
+
object MessageAdapterSpec {
val config = ConfigFactory.parseString("""
pekko.log-dead-letters = on
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala
index 570c77491b..6c81d4178a 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/OnSignalSpec.scala
@@ -14,8 +14,6 @@
package org.apache.pekko.actor.typed
package scaladsl
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.ActorTestKit
@@ -23,6 +21,8 @@ import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.testkit.typed.scaladsl.TestProbe
+import org.scalatest.wordspec.AnyWordSpecLike
+
final class OnSignalSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
"An Actor.OnSignal behavior" must {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala
index 45545ebc12..9553e94f63 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/ReceivePartialSpec.scala
@@ -16,13 +16,13 @@ package scaladsl
import scala.concurrent.ExecutionContextExecutor
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.testkit.typed.scaladsl.TestProbe
+import org.scalatest.wordspec.AnyWordSpecLike
+
class ReceivePartialSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
implicit val ec: ExecutionContextExecutor = system.executionContext
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala
index a332ccf4a6..40f867d5c7 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/RoutersSpec.scala
@@ -13,8 +13,7 @@
package org.apache.pekko.actor.typed.scaladsl
import java.util.concurrent.atomic.AtomicInteger
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpecLike
+
import org.apache.pekko
import pekko.actor.{ ActorPath, ActorSystem }
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -28,6 +27,9 @@ import pekko.actor.typed.receptionist.Receptionist
import pekko.actor.typed.receptionist.ServiceKey
import pekko.actor.typed.scaladsl.adapter._
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpecLike
+
class RoutersSpec extends ScalaTestWithActorTestKit("""
pekko.loglevel=debug
""") with AnyWordSpecLike with Matchers with LogCapturing {
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala
index 9841a09ab6..05e4a597a1 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashBufferSpec.scala
@@ -13,15 +13,15 @@
package org.apache.pekko.actor.typed.scaladsl
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.testkit.typed.internal.StubbedActorContext
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.TestInbox
import pekko.actor.typed.Behavior
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class StashBufferSpec extends AnyWordSpec with Matchers with LogCapturing {
val context = new StubbedActorContext[String](
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala
index cfe803dd03..496e4d1f5e 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StashSpec.scala
@@ -19,8 +19,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.duration._
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.TestException
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -28,6 +26,8 @@ import pekko.actor.testkit.typed.scaladsl.LoggingTestKit
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import pekko.actor.testkit.typed.scaladsl.TestProbe
+import org.scalatest.wordspec.AnyWordSpecLike
+
object AbstractStashSpec {
sealed trait Command
final case class Msg(s: String) extends Command
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala
index ef73035499..770f1d7164 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/StopSpec.scala
@@ -13,8 +13,6 @@
package org.apache.pekko.actor.typed.scaladsl
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -25,6 +23,8 @@ import pekko.actor.typed.Behavior
import pekko.actor.typed.BehaviorInterceptor
import pekko.actor.typed.PostStop
+import org.scalatest.wordspec.AnyWordSpecLike
+
class StopSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
import BehaviorInterceptor._
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala
index 0118fd2aac..8bc0fbb73c 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/AdapterSpec.scala
@@ -15,10 +15,6 @@ package org.apache.pekko.actor.typed.scaladsl.adapter
import scala.util.control.NoStackTrace
-import org.scalatest.BeforeAndAfterAll
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.{ actor => classic }
import pekko.Done
@@ -37,6 +33,10 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.serialization.SerializationExtension
import pekko.testkit._
+import org.scalatest.BeforeAndAfterAll
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
object AdapterSpec {
val classic1: classic.Props = classic.Props(new Classic1)
diff --git a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala
index a2a14118ed..294ea4d081 100644
--- a/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala
+++ b/actor-typed-tests/src/test/scala/org/apache/pekko/actor/typed/scaladsl/adapter/GuardianStartupSpec.scala
@@ -16,10 +16,6 @@ package org.apache.pekko.actor.typed.scaladsl.adapter
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
-import org.scalatest.concurrent.ScalaFutures
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.ActorSystemImpl
import pekko.actor.testkit.typed.scaladsl.ActorTestKit
@@ -27,6 +23,10 @@ import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.typed.ActorSystem
import pekko.actor.typed.scaladsl.Behaviors
+import org.scalatest.concurrent.ScalaFutures
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class GuardianStartupSpec extends AnyWordSpec with Matchers with ScalaFutures with LogCapturing {
"The user guardian" must {
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala
index d60d91077e..4610e563c0 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/ActorSystem.scala
@@ -17,8 +17,6 @@ import java.util.concurrent.{ CompletionStage, ThreadFactory }
import scala.concurrent.{ ExecutionContextExecutor, Future }
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.slf4j.Logger
import org.apache.pekko
import pekko.{ actor => classic, Done }
import pekko.actor.{ Address, BootstrapSetup, ClassicActorSystemProvider }
@@ -30,6 +28,10 @@ import pekko.actor.typed.receptionist.Receptionist
import pekko.annotation.DoNotInherit
import pekko.util.Helpers.{ ConfigOps, Requiring }
+import org.slf4j.Logger
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
/**
* An ActorSystem is home to a hierarchy of Actors. It is created using
* [[ActorSystem#apply]] from a [[Behavior]] object that describes the root
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/LogOptions.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/LogOptions.scala
index 0534e8d745..b9c0db1d1a 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/LogOptions.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/LogOptions.scala
@@ -15,11 +15,11 @@ package org.apache.pekko.actor.typed
import java.util.Optional
+import org.apache.pekko.annotation.{ DoNotInherit, InternalApi }
+
import org.slf4j.Logger
import org.slf4j.event.Level
-import org.apache.pekko.annotation.{ DoNotInherit, InternalApi }
-
/**
* Logging options when using `Behaviors.logMessages`.
*/
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala
index 0fd9c10318..45993e2220 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/Props.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.actor.typed
import scala.annotation.tailrec
import scala.annotation.varargs
+import scala.jdk.CollectionConverters._
import scala.reflect.ClassTag
import org.apache.pekko
import pekko.actor.typed.internal.PropsImpl._
import pekko.annotation.DoNotInherit
import pekko.annotation.InternalApi
-import scala.jdk.CollectionConverters._
object Props {
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala
index 7ec90c850b..9f6f8d163b 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/SupervisorStrategy.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.actor.typed
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
-
-import org.slf4j.event.Level
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.annotation.DoNotInherit
import pekko.annotation.InternalApi
-import scala.jdk.DurationConverters._
+
+import org.slf4j.event.Level
object SupervisorStrategy {
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala
index 5300b96dc8..94ccc54ed5 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ConsumerController.scala
@@ -16,8 +16,7 @@ package org.apache.pekko.actor.typed.delivery
import java.time.{ Duration => JavaDuration }
import scala.concurrent.duration._
-
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.DeadLetterSuppression
@@ -33,7 +32,8 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.ApiMayChange
import pekko.annotation.DoNotInherit
import pekko.annotation.InternalApi
-import scala.jdk.DurationConverters._
+
+import com.typesafe.config.Config
/**
* `ConsumerController` and [[ProducerController]] or [[WorkPullingProducerController]] are used
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala
index 850fa84cf7..d385bd0d8b 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/ProducerController.scala
@@ -17,10 +17,10 @@ import java.time.{ Duration => JavaDuration }
import java.util.Optional
import scala.concurrent.duration._
+import scala.jdk.DurationConverters._
+import scala.jdk.OptionConverters._
import scala.reflect.ClassTag
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
@@ -30,10 +30,10 @@ import pekko.actor.typed.delivery.internal.ProducerControllerImpl
import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.ApiMayChange
import pekko.annotation.InternalApi
-import pekko.util.Helpers.toRootLowerCase
import pekko.util.Helpers.Requiring
-import scala.jdk.DurationConverters._
-import scala.jdk.OptionConverters._
+import pekko.util.Helpers.toRootLowerCase
+
+import com.typesafe.config.Config
/**
* Point-to-point reliable delivery between a single producer actor sending messages and a single consumer
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala
index 6b6d4126fb..3542f83748 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/delivery/WorkPullingProducerController.scala
@@ -16,10 +16,10 @@ package org.apache.pekko.actor.typed.delivery
import java.util.Optional
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.DurationConverters._
+import scala.jdk.OptionConverters._
import scala.reflect.ClassTag
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.Done
import pekko.actor.typed.ActorRef
@@ -29,8 +29,8 @@ import pekko.actor.typed.delivery.internal.WorkPullingProducerControllerImpl
import pekko.actor.typed.receptionist.ServiceKey
import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.ApiMayChange
-import scala.jdk.DurationConverters._
-import scala.jdk.OptionConverters._
+
+import com.typesafe.config.Config
/**
* Work pulling is a pattern where several worker actors pull tasks in their own pace from
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala
index 9b39cfd1b9..2772dfb339 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/eventstream/EventStream.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.actor.typed.eventstream
import scala.reflect.ClassTag
+
import org.apache.pekko
import pekko.actor.InvalidMessageException
import pekko.actor.typed.ActorRef
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala
index 1bf8ff5829..3c267d9f0d 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorContextImpl.scala
@@ -18,25 +18,27 @@ import java.time.Duration
import java.util.ArrayList
import java.util.Optional
import java.util.concurrent.CompletionStage
+
+import scala.annotation.{ nowarn, switch }
import scala.concurrent.{ ExecutionContextExecutor, Future }
+import scala.concurrent.ExecutionContext
+import scala.jdk.DurationConverters._
import scala.reflect.ClassTag
+import scala.util.Failure
+import scala.util.Success
import scala.util.Try
-import scala.annotation.{ nowarn, switch }
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
+
import org.apache.pekko
import pekko.actor.Address
import pekko.actor.typed.internal.adapter.ActorSystemAdapter
import pekko.annotation.InternalApi
-import scala.concurrent.ExecutionContext
import pekko.pattern.StatusReply
import pekko.util.BoxedType
-import scala.jdk.DurationConverters._
import pekko.util.OptionVal
import pekko.util.Timeout
-import scala.util.Failure
-import scala.util.Success
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
/**
* INTERNAL API
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorMdc.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorMdc.scala
index a89855cb0f..0b9b68cff8 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorMdc.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ActorMdc.scala
@@ -13,10 +13,10 @@
package org.apache.pekko.actor.typed.internal
-import org.slf4j.MDC
-
import org.apache.pekko.annotation.InternalApi
+import org.slf4j.MDC
+
/**
* INTERNAL API
*/
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala
index 20485d885f..7fa5c7c83d 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/BehaviorImpl.scala
@@ -14,14 +14,14 @@
package org.apache.pekko.actor.typed
package internal
+import scala.reflect.ClassTag
+
import org.apache.pekko
-import pekko.actor.typed.scaladsl.{ ActorContext => SAC }
import pekko.actor.typed.{ TypedActorContext => AC }
+import pekko.actor.typed.scaladsl.{ ActorContext => SAC }
import pekko.annotation.InternalApi
import pekko.util.{ LineNumbers, OptionVal }
-import scala.reflect.ClassTag
-
/**
* INTERNAL API
*/
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala
index bdd09534a5..5b2ec2a190 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/ExtensionsImpl.scala
@@ -16,13 +16,13 @@ package org.apache.pekko.actor.typed.internal
import java.util.concurrent.{ ConcurrentHashMap, CountDownLatch }
import scala.annotation.tailrec
+import scala.jdk.CollectionConverters._
import scala.util.{ Failure, Success, Try }
import org.apache.pekko
import pekko.actor.typed.{ ActorSystem, Extension, ExtensionId, Extensions }
import pekko.actor.typed.ExtensionSetup
import pekko.annotation.InternalApi
-import scala.jdk.CollectionConverters._
/**
* INTERNAL API
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala
index 0763b22487..4838105e3c 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/InterceptorImpl.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.actor.typed.internal
import scala.reflect.ClassTag
-import org.slf4j.LoggerFactory
-import org.slf4j.event.Level
-
import org.apache.pekko
import pekko.actor.typed
import pekko.actor.typed._
@@ -26,6 +23,9 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.InternalApi
import pekko.util.LineNumbers
+import org.slf4j.LoggerFactory
+import org.slf4j.event.Level
+
/**
* Provides the impl of any behavior that could nest another behavior
*
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala
index 029c924962..d94480e0dd 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/StashBufferImpl.scala
@@ -13,8 +13,12 @@
package org.apache.pekko.actor.typed.internal
+import java.util.function.{ Function => JFunction }
+import java.util.function.Predicate
+
import scala.annotation.tailrec
import scala.util.control.NonFatal
+
import org.apache.pekko
import pekko.actor.DeadLetter
import pekko.actor.typed.Behavior
@@ -28,9 +32,6 @@ import pekko.japi.function.Procedure
import pekko.util.{ unused, ConstantFun }
import pekko.util.OptionVal
-import java.util.function.{ Function => JFunction }
-import java.util.function.Predicate
-
/**
* INTERNAL API
*/
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala
index bbc4366cb2..56e0ca8d57 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/Supervision.scala
@@ -19,9 +19,10 @@ import java.util.concurrent.ThreadLocalRandom
import scala.concurrent.duration.Deadline
import scala.concurrent.duration.FiniteDuration
import scala.reflect.ClassTag
+import scala.util.Try
import scala.util.control.Exception.Catcher
import scala.util.control.NonFatal
-import org.slf4j.event.Level
+
import org.apache.pekko
import pekko.actor.DeadLetterSuppression
import pekko.actor.Dropped
@@ -36,7 +37,7 @@ import pekko.event.Logging
import pekko.util.OptionVal
import pekko.util.unused
-import scala.util.Try
+import org.slf4j.event.Level
/**
* INTERNAL API
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala
index 7724f3cdf8..8672770e2e 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/TimerSchedulerImpl.scala
@@ -16,15 +16,16 @@ package internal
import java.time.Duration
+import scala.concurrent.ExecutionContext
+import scala.concurrent.duration.FiniteDuration
+
import org.apache.pekko
import pekko.actor.{ Cancellable, NotInfluenceReceiveTimeout }
import pekko.actor.typed.scaladsl.{ ActorContext, LoggerOps }
import pekko.annotation.InternalApi
-import scala.concurrent.ExecutionContext
import pekko.util.OptionVal
-import org.slf4j.Logger
-import scala.concurrent.duration.FiniteDuration
+import org.slf4j.Logger
/**
* INTERNAL API
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala
index cf7b371e24..5f1ea08f53 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/WithMdcBehaviorInterceptor.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.actor.typed.internal
import scala.reflect.ClassTag
-import org.slf4j.MDC
-
import org.apache.pekko
import pekko.actor.typed.{ Behavior, BehaviorInterceptor, Signal, TypedActorContext }
import pekko.annotation.InternalApi
+import org.slf4j.MDC
+
/**
* INTERNAL API
*/
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala
index 708c42e19d..8a1c8965aa 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/adapter/ActorSystemAdapter.scala
@@ -16,8 +16,7 @@ package org.apache.pekko.actor.typed.internal.adapter
import java.util.concurrent.CompletionStage
import scala.concurrent.ExecutionContextExecutor
-
-import org.slf4j.{ Logger, LoggerFactory }
+import scala.jdk.FutureConverters._
import org.apache.pekko
import pekko.{ actor => classic }
@@ -42,7 +41,8 @@ import pekko.actor.typed.internal.PropsImpl.DispatcherSameAsParent
import pekko.actor.typed.internal.SystemMessage
import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.InternalApi
-import scala.jdk.FutureConverters._
+
+import org.slf4j.{ Logger, LoggerFactory }
/**
* INTERNAL API. Lightweight wrapper for presenting a classic ActorSystem to a Behavior (via the context).
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala
index 3676e528fa..bc7809a580 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/receptionist/ReceptionistMessages.scala
@@ -13,12 +13,13 @@
package org.apache.pekko.actor.typed.internal.receptionist
+import scala.jdk.CollectionConverters._
+
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.receptionist.{ Receptionist, ServiceKey }
import pekko.actor.typed.receptionist.Receptionist.Command
import pekko.annotation.InternalApi
-import scala.jdk.CollectionConverters._
/**
* Internal API
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala
index 8789052ad6..a8c016fde5 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/internal/routing/PoolRouterImpl.scala
@@ -13,6 +13,9 @@
package org.apache.pekko.actor.typed.internal.routing
+import java.util.function
+import java.util.function.Predicate
+
import org.apache.pekko
import pekko.actor.typed._
import pekko.actor.typed.javadsl.PoolRouter
@@ -20,9 +23,6 @@ import pekko.actor.typed.scaladsl.{ AbstractBehavior, ActorContext, Behaviors }
import pekko.annotation.InternalApi
import pekko.util.ConstantFun
-import java.util.function
-import java.util.function.Predicate
-
/**
* INTERNAL API
*/
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala
index 7dab2e674f..dac41e86be 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ActorContext.scala
@@ -18,13 +18,15 @@ import java.util.Optional
import java.util.concurrent.CompletionStage
import scala.concurrent.ExecutionContextExecutor
-import org.slf4j.Logger
+
import org.apache.pekko
import pekko.actor.ClassicActorContextProvider
import pekko.actor.typed._
import pekko.annotation.DoNotInherit
import pekko.pattern.StatusReply
+import org.slf4j.Logger
+
/**
* An Actor is given by the combination of a [[Behavior]] and a context in
* which this behavior is executed. As per the Actor Model an Actor can perform
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala
index e2c1d3fba3..62440e97b2 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/AskPattern.scala
@@ -17,13 +17,14 @@ package javadsl
import java.time.Duration
import java.util.concurrent.CompletionStage
+import scala.jdk.DurationConverters._
+import scala.jdk.FutureConverters._
+
import org.apache.pekko
import pekko.actor.typed.Scheduler
import pekko.actor.typed.scaladsl.AskPattern._
import pekko.japi.function.{ Function => JFunction }
import pekko.pattern.StatusReply
-import scala.jdk.FutureConverters._
-import scala.jdk.DurationConverters._
/**
* The ask-pattern implements the initiator side of a request–reply protocol.
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala
index 9a754a8e50..0556652034 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Behaviors.scala
@@ -16,6 +16,7 @@ package org.apache.pekko.actor.typed.javadsl
import java.util.Collections
import java.util.function.{ Function => JFunction, Supplier }
+import scala.jdk.CollectionConverters._
import scala.reflect.ClassTag
import org.apache.pekko
@@ -23,7 +24,6 @@ import pekko.actor.typed._
import pekko.actor.typed.internal.{ BehaviorImpl, StashBufferImpl, TimerSchedulerImpl, WithMdcBehaviorInterceptor }
import pekko.japi.function.{ Effect, Function2 => JapiFunction2 }
import pekko.japi.pf.PFBuilder
-import scala.jdk.CollectionConverters._
import pekko.util.unused
/**
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala
index ec60a85f74..1b72e8cab4 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/ReceiveBuilder.scala
@@ -13,14 +13,14 @@
package org.apache.pekko.actor.typed.javadsl
+import scala.annotation.tailrec
+
import org.apache.pekko
import pekko.actor.typed.{ Behavior, MessageAdaptionFailure, Signal }
import pekko.annotation.InternalApi
import pekko.japi.function.{ Creator, Function => JFunction, Predicate => JPredicate }
import pekko.util.OptionVal
-import scala.annotation.tailrec
-
/**
* Mutable builder used when implementing [[AbstractBehavior]].
*
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
index d7367220c7..0bdbf7e3f0 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/Routers.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.actor.typed.javadsl
+import java.util.function.Predicate
+
import org.apache.pekko
import pekko.actor.typed.{ Behavior, Props }
import pekko.actor.typed.internal.BehaviorImpl.DeferredBehavior
@@ -20,8 +22,6 @@ import pekko.actor.typed.internal.routing.{ GroupRouterBuilder, PoolRouterBuilde
import pekko.actor.typed.receptionist.ServiceKey
import pekko.annotation.DoNotInherit
-import java.util.function.Predicate
-
object Routers {
/**
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala
index f63d7d5c17..1ddf7f4b81 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/javadsl/StashBuffer.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.actor.typed.javadsl
+import java.util.function.{ Function => JFunction, Predicate }
+
import org.apache.pekko
import pekko.actor.typed.{ scaladsl, Behavior }
import pekko.annotation.DoNotInherit
import pekko.japi.function.Procedure
-import java.util.function.{ Function => JFunction, Predicate }
-
/**
* A non thread safe mutable message buffer that can be used to buffer messages inside actors
* and then unstash them.
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala
index d04aaa498e..b6fdb63441 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/receptionist/Receptionist.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.actor.typed.receptionist
+import scala.jdk.CollectionConverters._
import scala.reflect.ClassTag
import org.apache.pekko
import pekko.actor.typed.{ ActorRef, ActorSystem, Extension, ExtensionId, ExtensionSetup }
import pekko.actor.typed.internal.receptionist._
import pekko.annotation.DoNotInherit
-import scala.jdk.CollectionConverters._
/**
* Register and discover actors that implement a service with a protocol defined by a [[ServiceKey]].
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala
index b8448cc2a7..4e7a9d3328 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/ActorContext.scala
@@ -17,7 +17,7 @@ import scala.concurrent.{ ExecutionContextExecutor, Future }
import scala.concurrent.duration.FiniteDuration
import scala.reflect.ClassTag
import scala.util.Try
-import org.slf4j.Logger
+
import org.apache.pekko
import pekko.actor.ClassicActorContextProvider
import pekko.actor.typed._
@@ -26,6 +26,8 @@ import pekko.annotation.InternalApi
import pekko.pattern.StatusReply
import pekko.util.Timeout
+import org.slf4j.Logger
+
/**
* An Actor is given by the combination of a [[Behavior]] and a context in
* which this behavior is executed. As per the Actor Model an Actor can perform
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala
index 709d7a730f..c1e5993a37 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/AskPattern.scala
@@ -15,8 +15,9 @@ package org.apache.pekko.actor.typed.scaladsl
import java.util.concurrent.TimeoutException
-import scala.concurrent.Future
import scala.annotation.nowarn
+import scala.concurrent.Future
+
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala
index 93c71616c7..b0e8927c1e 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/Behaviors.scala
@@ -15,6 +15,7 @@ package org.apache.pekko.actor.typed
package scaladsl
import scala.reflect.ClassTag
+
import org.apache.pekko
import org.apache.pekko.actor.typed.SuperviseBehavior
import pekko.actor.typed.internal._
diff --git a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/TimerScheduler.scala b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/TimerScheduler.scala
index f121810e2e..95e4e4ea00 100644
--- a/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/TimerScheduler.scala
+++ b/actor-typed/src/main/scala/org/apache/pekko/actor/typed/scaladsl/TimerScheduler.scala
@@ -13,10 +13,10 @@
package org.apache.pekko.actor.typed.scaladsl
-import org.apache.pekko.annotation.DoNotInherit
-
import scala.concurrent.duration.FiniteDuration
+import org.apache.pekko.annotation.DoNotInherit
+
/**
* Support for scheduled `self` messages in an actor.
* It is used with `Behaviors.withTimers`.
diff --git a/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala b/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
index 412ae84c09..ae56c30df0 100644
--- a/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
+++ b/actor/src/main/scala-2.13/org/apache/pekko/util/ByteIterator.scala
@@ -14,14 +14,15 @@
package org.apache.pekko.util
import java.nio.{ ByteBuffer, ByteOrder }
+
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.BufferedIterator
import scala.collection.LinearSeq
import scala.collection.mutable.ListBuffer
import scala.reflect.ClassTag
-import org.apache.pekko.util.Collections.EmptyImmutableSeq
-import scala.annotation.nowarn
+import org.apache.pekko.util.Collections.EmptyImmutableSeq
object ByteIterator {
object ByteArrayIterator {
diff --git a/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala b/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala
index 5db8d7e45c..277960a4b5 100644
--- a/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala
+++ b/actor/src/main/scala-2.13/org/apache/pekko/util/ByteString.scala
@@ -18,6 +18,7 @@ import java.lang.{ Iterable => JIterable }
import java.nio.{ ByteBuffer, ByteOrder }
import java.nio.charset.{ Charset, StandardCharsets }
import java.util.Base64
+
import scala.annotation.{ nowarn, tailrec, varargs }
import scala.collection.{ immutable, mutable }
import scala.collection.immutable.{ IndexedSeq, IndexedSeqOps, StrictOptimizedSeqOps, VectorBuilder }
diff --git a/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala b/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala
index b252005c92..60d7b46424 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/AbstractFSM.scala
@@ -14,10 +14,10 @@
package org.apache.pekko.actor
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.DurationConverters._
import org.apache.pekko
import org.apache.pekko.japi.function.{ Effect, Function2, Predicate, Predicate2, Procedure, Procedure2, Procedure3 }
-import scala.jdk.DurationConverters._
/**
* Java API: compatible with lambda expressions
diff --git a/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala b/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala
index ae3e955982..4fa0d2dbe1 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/AbstractProps.scala
@@ -13,8 +13,8 @@
package org.apache.pekko.actor
-import java.lang.reflect.Modifier
import java.lang.reflect.Constructor
+import java.lang.reflect.Modifier
import scala.annotation.tailrec
import scala.annotation.varargs
diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala
index 21cb084168..fe22af4a6c 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/ActorPath.scala
@@ -15,13 +15,12 @@ package org.apache.pekko.actor
import java.lang.{ StringBuilder => JStringBuilder }
import java.net.MalformedURLException
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
-
-import scala.annotation.nowarn
+import scala.jdk.CollectionConverters._
import org.apache.pekko
-import scala.jdk.CollectionConverters._
/**
* Java API
diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala
index df49ea903e..0cc578f23a 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/ActorSelection.scala
@@ -16,18 +16,17 @@ package org.apache.pekko.actor
import java.util.concurrent.CompletionStage
import java.util.regex.Pattern
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
+import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.Promise
import scala.concurrent.duration._
import scala.language.implicitConversions
import scala.util.Success
-import scala.annotation.nowarn
-
import org.apache.pekko
-import scala.concurrent.ExecutionContext
import pekko.pattern.ask
import pekko.routing.MurmurHash
import pekko.util.{ Helpers, Timeout }
@@ -105,8 +104,8 @@ abstract class ActorSelection extends Serializable {
* supplied `timeout`.
*/
def resolveOne(timeout: java.time.Duration): CompletionStage[ActorRef] = {
- import scala.jdk.FutureConverters._
import scala.jdk.DurationConverters._
+ import scala.jdk.FutureConverters._
resolveOne(timeout.toScala).asJava
}
diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
index 5f02c3d9c4..d114981732 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
@@ -23,11 +23,12 @@ import scala.collection.immutable
import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, Future, Promise }
import scala.concurrent.blocking
import scala.concurrent.duration.Duration
+import scala.jdk.CollectionConverters._
+import scala.jdk.FutureConverters._
+import scala.jdk.OptionConverters._
import scala.util.{ Failure, Success, Try }
import scala.util.control.{ ControlThrowable, NonFatal }
-import com.typesafe.config.{ Config, ConfigFactory }
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor.dungeon.ChildrenContainer
@@ -40,10 +41,9 @@ import pekko.event.Logging.DefaultLogger
import pekko.japi.Util.immutableSeq
import pekko.serialization.SerializationExtension
import pekko.util._
-import scala.jdk.FutureConverters._
-import scala.jdk.OptionConverters._
import pekko.util.Helpers.toRootLowerCase
-import scala.jdk.CollectionConverters._
+
+import com.typesafe.config.{ Config, ConfigFactory }
object BootstrapSetup {
diff --git a/actor/src/main/scala/org/apache/pekko/actor/Address.scala b/actor/src/main/scala/org/apache/pekko/actor/Address.scala
index c38c44c3a1..e13cb96bac 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/Address.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/Address.scala
@@ -20,10 +20,10 @@ import java.util.Optional
import scala.annotation.tailrec
import scala.collection.immutable
+import scala.jdk.OptionConverters._
import org.apache.pekko
import pekko.annotation.InternalApi
-import scala.jdk.OptionConverters._
/**
* The address specifies the physical location under which an Actor can be
diff --git a/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala b/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala
index 80976cf646..8491f64bd2 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/CoordinatedShutdown.scala
@@ -23,20 +23,20 @@ import scala.annotation.tailrec
import scala.concurrent.{ Await, ExecutionContext, Future, Promise }
import scala.concurrent.duration._
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.FutureConverters._
+import scala.jdk.OptionConverters._
import scala.util.Try
import scala.util.control.NonFatal
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.Done
import pekko.annotation.InternalApi
import pekko.event.Logging
import pekko.pattern.after
-import scala.jdk.OptionConverters._
import pekko.util.OptionVal
-import scala.jdk.FutureConverters._
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
object CoordinatedShutdown extends ExtensionId[CoordinatedShutdown] with ExtensionIdProvider {
diff --git a/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala b/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala
index 7b04e25d7c..ebbc9d79b3 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/Deployer.scala
@@ -15,16 +15,16 @@ package org.apache.pekko.actor
import java.util.concurrent.atomic.AtomicReference
-import scala.annotation.tailrec
-
import scala.annotation.nowarn
-import com.typesafe.config._
+import scala.annotation.tailrec
import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.routing._
import pekko.util.WildcardIndex
+import com.typesafe.config._
+
object Deploy {
final val NoDispatcherGiven = ""
final val NoMailboxGiven = ""
diff --git a/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala b/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala
index 5fa527de8e..01c5f92a2f 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/FaultHandling.scala
@@ -13,22 +13,23 @@
package org.apache.pekko.actor
-import org.apache.pekko
-import pekko.annotation.InternalApi
-import pekko.event.Logging
-import pekko.event.Logging.{ Error, LogEvent, LogLevel }
-import pekko.japi.Util.immutableSeq
-import scala.jdk.DurationConverters._
-
-import java.lang.reflect.InvocationTargetException
import java.lang.{ Iterable => JIterable }
+import java.lang.reflect.InvocationTargetException
import java.util.concurrent.TimeUnit
+
import scala.collection.immutable
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.duration.Duration
+import scala.jdk.DurationConverters._
import scala.language.implicitConversions
import scala.util.control.NonFatal
+import org.apache.pekko
+import pekko.annotation.InternalApi
+import pekko.event.Logging
+import pekko.event.Logging.{ Error, LogEvent, LogLevel }
+import pekko.japi.Util.immutableSeq
+
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala b/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala
index 48dad83575..0094a1d7ab 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/IndirectActorProducer.scala
@@ -13,9 +13,8 @@
package org.apache.pekko.actor
-import scala.collection.immutable
-
import scala.annotation.nowarn
+import scala.collection.immutable
import org.apache.pekko
import pekko.japi.function.Creator
diff --git a/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala b/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala
index 912ef5512c..a818dc5d50 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/LightArrayRevolverScheduler.scala
@@ -24,13 +24,14 @@ import scala.concurrent.{ Await, ExecutionContext, Future, Promise }
import scala.concurrent.duration._
import scala.util.control.NonFatal
-import com.typesafe.config.Config
import org.apache.pekko
import pekko.actor.Scheduler.AtomicCancellable
import pekko.dispatch.AbstractNodeQueue
import pekko.event.LoggingAdapter
import pekko.util.Helpers
+import com.typesafe.config.Config
+
/**
* This scheduler implementation is based on a revolving wheel of buckets,
* like Netty’s HashedWheelTimer, which it advances at a fixed tick rate and
diff --git a/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala b/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala
index 96e821812d..122cce4d33 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/RepointableActorRef.scala
@@ -16,12 +16,11 @@ package org.apache.pekko.actor
import java.util.{ LinkedList => JLinkedList }
import java.util.concurrent.locks.ReentrantLock
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
import scala.util.control.NonFatal
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.actor.dungeon.ChildrenContainer
import pekko.dispatch._
diff --git a/actor/src/main/scala/org/apache/pekko/actor/Timers.scala b/actor/src/main/scala/org/apache/pekko/actor/Timers.scala
index 20d92f019d..5b264ba4ac 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/Timers.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/Timers.scala
@@ -14,11 +14,11 @@
package org.apache.pekko.actor
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.annotation.DoNotInherit
import pekko.dispatch.Envelope
-import scala.jdk.DurationConverters._
import pekko.util.OptionVal
/**
diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala
index adcbecc8c3..b450ce5fe6 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Children.scala
@@ -15,10 +15,11 @@ package org.apache.pekko.actor.dungeon
import java.util.Optional
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
import scala.util.control.NonFatal
-import scala.annotation.nowarn
+
import org.apache.pekko
import pekko.actor._
import pekko.annotation.InternalStableApi
diff --git a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala
index 1d07d3d0be..99ef72718d 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/dungeon/Dispatch.scala
@@ -13,12 +13,11 @@
package org.apache.pekko.actor.dungeon
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.util.control.{ NoStackTrace, NonFatal }
import scala.util.control.Exception.Catcher
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.PekkoException
import pekko.actor._
diff --git a/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala b/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala
index c3ac3ffbcb..152688220a 100644
--- a/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala
+++ b/actor/src/main/scala/org/apache/pekko/actor/setup/ActorSystemSetup.scala
@@ -16,11 +16,11 @@ package org.apache.pekko.actor.setup
import java.util.Optional
import scala.annotation.varargs
+import scala.jdk.OptionConverters._
import scala.reflect.ClassTag
import org.apache.pekko
import pekko.annotation.InternalApi
-import scala.jdk.OptionConverters._
/**
* Marker supertype for a setup part that can be put inside [[pekko.actor.setup.ActorSystemSetup]], if a specific concrete setup
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala b/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala
index 6b2ccea821..d0f0ec0fa1 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala
@@ -13,13 +13,14 @@
package org.apache.pekko.dispatch
-import org.apache.pekko
-import pekko.annotation.InternalApi
-
import java.util.concurrent.Executor
+
import scala.annotation.tailrec
import scala.concurrent._
+import org.apache.pekko
+import pekko.annotation.InternalApi
+
/**
* INTERNAL API
*
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala b/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala
index 073c2d1a16..c46edde915 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/CompletionStages.scala
@@ -17,14 +17,15 @@
package org.apache.pekko.dispatch
-import org.apache.pekko
-
import java.util.Optional
-import java.util.concurrent.atomic.AtomicReference
import java.util.concurrent.{ CompletableFuture, CompletionStage, Executor }
+import java.util.concurrent.atomic.AtomicReference
import java.util.function.{ BiConsumer, BiFunction }
+
import scala.annotation.nowarn
+import org.apache.pekko
+
/**
* CompletionStages provides utilities for working with `CompletionStage`s.
*/
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala
index 96b82f9a5c..951cd75d21 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala
@@ -16,11 +16,10 @@ package org.apache.pekko.dispatch
import java.util.concurrent.{ ExecutorService, RejectedExecutionException }
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater
+import scala.annotation.nowarn
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.actor.ActorCell
import pekko.dispatch.sysmsg.SystemMessage
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
index f38b6f3cb8..52ad8f08e4 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatchers.scala
@@ -14,10 +14,10 @@
package org.apache.pekko.dispatch
import java.util.concurrent.{ ConcurrentHashMap, ThreadFactory }
+
import scala.annotation.{ nowarn, tailrec }
import scala.concurrent.ExecutionContext
-import com.typesafe.config.{ Config, ConfigFactory, ConfigValueType }
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor.{ ActorSystem, DynamicAccess, Scheduler }
@@ -26,6 +26,8 @@ import pekko.event.{ EventStream, LoggingAdapter }
import pekko.event.Logging.Warning
import pekko.util.Helpers.ConfigOps
+import com.typesafe.config.{ Config, ConfigFactory, ConfigValueType }
+
/**
* DispatcherPrerequisites represents useful contextual pieces when constructing a MessageDispatcher
*/
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala b/actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala
index 15aef6536b..7aa1aeabdd 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala
@@ -13,11 +13,12 @@
package org.apache.pekko.dispatch
-import com.typesafe.config.Config
+import java.util.concurrent.{ ExecutorService, ForkJoinPool, ForkJoinTask, ThreadFactory, TimeUnit }
+
import org.apache.pekko
import pekko.util.JavaVersion
-import java.util.concurrent.{ ExecutorService, ForkJoinPool, ForkJoinTask, ThreadFactory, TimeUnit }
+import com.typesafe.config.Config
object ForkJoinExecutorConfigurator {
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala
index e2b0e97959..8114dd3cda 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala
@@ -17,10 +17,11 @@ import java.util.{ Comparator, Deque, PriorityQueue, Queue }
import java.util.concurrent._
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.locks.ReentrantLock
+
import scala.annotation.tailrec
import scala.concurrent.duration.{ Duration, FiniteDuration }
import scala.util.control.NonFatal
-import com.typesafe.config.Config
+
import org.apache.pekko
import pekko.actor.{ ActorCell, ActorRef, ActorSystem, DeadLetter, InternalActorRef }
import pekko.annotation.InternalStableApi
@@ -29,6 +30,8 @@ import pekko.event.Logging.Error
import pekko.util.{ BoundedBlockingQueue, StablePriorityBlockingQueue, StablePriorityQueue }
import pekko.util.Helpers.ConfigOps
+import com.typesafe.config.Config
+
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala
index 9058cfba84..e525f6f703 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/Mailboxes.scala
@@ -21,8 +21,6 @@ import scala.annotation.tailrec
import scala.concurrent.duration.Duration
import scala.util.control.NonFatal
-import com.typesafe.config.{ Config, ConfigFactory }
-
import org.apache.pekko
import pekko.ConfigurationException
import pekko.actor.{ Actor, ActorRef, ActorSystem, DeadLetter, Deploy, DynamicAccess, Props }
@@ -37,6 +35,8 @@ import pekko.event.EventStream
import pekko.event.Logging.Warning
import pekko.util.Reflect
+import com.typesafe.config.{ Config, ConfigFactory }
+
object Mailboxes {
final val DefaultMailboxId = "pekko.actor.default-mailbox"
final val NoMailboxRequirement = ""
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala b/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala
index de6c1377f4..093c5645f1 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/ThreadPoolBuilder.scala
@@ -13,10 +13,6 @@
package org.apache.pekko.dispatch
-import org.apache.pekko
-import pekko.annotation.InternalApi
-import pekko.dispatch.VirtualThreadSupport.newVirtualThreadFactory
-
import java.util.Collection
import java.util.concurrent.{
ArrayBlockingQueue,
@@ -35,9 +31,14 @@ import java.util.concurrent.{
TimeUnit
}
import java.util.concurrent.atomic.{ AtomicLong, AtomicReference }
+
import scala.concurrent.{ BlockContext, CanAwait }
import scala.concurrent.duration.Duration
+import org.apache.pekko
+import pekko.annotation.InternalApi
+import pekko.dispatch.VirtualThreadSupport.newVirtualThreadFactory
+
object ThreadPoolConfig {
type QueueFactory = () => BlockingQueue[Runnable]
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala
index 0396aad36e..6b3532ba99 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala
@@ -17,14 +17,15 @@
package org.apache.pekko.dispatch
-import org.apache.pekko
-import pekko.annotation.InternalApi
-import pekko.util.JavaVersion
-
import java.lang.invoke.{ MethodHandles, MethodType }
import java.util.concurrent.{ ExecutorService, ForkJoinPool, ForkJoinWorkerThread, ThreadFactory }
+
import scala.util.control.NonFatal
+import org.apache.pekko
+import pekko.annotation.InternalApi
+import pekko.util.JavaVersion
+
@InternalApi
private[dispatch] object VirtualThreadSupport {
val zero = java.lang.Long.valueOf(0L)
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala
index cefd5ab063..5a6a80a38d 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/VirtualizedExecutorService.scala
@@ -17,11 +17,11 @@
package org.apache.pekko.dispatch
-import org.apache.pekko.annotation.InternalApi
-
import java.util
import java.util.concurrent.{ Callable, Executor, ExecutorService, Future, ThreadFactory, TimeUnit }
+import org.apache.pekko.annotation.InternalApi
+
/**
* A virtualized executor service that creates a new virtual thread for each task.
* Will shut down the underlying executor service when this executor is being shutdown.
diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala b/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala
index 21644fe05e..35d10b36ca 100644
--- a/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala
+++ b/actor/src/main/scala/org/apache/pekko/dispatch/affinity/AffinityPool.scala
@@ -19,17 +19,18 @@ import java.util.concurrent._
import java.util.concurrent.TimeUnit.MICROSECONDS
import java.util.concurrent.atomic.AtomicReference
import java.util.concurrent.locks.{ LockSupport, ReentrantLock }
+
import scala.annotation.{ switch, tailrec }
import scala.collection.{ immutable, mutable }
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.annotation.{ ApiMayChange, InternalApi }
import pekko.dispatch._
import pekko.event.Logging
-import pekko.util.ImmutableIntMap
import pekko.util.Helpers.Requiring
+import pekko.util.ImmutableIntMap
+
+import com.typesafe.config.Config
@InternalApi
@ApiMayChange
diff --git a/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala b/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala
index d8dbcc5c95..e9f85a8f56 100644
--- a/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala
+++ b/actor/src/main/scala/org/apache/pekko/event/LoggerMailbox.scala
@@ -13,8 +13,6 @@
package org.apache.pekko.event
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.ActorRef
import pekko.actor.ActorSystem
@@ -25,6 +23,8 @@ import pekko.dispatch.UnboundedMailbox
import pekko.event.Logging.LogEvent
import pekko.util.unused
+import com.typesafe.config.Config
+
trait LoggerMessageQueueSemantics
/**
diff --git a/actor/src/main/scala/org/apache/pekko/event/Logging.scala b/actor/src/main/scala/org/apache/pekko/event/Logging.scala
index 968c72f0a3..c5e08081e3 100644
--- a/actor/src/main/scala/org/apache/pekko/event/Logging.scala
+++ b/actor/src/main/scala/org/apache/pekko/event/Logging.scala
@@ -15,15 +15,15 @@ package org.apache.pekko.event
import java.util.concurrent.TimeoutException
import java.util.concurrent.atomic.AtomicInteger
+import java.util.concurrent.locks.ReentrantLock
import scala.annotation.implicitNotFound
+import scala.annotation.nowarn
import scala.collection.immutable
import scala.concurrent.Await
import scala.language.existentials
import scala.util.control.{ NoStackTrace, NonFatal }
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.{ ConfigurationException, PekkoException }
import pekko.actor._
@@ -35,8 +35,6 @@ import pekko.util.Helpers
import pekko.util.Timeout
import pekko.util.unused
-import java.util.concurrent.locks.ReentrantLock
-
/**
* This trait brings log level handling to the EventStream: it reads the log
* levels for the initial logging (StandardOutLogger) and the loggers & level
@@ -1638,10 +1636,10 @@ trait DiagnosticLoggingAdapter extends LoggingAdapter {
import java.{ util => ju }
- import Logging._
-
import scala.jdk.CollectionConverters._
+ import Logging._
+
private var _mdc = emptyMDC
/**
diff --git a/actor/src/main/scala/org/apache/pekko/io/Dns.scala b/actor/src/main/scala/org/apache/pekko/io/Dns.scala
index c112540bcc..1915c1e58d 100644
--- a/actor/src/main/scala/org/apache/pekko/io/Dns.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/Dns.scala
@@ -18,7 +18,6 @@ import java.util.concurrent.ConcurrentHashMap
import java.util.function.{ Function => JFunction }
import scala.annotation.nowarn
-import com.typesafe.config.Config
import org.apache.pekko
import pekko.actor._
@@ -28,6 +27,8 @@ import pekko.event.Logging
import pekko.io.dns.DnsProtocol
import pekko.util.unused
+import com.typesafe.config.Config
+
/**
* Not for user extension.
*
diff --git a/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala b/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala
index 7e74dbfd7e..f6102e2832 100644
--- a/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/InetAddressDnsResolver.scala
@@ -23,8 +23,6 @@ import scala.collection.immutable
import scala.concurrent.duration._
import scala.util.{ Failure, Success, Try }
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.{ Actor, ActorLogging }
import pekko.actor.Status
@@ -38,6 +36,8 @@ import pekko.io.dns.DnsProtocol.Srv
import pekko.io.dns.ResourceRecord
import pekko.util.Helpers.Requiring
+import com.typesafe.config.Config
+
/**
* INTERNAL API
*
diff --git a/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala b/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala
index f6dfdd5833..db0bd4ace6 100644
--- a/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/SelectionHandler.scala
@@ -25,8 +25,6 @@ import scala.concurrent.ExecutionContext
import scala.util.Try
import scala.util.control.NonFatal
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor._
import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics }
@@ -36,6 +34,8 @@ import pekko.routing.RandomPool
import pekko.util.Helpers.Requiring
import pekko.util.SerializedSuspendableExecutionContext
+import com.typesafe.config.Config
+
abstract class SelectionHandlerSettings(config: Config) {
import config._
diff --git a/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala b/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala
index f7692278b8..62a2481846 100644
--- a/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/SimpleDnsManager.scala
@@ -14,7 +14,9 @@
package org.apache.pekko.io
import java.util.concurrent.TimeUnit
+
import scala.concurrent.duration.Duration
+
import org.apache.pekko
import pekko.actor.{ Actor, ActorLogging, Deploy, Props }
import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics }
diff --git a/actor/src/main/scala/org/apache/pekko/io/Tcp.scala b/actor/src/main/scala/org/apache/pekko/io/Tcp.scala
index 6c84bcadcc..38ec52095f 100644
--- a/actor/src/main/scala/org/apache/pekko/io/Tcp.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/Tcp.scala
@@ -18,11 +18,11 @@ import java.net.InetSocketAddress
import java.net.Socket
import java.nio.file.{ Path, Paths }
+import scala.annotation.nowarn
import scala.collection.immutable
import scala.concurrent.duration._
-
-import scala.annotation.nowarn
-import com.typesafe.config.Config
+import scala.jdk.CollectionConverters._
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor._
@@ -30,8 +30,8 @@ import pekko.annotation.InternalApi
import pekko.io.Inet._
import pekko.util.{ ByteString, Helpers }
import pekko.util.Helpers.Requiring
-import scala.jdk.DurationConverters._
-import scala.jdk.CollectionConverters._
+
+import com.typesafe.config.Config
/**
* TCP Extension for Akka’s IO layer.
diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala b/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala
index 7b66d5a951..ae0c535a55 100644
--- a/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala
@@ -20,13 +20,12 @@ import java.nio.channels.{ FileChannel, SocketChannel }
import java.nio.channels.SelectionKey._
import java.nio.file.Path
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.duration._
import scala.util.control.{ NoStackTrace, NonFatal }
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.actor._
import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics }
diff --git a/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala b/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala
index 21e96314c4..5adb59024a 100644
--- a/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/TcpIncomingConnection.scala
@@ -15,9 +15,8 @@ package org.apache.pekko.io
import java.nio.channels.SocketChannel
-import scala.collection.immutable
-
import scala.annotation.nowarn
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.ActorRef
diff --git a/actor/src/main/scala/org/apache/pekko/io/Udp.scala b/actor/src/main/scala/org/apache/pekko/io/Udp.scala
index d19a0f230b..f2cb936ee0 100644
--- a/actor/src/main/scala/org/apache/pekko/io/Udp.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/Udp.scala
@@ -16,10 +16,8 @@ package org.apache.pekko.io
import java.net.DatagramSocket
import java.net.InetSocketAddress
-import scala.collection.immutable
-
import scala.annotation.nowarn
-import com.typesafe.config.Config
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor._
@@ -27,6 +25,8 @@ import pekko.io.Inet.{ SoJavaFactories, SocketOption }
import pekko.util.ByteString
import pekko.util.Helpers.Requiring
+import com.typesafe.config.Config
+
/**
* UDP Extension for Akka’s IO layer.
*
@@ -255,10 +255,10 @@ class UdpExt(system: ExtendedActorSystem) extends IO.Extension {
object UdpMessage {
import java.lang.{ Iterable => JIterable }
- import Udp._
-
import scala.jdk.CollectionConverters._
+ import Udp._
+
/**
* Each [[Udp.Send]] can optionally request a positive acknowledgment to be sent
* to the commanding actor. If such notification is not desired the [[Udp.Send#ack]]
diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala b/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala
index 91464ce448..cb670dbc38 100644
--- a/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala
@@ -16,9 +16,8 @@ package org.apache.pekko.io
import java.lang.{ Iterable => JIterable }
import java.net.InetSocketAddress
-import scala.collection.immutable
-
import scala.annotation.nowarn
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor._
diff --git a/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala b/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala
index 6049a120a5..bdc3d36fa6 100644
--- a/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/UdpSender.scala
@@ -13,6 +13,7 @@
package org.apache.pekko.io
+import scala.annotation.nowarn
import scala.collection.immutable
import scala.util.control.NonFatal
@@ -21,7 +22,6 @@ import pekko.actor._
import pekko.dispatch.{ RequiresMessageQueue, UnboundedMessageQueueSemantics }
import pekko.io.Inet.{ DatagramChannelCreator, SocketOption }
import pekko.io.Udp._
-import scala.annotation.nowarn
/**
* INTERNAL API
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala b/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala
index ec3dadbfb7..803192fe2d 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/CachePolicy.scala
@@ -14,10 +14,10 @@
package org.apache.pekko.io.dns
import scala.concurrent.duration.{ Duration, FiniteDuration, _ }
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.annotation.InternalApi
-import scala.jdk.DurationConverters._
object CachePolicy {
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala b/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala
index d83f3e1a88..b73240afcf 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/DnsProtocol.scala
@@ -20,12 +20,12 @@ import java.net.UnknownHostException
import java.util
import scala.collection.{ immutable => im }
+import scala.jdk.CollectionConverters._
import org.apache.pekko
import pekko.actor.NoSerializationVerificationNeeded
import pekko.io.IpVersionSelector
import pekko.routing.ConsistentHashingRouter.ConsistentHashable
-import scala.jdk.CollectionConverters._
/**
* Supersedes [[pekko.io.Dns]] protocol.
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala b/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala
index b46fd8529f..273d2f1596 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/DnsSettings.scala
@@ -35,10 +35,10 @@ import java.util
import scala.collection.immutable
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.CollectionConverters._
+import scala.jdk.DurationConverters._
import scala.util.{ Failure, Success, Try }
-import com.typesafe.config.{ Config, ConfigValueType }
-
import org.apache.pekko
import pekko.actor.ExtendedActorSystem
import pekko.annotation.InternalApi
@@ -48,8 +48,8 @@ import pekko.io.dns.IdGenerator.Policy
import pekko.io.dns.internal.{ ResolvConf, ResolvConfParser }
import pekko.util.Helpers
import pekko.util.Helpers.Requiring
-import scala.jdk.DurationConverters._
-import scala.jdk.CollectionConverters._
+
+import com.typesafe.config.{ Config, ConfigValueType }
/** INTERNAL API */
@InternalApi
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/IdGenerator.scala b/actor/src/main/scala/org/apache/pekko/io/dns/IdGenerator.scala
index 68856aa40b..598d41dafa 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/IdGenerator.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/IdGenerator.scala
@@ -17,12 +17,12 @@
package org.apache.pekko.io.dns
-import org.apache.pekko.annotation.InternalApi
-
import java.security.SecureRandom
import java.util.Random
import java.util.concurrent.ThreadLocalRandom
+import org.apache.pekko.annotation.InternalApi
+
/**
* INTERNAL API
*
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala
index e016eba314..28e904b508 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsManager.scala
@@ -19,8 +19,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.duration.Duration
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.{ Actor, ActorLogging, ActorRefFactory, Deploy, ExtendedActorSystem, Props, Timers }
import pekko.annotation.InternalApi
@@ -32,6 +30,8 @@ import pekko.io.dns.internal.AsyncDnsManager.CacheCleanup
import pekko.routing.FromConfig
import pekko.util.Timeout
+import com.typesafe.config.Config
+
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala
index 853980be88..aced67214c 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/AsyncDnsResolver.scala
@@ -18,9 +18,9 @@ import java.net.{ Inet4Address, Inet6Address, InetAddress, InetSocketAddress }
import scala.collection.immutable
import scala.concurrent.ExecutionContextExecutor
import scala.concurrent.Future
-import scala.util.Try
-import scala.util.Success
import scala.util.Failure
+import scala.util.Success
+import scala.util.Try
import scala.util.control.NonFatal
import org.apache.pekko
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala
index 07566dff92..07290c8d6a 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsClient.scala
@@ -14,10 +14,12 @@
package org.apache.pekko.io.dns.internal
import java.net.{ InetAddress, InetSocketAddress }
+
+import scala.annotation.{ nowarn, tailrec }
import scala.collection.{ immutable => im }
import scala.concurrent.duration._
import scala.util.Try
-import scala.annotation.{ nowarn, tailrec }
+
import org.apache.pekko
import pekko.actor.{ Actor, ActorLogging, ActorRef, NoSerializationVerificationNeeded, Props, Stash }
import pekko.actor.Status.Failure
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala
index 1e176f898a..a94f0d621c 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/DnsMessage.scala
@@ -13,12 +13,11 @@
package org.apache.pekko.io.dns.internal
+import scala.annotation.nowarn
import scala.collection.GenTraversableOnce
import scala.collection.immutable.Seq
import scala.util.{ Failure, Success, Try }
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.io.dns.ResourceRecord
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/ResolvConfParser.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/ResolvConfParser.scala
index 06bd049ce0..7678af8537 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/ResolvConfParser.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/ResolvConfParser.scala
@@ -16,9 +16,8 @@ package org.apache.pekko.io.dns.internal
import java.io.File
import java.nio.file.Files
-import scala.util.Try
-
import scala.jdk.CollectionConverters._
+import scala.util.Try
private[dns] case class ResolvConf(search: List[String], ndots: Int)
diff --git a/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala b/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala
index 07fa1ad948..6d32da28c8 100644
--- a/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala
+++ b/actor/src/main/scala/org/apache/pekko/io/dns/internal/TcpDnsClient.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.io.dns.internal
import java.net.InetSocketAddress
+
import org.apache.pekko
import pekko.PekkoException
import pekko.actor.{ Actor, ActorLogging, ActorRef, Stash, Terminated }
diff --git a/actor/src/main/scala/org/apache/pekko/japi/function/Function.scala b/actor/src/main/scala/org/apache/pekko/japi/function/Function.scala
index 669e634800..1a5c03ad40 100644
--- a/actor/src/main/scala/org/apache/pekko/japi/function/Function.scala
+++ b/actor/src/main/scala/org/apache/pekko/japi/function/Function.scala
@@ -13,10 +13,10 @@
package org.apache.pekko.japi.function
-import org.apache.pekko.util.ConstantFun
-
import scala.annotation.nowarn
+import org.apache.pekko.util.ConstantFun
+
/**
* A Function interface. Used to create first-class-functions is Java.
* `Serializable` is needed to be able to grab line number for Java 8 lambdas.
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala
index 515461f475..2cdc45ba22 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/AskSupport.scala
@@ -19,6 +19,7 @@ import java.util.concurrent.TimeoutException
import scala.annotation.{ nowarn, tailrec }
import scala.collection.immutable
import scala.concurrent.{ Future, Promise }
+import scala.concurrent.ExecutionContext
import scala.language.implicitConversions
import scala.util.{ Failure, Success }
import scala.util.control.NoStackTrace
@@ -26,7 +27,6 @@ import scala.util.control.NoStackTrace
import org.apache.pekko
import pekko.actor._
import pekko.annotation.{ InternalApi, InternalStableApi }
-import scala.concurrent.ExecutionContext
import pekko.dispatch.sysmsg._
import pekko.util.{ unused, ByteString, Timeout }
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala b/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala
index 1abbd1a7b6..5c00b5df8d 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/BackoffOptions.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.pattern
+import scala.concurrent.duration.{ Duration, FiniteDuration }
+import scala.jdk.DurationConverters._
+
import org.apache.pekko
import pekko.actor.{ ActorRef, OneForOneStrategy, Props, SupervisorStrategy }
import pekko.annotation.{ DoNotInherit, InternalApi }
import pekko.pattern.internal.{ BackoffOnRestartSupervisor, BackoffOnStopSupervisor }
-import scala.jdk.DurationConverters._
-
-import scala.concurrent.duration.{ Duration, FiniteDuration }
/**
* Backoff options allow to specify a number of properties for backoff supervisors.
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala
index 198ad113f8..f74a0c2ee4 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala
@@ -18,21 +18,23 @@ import java.util.concurrent.{ Callable, CompletionException, CompletionStage, Co
import java.util.concurrent.atomic.{ AtomicBoolean, AtomicInteger, AtomicLong }
import java.util.function.BiFunction
import java.util.function.Consumer
+
import scala.annotation.nowarn
import scala.concurrent.{ Await, ExecutionContext, Future, Promise }
+import scala.concurrent.ExecutionContext.parasitic
import scala.concurrent.TimeoutException
import scala.concurrent.duration._
+import scala.jdk.DurationConverters._
+import scala.jdk.FutureConverters._
import scala.util.{ Failure, Success, Try }
import scala.util.control.NoStackTrace
import scala.util.control.NonFatal
+
import org.apache.pekko
import pekko.PekkoException
import pekko.actor.{ ExtendedActorSystem, Scheduler }
-import scala.concurrent.ExecutionContext.parasitic
-import pekko.pattern.internal.{ CircuitBreakerNoopTelemetry, CircuitBreakerTelemetry }
import pekko.annotation.InternalApi
-import scala.jdk.FutureConverters._
-import scala.jdk.DurationConverters._
+import pekko.pattern.internal.{ CircuitBreakerNoopTelemetry, CircuitBreakerTelemetry }
/**
* Companion object providing factory methods for Circuit Breaker which runs callbacks in caller's thread
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala
index 3724892789..c3694e0b0d 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/CircuitBreakersRegistry.scala
@@ -14,7 +14,10 @@
package org.apache.pekko.pattern
import java.util.concurrent.ConcurrentHashMap
+
import scala.concurrent.duration.{ DurationLong, MILLISECONDS }
+import scala.jdk.CollectionConverters._
+
import org.apache.pekko
import pekko.actor.{
ActorSystem,
@@ -25,7 +28,6 @@ import pekko.actor.{
ExtensionIdProvider
}
import pekko.pattern.internal.CircuitBreakerTelemetryProvider
-import scala.jdk.CollectionConverters._
/**
* Companion object providing factory methods for Circuit Breaker which runs callbacks in caller's thread
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala
index e7dfcf7f09..04204448df 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/GracefulStopSupport.scala
@@ -13,12 +13,12 @@
package org.apache.pekko.pattern
+import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.duration.FiniteDuration
import org.apache.pekko
import pekko.actor._
-import scala.concurrent.ExecutionContext
import pekko.dispatch.sysmsg.{ Unwatch, Watch }
import pekko.util.Timeout
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
index 1e866618f7..d39c5862b8 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/Patterns.scala
@@ -17,14 +17,13 @@ import java.util.Optional
import java.util.concurrent.{ Callable, CompletionStage, TimeUnit }
import java.util.function.IntFunction
+import scala.annotation.nowarn
import scala.concurrent.ExecutionContext
+import scala.jdk.DurationConverters._
+import scala.jdk.FutureConverters._
import org.apache.pekko
import pekko.actor.{ ActorSelection, ClassicActorSystemProvider, Scheduler }
-import scala.jdk.FutureConverters._
-import scala.jdk.DurationConverters._
-
-import scala.annotation.nowarn
/**
* Java API: for Pekko patterns such as `ask`, `pipe` and others which work with [[java.util.concurrent.CompletionStage]].
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala b/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala
index 5582d360cd..0884b71f8e 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/RetrySupport.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.pattern
+import java.util.concurrent.ThreadLocalRandom
+
import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.duration.{ Duration, FiniteDuration }
import scala.util.{ Failure, Success, Try }
@@ -22,8 +24,6 @@ import org.apache.pekko
import pekko.actor.Scheduler
import pekko.util.ConstantFun
-import java.util.concurrent.ThreadLocalRandom
-
/**
* This trait provides the retry utility function
*/
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala b/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala
index 6a2aa767a2..636313b971 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/StatusReply.scala
@@ -13,16 +13,17 @@
package org.apache.pekko.pattern
+import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.util.{ Failure => ScalaFailure }
import scala.util.{ Success => ScalaSuccess }
import scala.util.Try
import scala.util.control.NoStackTrace
+
import org.apache.pekko
import pekko.Done
import pekko.actor.InvalidMessageException
import pekko.annotation.InternalApi
-import scala.concurrent.ExecutionContext
/**
* Generic top-level message type for replies that signal failure or success. Convenient to use together with the
diff --git a/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala b/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala
index 9bd2aa16ac..691134b10a 100644
--- a/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala
+++ b/actor/src/main/scala/org/apache/pekko/pattern/internal/CircuitBreakerTelemetry.scala
@@ -15,10 +15,11 @@ package org.apache.pekko.pattern.internal
import java.util.{ List => JList }
+import scala.jdk.CollectionConverters._
+
import org.apache.pekko
import pekko.actor.ExtendedActorSystem
import pekko.annotation.{ InternalApi, InternalStableApi }
-import scala.jdk.CollectionConverters._
/**
* Service Provider Interface (SPI) for collecting metrics from Circuit Breaker.
diff --git a/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala b/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala
index 286c96177e..f87a0e40d0 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/Balancing.scala
@@ -13,11 +13,8 @@
package org.apache.pekko.routing
-import scala.collection.immutable
-
import scala.annotation.nowarn
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.ActorContext
@@ -27,6 +24,9 @@ import pekko.actor.SupervisorStrategy
import pekko.dispatch.BalancingDispatcherConfigurator
import pekko.dispatch.Dispatchers
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala b/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala
index b1f61cbfe8..b94496205a 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/Broadcast.scala
@@ -13,10 +13,8 @@
package org.apache.pekko.routing
-import scala.collection.immutable
-
import scala.annotation.nowarn
-import com.typesafe.config.Config
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.ActorSystem
@@ -24,6 +22,8 @@ import pekko.actor.SupervisorStrategy
import pekko.dispatch.Dispatchers
import pekko.japi.Util.immutableSeq
+import com.typesafe.config.Config
+
object BroadcastRoutingLogic {
def apply(): BroadcastRoutingLogic = new BroadcastRoutingLogic
}
diff --git a/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala b/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala
index c207a5c579..f4d50b527f 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/ConsistentHashing.scala
@@ -18,8 +18,6 @@ import java.util.concurrent.atomic.AtomicReference
import scala.collection.immutable
import scala.util.control.NonFatal
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.ActorPath
import pekko.actor.ActorSystem
@@ -33,6 +31,8 @@ import pekko.event.Logging
import pekko.japi.Util.immutableSeq
import pekko.serialization.SerializationExtension
+import com.typesafe.config.Config
+
object ConsistentHashingRouter {
/**
diff --git a/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala b/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala
index 7df960b1f2..de1e5bf192 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/OptimalSizeExploringResizer.scala
@@ -18,14 +18,15 @@ import java.util.concurrent.ThreadLocalRandom
import scala.collection.immutable
import scala.concurrent.duration._
+import scala.jdk.DurationConverters._
import OptimalSizeExploringResizer._
-import com.typesafe.config.Config
import org.apache.pekko
import pekko.actor._
import pekko.annotation.InternalApi
-import scala.jdk.DurationConverters._
+
+import com.typesafe.config.Config
trait OptimalSizeExploringResizer extends Resizer {
diff --git a/actor/src/main/scala/org/apache/pekko/routing/Random.scala b/actor/src/main/scala/org/apache/pekko/routing/Random.scala
index 9da3b228d0..4603f09584 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/Random.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/Random.scala
@@ -15,10 +15,8 @@ package org.apache.pekko.routing
import java.util.concurrent.ThreadLocalRandom
-import scala.collection.immutable
-
import scala.annotation.nowarn
-import com.typesafe.config.Config
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.ActorSystem
@@ -26,6 +24,8 @@ import pekko.actor.SupervisorStrategy
import pekko.dispatch.Dispatchers
import pekko.japi.Util.immutableSeq
+import com.typesafe.config.Config
+
object RandomRoutingLogic {
def apply(): RandomRoutingLogic = new RandomRoutingLogic
}
diff --git a/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala b/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala
index d055b59a4d..0addb8c6d8 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/Resizer.scala
@@ -18,8 +18,6 @@ import java.util.concurrent.atomic.AtomicLong
import scala.collection.immutable
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.PekkoException
import pekko.actor.Actor
@@ -33,6 +31,8 @@ import pekko.actor.SupervisorStrategy
import pekko.dispatch.Envelope
import pekko.dispatch.MessageDispatcher
+import com.typesafe.config.Config
+
/**
* [[Pool]]Â routers with dynamically resizable number of routees are implemented by providing a Resizer
* implementation in the [[pekko.routing.Pool]] configuration.
diff --git a/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala b/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala
index ddf279a69b..df967371fd 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/RoundRobin.scala
@@ -15,10 +15,8 @@ package org.apache.pekko.routing
import java.util.concurrent.atomic.AtomicLong
-import scala.collection.immutable
-
import scala.annotation.nowarn
-import com.typesafe.config.Config
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.ActorSystem
@@ -26,6 +24,8 @@ import pekko.actor.SupervisorStrategy
import pekko.dispatch.Dispatchers
import pekko.japi.Util.immutableSeq
+import com.typesafe.config.Config
+
object RoundRobinRoutingLogic {
def apply(): RoundRobinRoutingLogic = new RoundRobinRoutingLogic
}
diff --git a/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala b/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala
index 959d79bf21..052cb81527 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/RouterConfig.scala
@@ -13,9 +13,8 @@
package org.apache.pekko.routing
-import scala.collection.immutable
-
import scala.annotation.nowarn
+import scala.collection.immutable
import org.apache.pekko
import pekko.ConfigurationException
diff --git a/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala b/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala
index d58b802bd8..a82323e474 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/ScatterGatherFirstCompleted.scala
@@ -16,25 +16,25 @@ package org.apache.pekko.routing
import java.util.concurrent.TimeoutException
import scala.collection.immutable
+import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.Promise
import scala.concurrent.duration.FiniteDuration
-
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.ActorRef
import pekko.actor.ActorSystem
import pekko.actor.SupervisorStrategy
import pekko.dispatch.Dispatchers
-import scala.concurrent.ExecutionContext
import pekko.japi.Util.immutableSeq
import pekko.pattern.ask
import pekko.pattern.pipe
import pekko.util.Helpers.ConfigOps
-import scala.jdk.DurationConverters._
import pekko.util.Timeout
+import com.typesafe.config.Config
+
/**
* Broadcasts the message to all routees, and replies with the first response.
*
diff --git a/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala b/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala
index a549d66bd5..60f50940e1 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/SmallestMailbox.scala
@@ -15,12 +15,10 @@ package org.apache.pekko.routing
import java.util.concurrent.ThreadLocalRandom
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
-import scala.annotation.nowarn
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.ActorCell
import pekko.actor.ActorRefWithCell
@@ -28,6 +26,8 @@ import pekko.actor.ActorSystem
import pekko.actor.SupervisorStrategy
import pekko.dispatch.Dispatchers
+import com.typesafe.config.Config
+
object SmallestMailboxRoutingLogic {
def apply(): SmallestMailboxRoutingLogic = new SmallestMailboxRoutingLogic
}
diff --git a/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala b/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala
index 00a47c727b..7c6fbe38d7 100644
--- a/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala
+++ b/actor/src/main/scala/org/apache/pekko/routing/TailChopping.scala
@@ -18,19 +18,19 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.collection.immutable
import scala.concurrent.{ ExecutionContext, Promise }
import scala.concurrent.duration._
+import scala.jdk.DurationConverters._
import scala.util.Random
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor._
import pekko.dispatch.Dispatchers
import pekko.japi.Util.immutableSeq
import pekko.pattern.{ ask, pipe, AskTimeoutException }
import pekko.util.Helpers.ConfigOps
-import scala.jdk.DurationConverters._
import pekko.util.Timeout
+import com.typesafe.config.Config
+
/**
* As each message is sent to the router, the routees are randomly ordered. The message is sent to the
* first routee. If no response is received before the `interval` has passed, the same message is sent
diff --git a/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala b/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala
index 5d8e4369c3..72e9c98062 100644
--- a/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala
+++ b/actor/src/main/scala/org/apache/pekko/serialization/Serialization.scala
@@ -26,13 +26,13 @@ import scala.util.{ DynamicVariable, Failure, Try }
import scala.util.Success
import scala.util.control.NonFatal
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor._
import pekko.annotation.InternalApi
import pekko.event.{ LogMarker, Logging, LoggingAdapter }
+import com.typesafe.config.Config
+
object Serialization {
/**
diff --git a/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala b/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala
index 3d3501293e..a6f942a8a3 100644
--- a/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala
+++ b/actor/src/main/scala/org/apache/pekko/serialization/SerializationSetup.scala
@@ -14,11 +14,11 @@
package org.apache.pekko.serialization
import scala.collection.immutable
+import scala.jdk.CollectionConverters._
import org.apache.pekko
import pekko.actor.ExtendedActorSystem
import pekko.actor.setup.Setup
-import scala.jdk.CollectionConverters._
object SerializationSetup {
diff --git a/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala b/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala
index cf5007f090..0a686df677 100644
--- a/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/ConstantFun.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.util
+import java.lang
+
import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.japi.{ Pair => JPair }
import pekko.japi.function.{ Function => JFun, Function2 => JFun2 }
-import java.lang
-
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/util/DoubleLinkedList.scala b/actor/src/main/scala/org/apache/pekko/util/DoubleLinkedList.scala
index 7ada6789a1..bf2c79b22c 100644
--- a/actor/src/main/scala/org/apache/pekko/util/DoubleLinkedList.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/DoubleLinkedList.scala
@@ -13,10 +13,10 @@
package org.apache.pekko.util
-import org.apache.pekko.annotation.InternalApi
-
import scala.collection.AbstractIterator
+import org.apache.pekko.annotation.InternalApi
+
/**
* INTERNAL API
*
diff --git a/actor/src/main/scala/org/apache/pekko/util/FrequencyList.scala b/actor/src/main/scala/org/apache/pekko/util/FrequencyList.scala
index f6718cd7ff..9f66fc9e59 100644
--- a/actor/src/main/scala/org/apache/pekko/util/FrequencyList.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/FrequencyList.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
-import org.apache.pekko.annotation.InternalApi
-
import scala.collection.{ immutable, mutable }
import scala.concurrent.duration.FiniteDuration
+import org.apache.pekko.annotation.InternalApi
+
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala b/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala
index e54cf1a0b5..5351de7db7 100644
--- a/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala
@@ -29,10 +29,10 @@
package org.apache.pekko.util
-import org.apache.pekko.annotation.InternalApi
-
import scala.util.hashing.MurmurHash3
+import org.apache.pekko.annotation.InternalApi
+
/**
* INTERNAL API
*
diff --git a/actor/src/main/scala/org/apache/pekko/util/FunctionConverters.scala b/actor/src/main/scala/org/apache/pekko/util/FunctionConverters.scala
index 681e150fae..a5ce72ea9c 100644
--- a/actor/src/main/scala/org/apache/pekko/util/FunctionConverters.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/FunctionConverters.scala
@@ -17,10 +17,10 @@
package org.apache.pekko.util
-import org.apache.pekko.annotation.InternalStableApi
-
import scala.jdk.Priority0FunctionExtensions
+import org.apache.pekko.annotation.InternalStableApi
+
/**
* INTERNAL API
*
diff --git a/actor/src/main/scala/org/apache/pekko/util/Helpers.scala b/actor/src/main/scala/org/apache/pekko/util/Helpers.scala
index 8b93060302..1c7bc59758 100644
--- a/actor/src/main/scala/org/apache/pekko/util/Helpers.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/Helpers.scala
@@ -31,8 +31,10 @@ import java.time.format.DateTimeFormatter
import java.util.{ Comparator, Locale }
import java.util.concurrent.TimeUnit
import java.util.regex.Pattern
+
import scala.annotation.tailrec
import scala.concurrent.duration.{ Duration, FiniteDuration }
+
import com.typesafe.config.{ Config, ConfigRenderOptions }
object Helpers {
diff --git a/actor/src/main/scala/org/apache/pekko/util/Index.scala b/actor/src/main/scala/org/apache/pekko/util/Index.scala
index cb1d06f84f..4c333c6346 100644
--- a/actor/src/main/scala/org/apache/pekko/util/Index.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/Index.scala
@@ -17,7 +17,6 @@ import java.util.Comparator
import java.util.concurrent.{ ConcurrentHashMap, ConcurrentSkipListSet }
import scala.annotation.tailrec
-
import scala.jdk.CollectionConverters._
/**
diff --git a/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala b/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala
index b77b46bfad..1692c0c630 100644
--- a/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/ManifestInfo.scala
@@ -17,9 +17,8 @@ import java.io.IOException
import java.util.jar.Attributes
import java.util.jar.Manifest
-import scala.collection.immutable
-
import scala.annotation.nowarn
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.ActorSystem
diff --git a/actor/src/main/scala/org/apache/pekko/util/RecencyList.scala b/actor/src/main/scala/org/apache/pekko/util/RecencyList.scala
index 9087349ba5..c7708d50e2 100644
--- a/actor/src/main/scala/org/apache/pekko/util/RecencyList.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/RecencyList.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
-import org.apache.pekko.annotation.InternalApi
-
import scala.collection.{ immutable, mutable }
import scala.concurrent.duration.FiniteDuration
+import org.apache.pekko.annotation.InternalApi
+
/**
* INTERNAL API
*/
diff --git a/actor/src/main/scala/org/apache/pekko/util/SegmentedRecencyList.scala b/actor/src/main/scala/org/apache/pekko/util/SegmentedRecencyList.scala
index c3fc143d01..0e5320720b 100644
--- a/actor/src/main/scala/org/apache/pekko/util/SegmentedRecencyList.scala
+++ b/actor/src/main/scala/org/apache/pekko/util/SegmentedRecencyList.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.util
-import org.apache.pekko.annotation.InternalApi
-
import scala.collection.{ immutable, mutable }
import scala.concurrent.duration.FiniteDuration
+import org.apache.pekko.annotation.InternalApi
+
/**
* INTERNAL API
*/
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala
index d6348d83b2..8d3e9a74d5 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ActorBenchmark.scala
@@ -19,9 +19,10 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import BenchmarkActors._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
+import com.typesafe.config.ConfigFactory
+
object ActorBenchmark {
// Constants because they are used in annotations
final val threads = 8 // update according to cpu
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala
index b69f7ac504..af04cf6a76 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolComparativeBenchmark.scala
@@ -15,13 +15,14 @@ package org.apache.pekko.actor
import java.util.concurrent.TimeUnit
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
import pekko.actor.BenchmarkActors._
import pekko.actor.ForkJoinActorBenchmark.cores
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Fork(1)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala
index c0b2d94d50..4d3c3b7dfc 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolIdleCPULevelBenchmark.scala
@@ -15,11 +15,12 @@ package org.apache.pekko.actor
import java.util.concurrent.TimeUnit
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko.actor.BenchmarkActors._
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Fork(1)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala
index d5c51a3e6c..76c6c5d95c 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/AffinityPoolRequestResponseBenchmark.scala
@@ -15,13 +15,14 @@ package org.apache.pekko.actor
import java.util.concurrent.{ CountDownLatch, TimeUnit }
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
import pekko.actor.BenchmarkActors._
import pekko.actor.ForkJoinActorBenchmark.cores
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Fork(1)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala
index 16ec75c1fe..1d0d398c05 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ForkJoinActorBenchmark.scala
@@ -20,11 +20,12 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import BenchmarkActors._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko.testkit.TestProbe
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Fork(1)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala
index 2e48e72050..86718f21f7 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/JCToolsMailbox.scala
@@ -16,7 +16,6 @@ package org.apache.pekko.actor
import scala.annotation.tailrec
import scala.concurrent.duration.Duration
-import com.typesafe.config.Config
import org.jctools.queues.MpscGrowableArrayQueue
import org.apache.pekko
@@ -27,6 +26,8 @@ import pekko.dispatch.MailboxType
import pekko.dispatch.MessageQueue
import pekko.dispatch.ProducesMessageQueue
+import com.typesafe.config.Config
+
case class JCToolsMailbox(val capacity: Int) extends MailboxType with ProducesMessageQueue[BoundedNodeMessageQueue] {
def this(settings: ActorSystem.Settings, config: Config) = this(config.getInt("mailbox-capacity"))
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala
index dba7df6c60..7e29323635 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/ManyToOneArrayMailbox.scala
@@ -16,7 +16,6 @@ package org.apache.pekko.actor
import scala.annotation.tailrec
import scala.concurrent.duration.Duration
-import com.typesafe.config.Config
import org.agrona.concurrent.ManyToOneConcurrentArrayQueue
import org.apache.pekko
@@ -27,6 +26,8 @@ import pekko.dispatch.MailboxType
import pekko.dispatch.MessageQueue
import pekko.dispatch.ProducesMessageQueue
+import com.typesafe.config.Config
+
/**
* ManyToOneArrayMailbox is a high-performance, multiple-producer single-consumer, bounded MailboxType,
* Noteworthy is that it discards overflow as DeadLetters.
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala
index 683c6b90ed..ee477beb04 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/StashCreationBenchmark.scala
@@ -18,11 +18,12 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko.testkit.TestProbe
+import com.typesafe.config.ConfigFactory
+
object StashCreationBenchmark {
class StashingActor extends Actor with Stash {
def receive = {
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala
index 7cc0480779..722fcbf8de 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala
@@ -18,7 +18,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.{ Config, ConfigFactory }
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -26,6 +25,8 @@ import pekko.dispatch._
import pekko.testkit.TestProbe
import pekko.util.Helpers.ConfigOps
+import com.typesafe.config.{ Config, ConfigFactory }
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.SingleShotTime))
@Fork(5)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala
index 56049bc876..1760a013e5 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedActorBenchmark.scala
@@ -18,12 +18,13 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
import pekko.actor.typed.scaladsl.AskPattern._
+import com.typesafe.config.ConfigFactory
+
object TypedActorBenchmark {
// Constants because they are used in annotations
final val threads = 8 // update according to cpu
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala
index f0b7854ee2..b986a355ea 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/TypedForkJoinActorBenchmark.scala
@@ -19,7 +19,6 @@ import scala.concurrent.Await
import scala.concurrent.Future
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.annotations.BenchmarkMode
import org.openjdk.jmh.annotations.Fork
@@ -38,6 +37,8 @@ import org.openjdk.jmh.annotations.Warmup
import org.apache.pekko
import pekko.actor.typed.scaladsl.AskPattern._
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Fork(1)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala
index 0651949efb..d8704548d7 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/typed/delivery/ReliableDeliveryBenchmark.scala
@@ -21,7 +21,6 @@ import scala.concurrent.duration._
import scala.util.Failure
import scala.util.Success
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -34,6 +33,8 @@ import pekko.actor.typed.receptionist.ServiceKey
import pekko.actor.typed.scaladsl.AskPattern._
import pekko.actor.typed.scaladsl.Behaviors
+import com.typesafe.config.ConfigFactory
+
object Producer {
trait Command
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala
index 9d8c898f6a..f2e1569fc2 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/cluster/ddata/ORSetSerializationBenchmark.scala
@@ -18,7 +18,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations.{ Scope => JmhScope }
import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.annotations.BenchmarkMode
@@ -38,6 +37,8 @@ import pekko.cluster.Cluster
import pekko.serialization.SerializationExtension
import pekko.serialization.Serializers
+import com.typesafe.config.ConfigFactory
+
@Fork(2)
@State(JmhScope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala
index 0275cc49f5..bd2ea0261e 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/CachingConfigBenchmark.scala
@@ -15,9 +15,10 @@ package org.apache.pekko.dispatch
import java.util.concurrent.TimeUnit
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@BenchmarkMode(Array(Mode.Throughput))
@Fork(2)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala
index b08ddbe34b..bf80a0cf67 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/dispatch/NodeQueueBenchmark.scala
@@ -18,13 +18,14 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
import pekko.actor._
import pekko.testkit.TestProbe
+import com.typesafe.config.ConfigFactory
+
object NodeQueueBenchmark {
final val burst = 100000
case object Stop
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/io/dns/IdGeneratorBanchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/io/dns/IdGeneratorBanchmark.scala
index e6980417c7..a6fcf21457 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/io/dns/IdGeneratorBanchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/io/dns/IdGeneratorBanchmark.scala
@@ -17,6 +17,9 @@
package org.apache.pekko.io.dns
+import java.security.SecureRandom
+import java.util.concurrent.{ ThreadLocalRandom, TimeUnit }
+
import org.openjdk.jmh.annotations.{
Benchmark,
BenchmarkMode,
@@ -30,9 +33,6 @@ import org.openjdk.jmh.annotations.{
Warmup
}
-import java.util.concurrent.{ ThreadLocalRandom, TimeUnit }
-import java.security.SecureRandom
-
@BenchmarkMode(Array(Mode.Throughput))
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Warmup(iterations = 3, time = 5, timeUnit = TimeUnit.SECONDS)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala
index 551d9ea660..e129d0f5a1 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/persistence/LevelDbBatchingBenchmark.scala
@@ -15,18 +15,20 @@ package org.apache.pekko.persistence
import java.io.File
import java.util.concurrent.TimeUnit
+
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
+
import org.apache.commons.io.FileUtils
import org.openjdk.jmh.annotations._
+
import org.apache.pekko
import pekko.actor._
import pekko.persistence.journal.AsyncWriteTarget._
import pekko.persistence.journal.leveldb.{ SharedLeveldbJournal, SharedLeveldbStore }
import pekko.testkit.TestProbe
-import scala.annotation.nowarn
-
/*
# OS: OSX 10.9.3
# CPU: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala
index a1cb3a8561..d60f1dafc1 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/CodecBenchmark.scala
@@ -19,13 +19,12 @@ import java.nio.ByteOrder
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.concurrent.Await
import scala.concurrent.Future
import scala.concurrent.duration._
-import scala.annotation.nowarn
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -42,6 +41,8 @@ import pekko.stream.SystemMaterializer
import pekko.stream.scaladsl._
import pekko.util.OptionVal
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Array(Mode.Throughput))
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala
index 9bf95b8350..e1b904017e 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/SendQueueBenchmark.scala
@@ -20,7 +20,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.agrona.concurrent.ManyToOneConcurrentArrayQueue
import org.openjdk.jmh.annotations._
@@ -31,6 +30,8 @@ import pekko.stream.OverflowStrategy
import pekko.stream.SystemMaterializer
import pekko.stream.scaladsl._
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@BenchmarkMode(Array(Mode.Throughput))
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala
index 15ce77c23a..6ad899dbbc 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/remote/artery/compress/SerializationFormatCacheBenchmark.scala
@@ -13,15 +13,9 @@
package org.apache.pekko.remote.artery.compress
-import org.apache.pekko
-import pekko.actor.Actor
-import pekko.actor.ActorRef
-import pekko.actor.ActorSystem
-import pekko.actor.ExtendedActorSystem
-import pekko.actor.Props
-import pekko.pattern.PromiseActorRef
-import pekko.remote.artery.SerializationFormatCache
-import pekko.serialization.Serialization
+import scala.annotation.nowarn
+import scala.concurrent.Promise
+
import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.annotations.Fork
import org.openjdk.jmh.annotations.Level
@@ -33,8 +27,15 @@ import org.openjdk.jmh.annotations.State
import org.openjdk.jmh.annotations.TearDown
import org.openjdk.jmh.infra.Blackhole
-import scala.annotation.nowarn
-import scala.concurrent.Promise
+import org.apache.pekko
+import pekko.actor.Actor
+import pekko.actor.ActorRef
+import pekko.actor.ActorSystem
+import pekko.actor.ExtendedActorSystem
+import pekko.actor.Props
+import pekko.pattern.PromiseActorRef
+import pekko.remote.artery.SerializationFormatCache
+import pekko.serialization.Serialization
/**
* Actually more like specific benchmarks for the few concrete LRU cache usages
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala b/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala
index 939cbad12c..b4a3719d1f 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/serialization/jackson/JacksonSerializationBench.scala
@@ -19,11 +19,10 @@ import java.time.LocalDateTime
import java.util
import java.util.concurrent.TimeUnit
+import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
-import scala.annotation.nowarn
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -32,6 +31,8 @@ import pekko.serialization.Serialization
import pekko.serialization.SerializationExtension
import pekko.serialization.SerializerWithStringManifest
+import com.typesafe.config.ConfigFactory
+
object JacksonSerializationBench {
trait TestMessage
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala
index 0b00795323..33e9c379ee 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/AskBenchmark.scala
@@ -19,7 +19,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -34,6 +33,8 @@ import pekko.stream.scaladsl._
import pekko.stream.testkit.scaladsl.StreamTestKit
import pekko.util.Timeout
+import com.typesafe.config.ConfigFactory
+
object AskBenchmark {
final val OperationsPerInvocation = 100000
}
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala
index 4cc2113b64..a6722c3424 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/CollectBenchmark.scala
@@ -13,9 +13,16 @@
package org.apache.pekko.stream
-import com.typesafe.config.ConfigFactory
-import org.apache.pekko
+import java.util.concurrent.TimeUnit
+
+import scala.annotation.nowarn
+import scala.concurrent._
+import scala.concurrent.duration._
+import scala.util.control.NonFatal
+
import org.openjdk.jmh.annotations._
+
+import org.apache.pekko
import pekko.actor.ActorSystem
import pekko.stream.ActorAttributes.SupervisionStrategy
import pekko.stream.Attributes.SourceLocation
@@ -25,11 +32,7 @@ import pekko.stream.impl.fusing.Collect.NotApplied
import pekko.stream.scaladsl._
import pekko.stream.stage.{ GraphStage, GraphStageLogic, InHandler, OutHandler }
-import java.util.concurrent.TimeUnit
-import scala.annotation.nowarn
-import scala.concurrent._
-import scala.concurrent.duration._
-import scala.util.control.NonFatal
+import com.typesafe.config.ConfigFactory
object CollectBenchmark {
final val OperationsPerInvocation = 10000000
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala
index f8c0d49d5d..83723c9305 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlatMapConcatBenchmark.scala
@@ -19,7 +19,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.{ Await, Future }
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -31,6 +30,8 @@ import pekko.stream.impl.fusing.GraphStages
import pekko.stream.scaladsl._
import pekko.stream.testkit.scaladsl.StreamTestKit
+import com.typesafe.config.ConfigFactory
+
object FlatMapConcatBenchmark {
final val OperationsPerInvocation = 100000
}
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala
index 5ab9a14c9f..f689aa2095 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FlowMapBenchmark.scala
@@ -20,7 +20,6 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.Success
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -30,6 +29,8 @@ import pekko.remote.artery.BenchTestSource
import pekko.stream.impl.fusing.GraphStages
import pekko.stream.scaladsl._
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@OutputTimeUnit(TimeUnit.SECONDS)
@BenchmarkMode(Array(Mode.Throughput))
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala
index 269b120dbe..5c05601f5c 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FramingBenchmark.scala
@@ -20,8 +20,6 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.Random
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -33,6 +31,9 @@ import pekko.stream.scaladsl.Sink
import pekko.stream.scaladsl.Source
import pekko.util.ByteString
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
@State(Scope.Benchmark)
@OutputTimeUnit(TimeUnit.SECONDS)
@BenchmarkMode(Array(Mode.Throughput))
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala
index 1b0dd9d0bd..fd7425525f 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/FusedGraphsBenchmark.scala
@@ -19,7 +19,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.openjdk.jmh.annotations.OperationsPerInvocation
@@ -29,6 +28,8 @@ import pekko.actor.ActorSystem
import pekko.stream.scaladsl._
import pekko.stream.stage._
+import com.typesafe.config.ConfigFactory
+
object FusedGraphsBenchmark {
val ElementCount = 100 * 1000
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala
index 2f66fcd84b..30724ab775 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/InterpreterBenchmark.scala
@@ -19,8 +19,8 @@ import org.openjdk.jmh.annotations._
import org.apache.pekko
import pekko.event._
-import pekko.stream.impl.fusing.GraphInterpreterSpecKit
import pekko.stream.impl.fusing.GraphInterpreter.{ DownstreamBoundaryStageLogic, UpstreamBoundaryStageLogic }
+import pekko.stream.impl.fusing.GraphInterpreterSpecKit
import pekko.stream.impl.fusing.GraphStages
import pekko.stream.stage._
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala
index 390dfa3bca..21f8f7e2ef 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/LazyFutureSourceBenchmark.scala
@@ -22,7 +22,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent._
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -30,6 +29,8 @@ import pekko.NotUsed
import pekko.actor.ActorSystem
import pekko.stream.scaladsl._
+import com.typesafe.config.ConfigFactory
+
object LazyFutureSourceBenchmark {
final val OperationsPerInvocation = 100000
}
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala
index 88f59d606d..3442b2a426 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/MapAsyncBenchmark.scala
@@ -20,7 +20,6 @@ import scala.concurrent.Await
import scala.concurrent.Future
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -31,6 +30,8 @@ import pekko.remote.artery.LatchSink
import pekko.stream.scaladsl._
import pekko.stream.testkit.scaladsl.StreamTestKit
+import com.typesafe.config.ConfigFactory
+
object MapAsyncBenchmark {
final val OperationsPerInvocation = 100000
}
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala
index 40d25b51cc..40be60fe91 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/PartitionHubBenchmark.scala
@@ -19,7 +19,6 @@ import java.util.concurrent.TimeUnit
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -32,6 +31,8 @@ import pekko.stream.scaladsl._
import pekko.stream.scaladsl.PartitionHub
import pekko.stream.testkit.scaladsl.StreamTestKit
+import com.typesafe.config.ConfigFactory
+
object PartitionHubBenchmark {
final val OperationsPerInvocation = 100000
}
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala
index 87d69bce58..218751f575 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/SourceRefBenchmark.scala
@@ -20,7 +20,6 @@ import scala.concurrent.Await
import scala.concurrent.duration._
import scala.util.Success
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
@@ -28,6 +27,8 @@ import pekko.actor.ActorSystem
import pekko.remote.artery.BenchTestSource
import pekko.stream.scaladsl._
+import com.typesafe.config.ConfigFactory
+
/*
Just a brief reference run (3.1 GHz Intel Core i7, MacBook Pro late 2017):
[info] SourceRefBenchmark.source_ref_100k_elements thrpt 10 724650.336 ± 233643.256 ops/s
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala
index 061c975998..9c1dde4c6e 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/stream/ZipWithIndexBenchmark.scala
@@ -19,18 +19,18 @@ package org.apache.pekko.stream
import java.util.concurrent.TimeUnit
+import scala.annotation.nowarn
import scala.collection.immutable
import scala.concurrent._
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
import org.openjdk.jmh.annotations._
import org.apache.pekko
import pekko.actor.ActorSystem
import pekko.stream.scaladsl._
-import scala.annotation.nowarn
+import com.typesafe.config.ConfigFactory
object ZipWithIndexBenchmark {
final val OperationsPerInvocation = 100000
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/ArrayCopyOf_Benchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/ArrayCopyOf_Benchmark.scala
index af2467a588..d8cd0c60f8 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/util/ArrayCopyOf_Benchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/util/ArrayCopyOf_Benchmark.scala
@@ -17,10 +17,10 @@
package org.apache.pekko.util
-import org.openjdk.jmh.annotations._
-
import java.util.concurrent.TimeUnit
+import org.openjdk.jmh.annotations._
+
@State(Scope.Benchmark)
@Measurement(timeUnit = TimeUnit.MILLISECONDS)
class ArrayCopyOf_Benchmark {
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/FastFrequencySketchBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/FastFrequencySketchBenchmark.scala
index c7dac61721..3dd27b0a6c 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/util/FastFrequencySketchBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/util/FastFrequencySketchBenchmark.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.util
+import java.util.concurrent.TimeUnit
+
import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.annotations.Fork
import org.openjdk.jmh.annotations.Measurement
@@ -21,8 +23,6 @@ import org.openjdk.jmh.annotations.Setup
import org.openjdk.jmh.annotations.State
import org.openjdk.jmh.annotations.Warmup
-import java.util.concurrent.TimeUnit
-
@State(Scope.Benchmark)
@Fork(1)
@Warmup(iterations = 3, time = 20, timeUnit = TimeUnit.SECONDS)
diff --git a/bench-jmh/src/main/scala/org/apache/pekko/util/FrequencySketchBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/util/FrequencySketchBenchmark.scala
index a5dd5d39e0..a92b0defdd 100644
--- a/bench-jmh/src/main/scala/org/apache/pekko/util/FrequencySketchBenchmark.scala
+++ b/bench-jmh/src/main/scala/org/apache/pekko/util/FrequencySketchBenchmark.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.util
+import java.util.concurrent.TimeUnit
+
import org.openjdk.jmh.annotations.Benchmark
import org.openjdk.jmh.annotations.Fork
import org.openjdk.jmh.annotations.Measurement
@@ -21,8 +23,6 @@ import org.openjdk.jmh.annotations.Setup
import org.openjdk.jmh.annotations.State
import org.openjdk.jmh.annotations.Warmup
-import java.util.concurrent.TimeUnit
-
@State(Scope.Benchmark)
@Fork(1)
@Warmup(iterations = 3, time = 20, timeUnit = TimeUnit.SECONDS)
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala
index 9787fddd0b..f20fa74f22 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsCollector.scala
@@ -15,9 +15,8 @@ package org.apache.pekko.cluster.metrics
import java.util.concurrent.ThreadLocalRandom
-import scala.collection.immutable
-
import scala.annotation.nowarn
+import scala.collection.immutable
import org.apache.pekko
import pekko.actor.Actor
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala
index 785266d0ba..0150118bd2 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtension.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.cluster.metrics
import scala.collection.immutable
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.ActorRef
import pekko.actor.ActorSystem
@@ -31,6 +29,8 @@ import pekko.actor.SupervisorStrategy
import pekko.event.Logging
import pekko.event.LoggingAdapter
+import com.typesafe.config.Config
+
/**
* Cluster metrics extension.
*
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala
index 2d6712cae4..a5ba07243c 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRouting.scala
@@ -17,12 +17,10 @@ import java.util.Arrays
import java.util.concurrent.ThreadLocalRandom
import java.util.concurrent.atomic.AtomicReference
+import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
-import scala.annotation.nowarn
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.Actor
import pekko.actor.ActorSystem
@@ -37,6 +35,8 @@ import pekko.dispatch.Dispatchers
import pekko.japi.Util.immutableSeq
import pekko.routing._
+import com.typesafe.config.Config
+
/**
* Load balancing of messages to cluster nodes based on cluster metric data.
*
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala
index 53fbd8f190..91b5903405 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettings.scala
@@ -16,12 +16,12 @@ package org.apache.pekko.cluster.metrics
import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.util.Helpers.ConfigOps
import pekko.util.Helpers.Requiring
+import com.typesafe.config.Config
+
/**
* Metrics extension settings. Documented in: `src/main/resources/reference.conf`.
*/
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala
index 8a713a5355..fc926af640 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/ClusterMetricsStrategy.scala
@@ -13,12 +13,12 @@
package org.apache.pekko.cluster.metrics
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.OneForOneStrategy
import pekko.util.Helpers.ConfigOps
+import com.typesafe.config.Config
+
/**
* Default [[ClusterMetricsSupervisor]] strategy:
* A configurable [[pekko.actor.OneForOneStrategy]] with restart-on-throwable decider.
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala
index defa534527..df7ee5d67e 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/Metric.scala
@@ -13,12 +13,11 @@
package org.apache.pekko.cluster.metrics
+import scala.annotation.nowarn
import scala.util.Failure
import scala.util.Success
import scala.util.Try
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.actor.Address
diff --git a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala
index cdf4706ae9..b658576754 100644
--- a/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala
+++ b/cluster-metrics/src/main/scala/org/apache/pekko/cluster/metrics/protobuf/MessageSerializer.scala
@@ -17,8 +17,11 @@ import java.{ lang => jl }
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectOutputStream }
import java.io.NotSerializableException
import java.util.zip.{ GZIPInputStream, GZIPOutputStream }
+
import scala.annotation.tailrec
import scala.collection.immutable
+import scala.jdk.CollectionConverters._
+
import org.apache.pekko
import pekko.actor.{ Address, ExtendedActorSystem }
import pekko.cluster.metrics._
@@ -27,7 +30,6 @@ import pekko.dispatch.Dispatchers
import pekko.protobufv3.internal.MessageLite
import pekko.remote.ByteStringUtils
import pekko.serialization.{ BaseSerializer, SerializationExtension, SerializerWithStringManifest, Serializers }
-import scala.jdk.CollectionConverters._
/**
* Protobuf serializer for [[pekko.cluster.metrics.ClusterMetricsMessage]] types.
diff --git a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala
index ec417fa8a8..f7a32b1396 100644
--- a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala
+++ b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsExtensionSpec.scala
@@ -15,13 +15,13 @@ package org.apache.pekko.cluster.metrics
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.cluster.MemberStatus
import pekko.cluster.MultiNodeClusterSpec
import pekko.remote.testkit.MultiNodeConfig
+import com.typesafe.config.ConfigFactory
+
trait ClusterMetricsCommonConfig extends MultiNodeConfig {
import ConfigFactory._
diff --git a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala
index 41417bcd14..093a328a90 100644
--- a/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala
+++ b/cluster-metrics/src/multi-jvm/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala
@@ -19,9 +19,6 @@ import scala.annotation.nowarn
import scala.concurrent.Await
import scala.concurrent.duration._
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor._
import pekko.cluster.Cluster
@@ -35,10 +32,13 @@ import pekko.routing.FromConfig
import pekko.routing.GetRoutees
import pekko.routing.Routees
import pekko.serialization.jackson.CborSerializable
-import pekko.testkit.GHExcludeTest
import pekko.testkit.{ DefaultTimeout, ImplicitSender, LongRunningTest }
+import pekko.testkit.GHExcludeTest
import pekko.util.unused
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object AdaptiveLoadBalancingRouterConfig extends MultiNodeConfig {
class Echo extends Actor {
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala
index 3a317f1691..347fb8ff4d 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsRoutingSpec.scala
@@ -13,13 +13,13 @@
package org.apache.pekko.cluster.metrics
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
-
import org.apache.pekko
import pekko.actor.Address
import pekko.cluster.metrics.StandardMetrics._
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
+
class MetricsSelectorSpec extends AnyWordSpec with Matchers {
val factor = 0.3 // TODO read from reference.conf
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala
index 2336a7dd4d..329ef2944b 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/ClusterMetricsSettingsSpec.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.cluster.metrics
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.dispatch.Dispatchers
import pekko.testkit.PekkoSpec
+import com.typesafe.config.ConfigFactory
+
class ClusterMetricsSettingsSpec extends PekkoSpec {
"ClusterMetricsSettings" must {
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/EWMASpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/EWMASpec.scala
index 3513f577fa..4f04fc77ee 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/EWMASpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/EWMASpec.scala
@@ -15,9 +15,8 @@ package org.apache.pekko.cluster.metrics
import java.util.concurrent.ThreadLocalRandom
-import scala.concurrent.duration._
-
import scala.annotation.nowarn
+import scala.concurrent.duration._
import org.apache.pekko.testkit.{ LongRunningTest, PekkoSpec }
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala
index d0ddc108ef..e8cc708979 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricSpec.scala
@@ -15,17 +15,17 @@ package org.apache.pekko.cluster.metrics
import java.lang.System.{ currentTimeMillis => newTimestamp }
-import scala.util.Failure
-
import scala.annotation.nowarn
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpec
+import scala.util.Failure
import org.apache.pekko
import pekko.actor.Address
import pekko.cluster.metrics.StandardMetrics._
-import pekko.testkit.PekkoSpec
import pekko.testkit.ImplicitSender
+import pekko.testkit.PekkoSpec
+
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpec
@nowarn
class MetricNumericConverterSpec extends AnyWordSpec with Matchers with MetricNumericConverter {
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala
index 42b512085c..a08e4b5e9c 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/MetricsCollectorSpec.scala
@@ -13,11 +13,10 @@
package org.apache.pekko.cluster.metrics
+import scala.annotation.nowarn
import scala.concurrent.duration._
import scala.util.Try
-import scala.annotation.nowarn
-
import org.apache.pekko
import pekko.cluster.metrics.StandardMetrics._
import pekko.testkit._
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala
index a3adf58d24..893bde2550 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/TestUtil.scala
@@ -17,7 +17,6 @@ import java.io.Closeable
import java.util.logging.LogManager
import org.scalatestplus.mockito.MockitoSugar
-import org.slf4j.bridge.SLF4JBridgeHandler
import org.apache.pekko
import pekko.actor.Actor
@@ -35,6 +34,8 @@ import pekko.dispatch.UnboundedMessageQueueSemantics
import pekko.remote.RARP
import pekko.testkit.PekkoSpec
+import org.slf4j.bridge.SLF4JBridgeHandler
+
/**
* Redirect different logging sources to SLF4J.
*/
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala
index 9f3d37071e..af0b6a61f8 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/WeightedRouteesSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.cluster.metrics
import scala.Vector
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.Address
import pekko.actor.RootActorPath
@@ -25,6 +23,8 @@ import pekko.routing.ActorRefRoutee
import pekko.routing.ActorSelectionRoutee
import pekko.testkit.PekkoSpec
+import com.typesafe.config.ConfigFactory
+
class WeightedRouteesSpec extends PekkoSpec(ConfigFactory.parseString("""
pekko.actor.provider = "cluster"
pekko.remote.classic.netty.tcp.port = 0
diff --git a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStreamSpec.scala b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStreamSpec.scala
index 07014b01fa..a9fb3028ee 100644
--- a/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStreamSpec.scala
+++ b/cluster-metrics/src/test/scala/org/apache/pekko/cluster/metrics/protobuf/NumberInputStreamSpec.scala
@@ -19,6 +19,7 @@ package org.apache.pekko.cluster.metrics.protobuf
import java.io.{ ByteArrayInputStream, ByteArrayOutputStream, ObjectOutputStream }
import java.math.BigInteger
+
import scala.math.BigInt
import org.scalatest.matchers.should.Matchers
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala
index 137149bb8a..4349ddf328 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingQuery.scala
@@ -14,13 +14,13 @@
package org.apache.pekko.cluster.sharding.typed
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.cluster.sharding.ShardRegion.ClusterShardingStats
import pekko.cluster.sharding.ShardRegion.CurrentShardRegionState
import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey
-import scala.jdk.DurationConverters._
/**
* Protocol for querying sharding state e.g. A ShardRegion's state
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala
index a076806088..6a8fa9abde 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingSettings.scala
@@ -15,8 +15,7 @@ package org.apache.pekko.cluster.sharding.typed
import scala.collection.immutable
import scala.concurrent.duration._
-
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.typed.ActorSystem
@@ -28,7 +27,8 @@ import pekko.cluster.typed.Cluster
import pekko.cluster.typed.ClusterSingletonManagerSettings
import pekko.coordination.lease.LeaseUsageSettings
import pekko.japi.Util.immutableSeq
-import scala.jdk.DurationConverters._
+
+import com.typesafe.config.Config
object ClusterShardingSettings {
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala
index ef931a23a5..4edad5b75d 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedEntityProvider.scala
@@ -13,19 +13,19 @@
package org.apache.pekko.cluster.sharding.typed
-import org.apache.pekko
-import pekko.cluster.sharding.typed.scaladsl.Entity
-import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey
-import pekko.cluster.sharding.typed.javadsl.{ Entity => JEntity, EntityTypeKey => JEntityTypeKey }
-import pekko.persistence.typed.ReplicaId
+import java.util.{ Set => JSet }
import scala.collection.immutable
-import scala.reflect.ClassTag
import scala.jdk.CollectionConverters._
-import java.util.{ Set => JSet }
+import scala.reflect.ClassTag
+import org.apache.pekko
import pekko.actor.typed.Behavior
import pekko.cluster.sharding.typed.internal.EntityTypeKeyImpl
+import pekko.cluster.sharding.typed.javadsl.{ Entity => JEntity, EntityTypeKey => JEntityTypeKey }
+import pekko.cluster.sharding.typed.scaladsl.Entity
+import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey
+import pekko.persistence.typed.ReplicaId
import pekko.persistence.typed.ReplicationId
import pekko.persistence.typed.ReplicationId.Separator
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala
index 9a21c89079..7340770f78 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingExtension.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.cluster.sharding.typed
+import java.util.{ Map => JMap }
+
import org.apache.pekko
import pekko.actor.typed.ActorSystem
import pekko.actor.typed.Extension
@@ -21,7 +23,6 @@ import pekko.annotation.DoNotInherit
import pekko.cluster.sharding.typed.internal.ReplicatedShardingExtensionImpl
import pekko.cluster.sharding.typed.scaladsl.EntityRef
import pekko.persistence.typed.ReplicaId
-import java.util.{ Map => JMap }
/**
* Extension for running Replicated Event Sourcing in sharding by starting one separate instance of sharding per replica.
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala
index 05d27d48f2..39820a5f5e 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSettings.scala
@@ -16,13 +16,13 @@ package org.apache.pekko.cluster.sharding.typed
import java.time.Duration
import scala.concurrent.duration.FiniteDuration
-
-import com.typesafe.config.Config
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.typed.ActorSystem
import pekko.annotation.InternalApi
-import scala.jdk.DurationConverters._
+
+import com.typesafe.config.Config
object ShardedDaemonProcessSettings {
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala
index 1e58675bc0..ab29606f75 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingConsumerController.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.cluster.sharding.typed.delivery
import java.util.function.{ Function => JFunction }
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
@@ -26,6 +24,8 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.ApiMayChange
import pekko.cluster.sharding.typed.delivery.internal.ShardingConsumerControllerImpl
+import com.typesafe.config.Config
+
/**
* `ShardingConsumerController` is used together with [[ShardingProducerController]]. See the description
* in that class or the Pekko reference documentation for how they are intended to be used.
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala
index 168d6cb25f..2a4e1d5884 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/delivery/ShardingProducerController.scala
@@ -16,10 +16,10 @@ package org.apache.pekko.cluster.sharding.typed.delivery
import java.util.Optional
import scala.concurrent.duration.FiniteDuration
+import scala.jdk.DurationConverters._
+import scala.jdk.OptionConverters._
import scala.reflect.ClassTag
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.Done
import pekko.actor.typed.ActorRef
@@ -32,8 +32,8 @@ import pekko.actor.typed.scaladsl.Behaviors
import pekko.annotation.ApiMayChange
import pekko.cluster.sharding.typed.ShardingEnvelope
import pekko.cluster.sharding.typed.delivery.internal.ShardingProducerControllerImpl
-import scala.jdk.DurationConverters._
-import scala.jdk.OptionConverters._
+
+import com.typesafe.config.Config
/**
* Reliable delivery between a producer actor sending messages to sharded consumer
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala
index 798d1d1d9b..9be9afd359 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ClusterShardingImpl.scala
@@ -20,6 +20,8 @@ import java.util.concurrent.CompletionStage
import java.util.concurrent.ConcurrentHashMap
import scala.concurrent.Future
+import scala.jdk.DurationConverters._
+import scala.jdk.FutureConverters._
import org.apache.pekko
import pekko.actor.ActorRefProvider
@@ -50,8 +52,6 @@ import pekko.pattern.AskTimeoutException
import pekko.pattern.PromiseActorRef
import pekko.pattern.StatusReply
import pekko.util.{ unused, ByteString, Timeout }
-import scala.jdk.FutureConverters._
-import scala.jdk.DurationConverters._
/**
* INTERNAL API
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala
index 0037bee6ab..60f1ea91f8 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/JoinConfigCompatCheckerClusterSharding.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.cluster.sharding.typed.internal
import scala.collection.{ immutable => im }
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker, Valid }
+import com.typesafe.config.Config
+
/**
* INTERNAL API
*/
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala
index f28802633b..4d792134d0 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ReplicatedShardingExtensionImpl.scala
@@ -13,25 +13,27 @@
package org.apache.pekko.cluster.sharding.typed.internal
-import java.util.concurrent.atomic.AtomicLong
import java.util.{ Map => JMap }
+import java.util.concurrent.atomic.AtomicLong
+
+import scala.jdk.CollectionConverters._
import org.apache.pekko
import pekko.actor.typed.ActorSystem
+import pekko.actor.typed.scaladsl.LoggerOps
import pekko.annotation.InternalApi
-import pekko.cluster.sharding.typed.ReplicatedShardingExtension
-import pekko.cluster.sharding.typed.ReplicatedSharding
+import pekko.cluster.ClusterSettings.DataCenter
import pekko.cluster.sharding.typed.ReplicatedEntityProvider
+import pekko.cluster.sharding.typed.ReplicatedSharding
+import pekko.cluster.sharding.typed.ReplicatedShardingExtension
+import pekko.cluster.sharding.typed.ShardingDirectReplication
import pekko.cluster.sharding.typed.scaladsl.ClusterSharding
import pekko.cluster.sharding.typed.scaladsl.EntityRef
import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey
import pekko.persistence.typed.ReplicaId
-import org.slf4j.LoggerFactory
-import pekko.actor.typed.scaladsl.LoggerOps
-import pekko.cluster.ClusterSettings.DataCenter
-import pekko.cluster.sharding.typed.ShardingDirectReplication
import pekko.persistence.typed.ReplicationId
-import scala.jdk.CollectionConverters._
+
+import org.slf4j.LoggerFactory
/**
* INTERNAL API
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala
index 28081cae29..e0ac66530e 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardedDaemonProcessImpl.scala
@@ -13,10 +13,12 @@
package org.apache.pekko.cluster.sharding.typed.internal
-import java.util.function.IntFunction
import java.util.Optional
+import java.util.function.IntFunction
+import scala.jdk.OptionConverters._
import scala.reflect.ClassTag
+
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
@@ -40,7 +42,6 @@ import pekko.cluster.sharding.typed.scaladsl.StartEntity
import pekko.cluster.typed.Cluster
import pekko.cluster.typed.SelfUp
import pekko.cluster.typed.Subscribe
-import scala.jdk.OptionConverters._
import pekko.util.PrettyDuration
/**
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala
index 3d064b94d2..7fd5eff092 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/ShardingSerializer.scala
@@ -14,6 +14,8 @@
package org.apache.pekko.cluster.sharding.typed.internal
import java.io.NotSerializableException
+import java.nio.ByteBuffer
+
import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.cluster.sharding.typed.ShardingEnvelope
@@ -24,8 +26,6 @@ import pekko.serialization.BaseSerializer
import pekko.serialization.ByteBufferSerializer
import pekko.serialization.SerializerWithStringManifest
-import java.nio.ByteBuffer
-
/**
* INTERNAL API
*/
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala
index d092d9a386..1ec48423c5 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/internal/testkit/TestEntityRefImpl.scala
@@ -17,6 +17,9 @@ import java.time.Duration
import java.util.concurrent.CompletionStage
import scala.concurrent.Future
+import scala.jdk.DurationConverters._
+import scala.jdk.FutureConverters._
+
import org.apache.pekko
import pekko.actor.ActorRefProvider
import pekko.actor.typed.ActorRef
@@ -28,8 +31,6 @@ import pekko.cluster.sharding.typed.javadsl.EntityRef
import pekko.cluster.sharding.typed.scaladsl
import pekko.japi.function.{ Function => JFunction }
import pekko.pattern.StatusReply
-import scala.jdk.FutureConverters._
-import scala.jdk.DurationConverters._
import pekko.util.Timeout
/**
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala
index e0b0343864..53eb355d8d 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ClusterSharding.scala
@@ -19,6 +19,8 @@ import java.util.Optional
import java.util.concurrent.CompletionStage
import scala.annotation.nowarn
+import scala.jdk.OptionConverters._
+
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
@@ -32,7 +34,6 @@ import pekko.cluster.sharding.ShardCoordinator.ShardAllocationStrategy
import pekko.cluster.sharding.typed.internal.EntityTypeKeyImpl
import pekko.japi.function.{ Function => JFunction }
import pekko.pattern.StatusReply
-import scala.jdk.OptionConverters._
@FunctionalInterface
trait EntityFactory[M] {
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala
index 8389e1c5c3..4644666ca3 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/javadsl/ShardedDaemonProcess.scala
@@ -13,8 +13,8 @@
package org.apache.pekko.cluster.sharding.typed.javadsl
-import java.util.function.IntFunction
import java.util.Optional
+import java.util.function.IntFunction
import org.apache.pekko
import pekko.actor.typed.ActorSystem
diff --git a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala
index ed1908bd7e..b701597da9 100644
--- a/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala
+++ b/cluster-sharding-typed/src/main/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterSharding.scala
@@ -16,6 +16,7 @@ package scaladsl
import scala.concurrent.Future
import scala.reflect.ClassTag
+
import org.apache.pekko
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala
index d979a93fae..d89b330ee5 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/ClusterShardingRememberEntitiesPerfSpec.scala
@@ -17,15 +17,17 @@ import java.nio.file.Paths
import java.util.concurrent.TimeUnit.NANOSECONDS
import java.util.concurrent.atomic.AtomicInteger
+import scala.concurrent.duration._
+
+import org.HdrHistogram.Histogram
+
import org.apache.pekko
import pekko.actor._
import pekko.cluster.MemberStatus
import pekko.cluster.sharding.ShardRegion.{ CurrentShardRegionState, GetShardRegionState, Passivate }
import pekko.testkit._
-import com.typesafe.config.ConfigFactory
-import org.HdrHistogram.Histogram
-import scala.concurrent.duration._
+import com.typesafe.config.ConfigFactory
object ClusterShardingRememberEntitiesPerfSpec {
val NrRegions = 6
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala
index 50c9456c3b..fdbb55e811 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingPreparingForShutdownSpec.scala
@@ -13,6 +13,8 @@
package org.apache.pekko.cluster.sharding.typed
+import scala.concurrent.duration._
+
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.ActorRef
@@ -30,9 +32,8 @@ import pekko.cluster.typed.PrepareForFullClusterShutdown
import pekko.remote.testkit.MultiNodeConfig
import pekko.remote.testkit.MultiNodeSpec
import pekko.serialization.jackson.CborSerializable
-import com.typesafe.config.ConfigFactory
-import scala.concurrent.duration._
+import com.typesafe.config.ConfigFactory
object ClusterShardingPreparingForShutdownSpec extends MultiNodeConfig {
val first = role("first")
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala
index 28980233f5..7973f78954 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ClusterShardingStatsSpec.scala
@@ -13,9 +13,6 @@
package org.apache.pekko.cluster.sharding.typed
-import com.typesafe.config.ConfigFactory
-import org.scalatest.concurrent.ScalaFutures
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.ActorRef
@@ -31,6 +28,10 @@ import pekko.remote.testkit.MultiNodeConfig
import pekko.remote.testkit.MultiNodeSpec
import pekko.serialization.jackson.CborSerializable
+import org.scalatest.concurrent.ScalaFutures
+
+import com.typesafe.config.ConfigFactory
+
object ClusterShardingStatsSpecConfig extends MultiNodeConfig {
val first = role("first")
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala
index 565cdf6ea1..22d544f1f6 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/MultiDcClusterShardingSpec.scala
@@ -14,8 +14,7 @@
package org.apache.pekko.cluster.sharding.typed
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.concurrent.ScalaFutures
+
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.ActorRef
@@ -27,6 +26,10 @@ import pekko.cluster.typed.{ MultiDcPinger, MultiNodeTypedClusterSpec }
import pekko.remote.testkit.{ MultiNodeConfig, MultiNodeSpec }
import pekko.util.Timeout
+import org.scalatest.concurrent.ScalaFutures
+
+import com.typesafe.config.ConfigFactory
+
object MultiDcClusterShardingSpecConfig extends MultiNodeConfig {
val first = role("first")
val second = role("second")
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala
index 0a670b05aa..95831d243a 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala
@@ -14,12 +14,12 @@
package org.apache.pekko.cluster.sharding.typed
import org.apache.pekko
-import pekko.actor.typed.scaladsl.LoggerOps
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.ActorRef
import pekko.actor.typed.scaladsl.ActorContext
import pekko.actor.typed.scaladsl.Behaviors
+import pekko.actor.typed.scaladsl.LoggerOps
import pekko.cluster.MultiNodeClusterSpec
import pekko.cluster.sharding.typed.ReplicatedShardingSpec.TestRES.GetState
import pekko.cluster.sharding.typed.ReplicatedShardingSpec.TestRES.State
@@ -30,17 +30,19 @@ import pekko.persistence.journal.PersistencePluginProxy
import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal
import pekko.persistence.typed.ReplicaId
import pekko.persistence.typed.ReplicationId
-import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing
import pekko.persistence.typed.scaladsl.Effect
import pekko.persistence.typed.scaladsl.EventSourcedBehavior
+import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing
import pekko.remote.testkit.MultiNodeConfig
import pekko.remote.testkit.MultiNodeSpec
import pekko.serialization.jackson.CborSerializable
-import com.typesafe.config.ConfigFactory
+
import org.scalatest.concurrent.Eventually
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.time.Span
+import com.typesafe.config.ConfigFactory
+
object ReplicatedShardingSpec extends MultiNodeConfig {
val first = role("first")
val second = role("second")
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala
index 6556c807de..af0fb05aa9 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/ShardedDaemonProcessSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.cluster.sharding.typed
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.concurrent.ScalaFutures
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.Behavior
@@ -32,6 +29,10 @@ import pekko.remote.testkit.MultiNodeConfig
import pekko.remote.testkit.MultiNodeSpec
import pekko.serialization.jackson.CborSerializable
+import org.scalatest.concurrent.ScalaFutures
+
+import com.typesafe.config.ConfigFactory
+
object ShardedDaemonProcessSpec extends MultiNodeConfig {
val first = role("first")
val second = role("second")
diff --git a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala
index 2a744558a3..0fa92bd494 100644
--- a/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala
+++ b/cluster-sharding-typed/src/multi-jvm/scala/org/apache/pekko/cluster/sharding/typed/delivery/DeliveryThroughputSpec.scala
@@ -18,8 +18,6 @@ import java.util.concurrent.TimeUnit.NANOSECONDS
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.TestProbe
import pekko.actor.typed.ActorRef
@@ -45,6 +43,8 @@ import pekko.remote.testkit.MultiNodeSpec
import pekko.remote.testkit.PerfFlamesSupport
import pekko.serialization.jackson.CborSerializable
+import com.typesafe.config.ConfigFactory
+
object DeliveryThroughputSpec extends MultiNodeConfig {
val first = role("first")
val second = role("second")
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala
index b2b8183ec7..9430c300a1 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/JoinConfigCompatCheckerClusterShardingSpec.scala
@@ -16,10 +16,6 @@ package org.apache.pekko.cluster.sharding.typed
import scala.collection.{ immutable => im }
import scala.concurrent.duration._
-import com.typesafe.config.{ Config, ConfigFactory }
-import org.scalatest.matchers.should.Matchers
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.CoordinatedShutdown
import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, ScalaTestWithActorTestKit }
@@ -27,6 +23,11 @@ import pekko.actor.typed.ActorSystem
import pekko.cluster.{ Cluster => ClassicCluster }
import pekko.testkit.LongRunningTest
+import org.scalatest.matchers.should.Matchers
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.{ Config, ConfigFactory }
+
object JoinConfigCompatCheckerClusterShardingSpec {
val Shards = 2
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala
index b011d7ca7d..5187664168 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingDirectReplicationSpec.scala
@@ -13,7 +13,6 @@
package org.apache.pekko.cluster.sharding.typed
-import org.scalatest.wordspec.AnyWordSpecLike
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -22,9 +21,11 @@ import pekko.actor.typed.eventstream.EventStream
import pekko.persistence.typed
import pekko.persistence.typed.PersistenceId
import pekko.persistence.typed.PublishedEvent
-import pekko.persistence.typed.internal.{ PublishedEventImpl, ReplicatedPublishedEventMetaData, VersionVector }
import pekko.persistence.typed.ReplicaId
import pekko.persistence.typed.ReplicationId
+import pekko.persistence.typed.internal.{ PublishedEventImpl, ReplicatedPublishedEventMetaData, VersionVector }
+
+import org.scalatest.wordspec.AnyWordSpecLike
class ReplicatedShardingDirectReplicationSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala
index 741106c1c0..a722c65175 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ReplicatedShardingSpec.scala
@@ -14,14 +14,18 @@
package org.apache.pekko.cluster.sharding.typed
import java.util.concurrent.ThreadLocalRandom
+
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.{ ActorTestKit, LogCapturing, ScalaTestWithActorTestKit }
import pekko.actor.typed.ActorRef
import pekko.actor.typed.ActorSystem
import pekko.actor.typed.Behavior
import pekko.actor.typed.scaladsl.Behaviors
+import pekko.actor.typed.scaladsl.LoggerOps
import pekko.cluster.MemberStatus
import pekko.cluster.sharding.typed.ReplicatedShardingSpec.DataCenter
+import pekko.cluster.sharding.typed.ReplicatedShardingSpec.MyReplicatedIntSet
+import pekko.cluster.sharding.typed.ReplicatedShardingSpec.MyReplicatedStringSet
import pekko.cluster.sharding.typed.ReplicatedShardingSpec.Normal
import pekko.cluster.sharding.typed.ReplicatedShardingSpec.ReplicationType
import pekko.cluster.sharding.typed.ReplicatedShardingSpec.Role
@@ -31,18 +35,17 @@ import pekko.cluster.typed.Join
import pekko.persistence.testkit.PersistenceTestKitPlugin
import pekko.persistence.testkit.query.scaladsl.PersistenceTestKitReadJournal
import pekko.persistence.typed.ReplicaId
-import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing
+import pekko.persistence.typed.ReplicationId
import pekko.persistence.typed.scaladsl.Effect
import pekko.persistence.typed.scaladsl.EventSourcedBehavior
+import pekko.persistence.typed.scaladsl.ReplicatedEventSourcing
import pekko.serialization.jackson.CborSerializable
-import com.typesafe.config.ConfigFactory
+
+import org.scalatest.time.Span
import org.scalatest.wordspec.AnyWordSpecLike
-import pekko.actor.typed.scaladsl.LoggerOps
-import pekko.cluster.sharding.typed.ReplicatedShardingSpec.MyReplicatedIntSet
-import pekko.cluster.sharding.typed.ReplicatedShardingSpec.MyReplicatedStringSet
-import pekko.persistence.typed.ReplicationId
+
import com.typesafe.config.Config
-import org.scalatest.time.Span
+import com.typesafe.config.ConfigFactory
object ReplicatedShardingSpec {
def commonConfig = ConfigFactory.parseString("""
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala
index 4d52cd50bb..003a6d9190 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/ShardingSerializerSpec.scala
@@ -13,7 +13,9 @@
package org.apache.pekko.cluster.sharding.typed
-import org.scalatest.wordspec.AnyWordSpecLike
+import java.nio.ByteBuffer
+import java.nio.ByteOrder
+
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -21,8 +23,7 @@ import pekko.actor.typed.internal.adapter.ActorSystemAdapter
import pekko.cluster.sharding.typed.internal.ShardingSerializer
import pekko.serialization.SerializationExtension
-import java.nio.ByteBuffer
-import java.nio.ByteOrder
+import org.scalatest.wordspec.AnyWordSpecLike
class ShardingSerializerSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogCapturing {
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala
index 42331cb730..48bd8b5962 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/DurableShardingSpec.scala
@@ -17,9 +17,6 @@ import java.util.UUID
import scala.concurrent.duration._
-import com.typesafe.config.Config
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -42,6 +39,11 @@ import pekko.persistence.journal.inmem.InmemJournal
import pekko.persistence.typed.PersistenceId
import pekko.persistence.typed.delivery.EventSourcedProducerQueue
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.Config
+import com.typesafe.config.ConfigFactory
+
object DurableShardingSpec {
def conf: Config =
ConfigFactory.parseString(s"""
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala
index 1127e78a85..d0365f2986 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/delivery/ReliableDeliveryShardingSpec.scala
@@ -17,9 +17,6 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -40,6 +37,10 @@ import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey
import pekko.cluster.typed.Cluster
import pekko.cluster.typed.Join
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ReliableDeliveryShardingSpec {
val config = ConfigFactory.parseString("""
pekko.actor.provider = cluster
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/internal/Murmur2Spec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/internal/Murmur2Spec.scala
index 6db786ec01..f8a7204a0f 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/internal/Murmur2Spec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/internal/Murmur2Spec.scala
@@ -13,11 +13,11 @@
package org.apache.pekko.cluster.sharding.typed.internal
+import java.nio.charset.StandardCharsets.UTF_8
+
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
-import java.nio.charset.StandardCharsets.UTF_8
-
class Murmur2Spec extends AnyWordSpecLike with Matchers {
"The Murmur2 hashing" must {
// expected correct hash values from the kafka murmur2 impl
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala
index 7f8cd73197..a44a4412e7 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingPersistenceSpec.scala
@@ -22,9 +22,6 @@ import scala.concurrent.Future
import scala.concurrent.Promise
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -47,6 +44,10 @@ import pekko.persistence.typed.RecoveryCompleted
import pekko.persistence.typed.scaladsl.Effect
import pekko.persistence.typed.scaladsl.EventSourcedBehavior
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ClusterShardingPersistenceSpec {
val config = ConfigFactory.parseString("""
pekko.loglevel = INFO
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala
index b65a0a3a05..aa5eaf3497 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingSpec.scala
@@ -17,9 +17,6 @@ import scala.concurrent.duration._
import scala.util.Failure
import scala.util.Success
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.ActorTestKit
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -40,6 +37,10 @@ import pekko.pattern.AskTimeoutException
import pekko.serialization.jackson.CborSerializable
import pekko.util.Timeout
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ClusterShardingSpec {
val config = ConfigFactory.parseString(s"""
pekko.actor.provider = cluster
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala
index 3848dfe6bd..37487af650 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStateSpec.scala
@@ -13,8 +13,6 @@
package org.apache.pekko.cluster.sharding.typed.scaladsl
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.{ ScalaTestWithActorTestKit, TestProbe }
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -24,6 +22,8 @@ import pekko.cluster.sharding.typed.{ GetShardRegionState, ShardingMessageExtrac
import pekko.cluster.sharding.typed.scaladsl.ClusterShardingSpec._
import pekko.cluster.typed.{ Cluster, Join }
+import org.scalatest.wordspec.AnyWordSpecLike
+
class ClusterShardingStateSpec
extends ScalaTestWithActorTestKit(ClusterShardingSpec.config)
with AnyWordSpecLike
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala
index c00cc208a7..e414ccd032 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ClusterShardingStatsSpec.scala
@@ -13,8 +13,6 @@
package org.apache.pekko.cluster.sharding.typed.scaladsl
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -28,6 +26,8 @@ import pekko.cluster.typed.Cluster
import pekko.cluster.typed.Join
import pekko.cluster.typed.SelfUp
+import org.scalatest.wordspec.AnyWordSpecLike
+
class ClusterShardingStatsSpec
extends ScalaTestWithActorTestKit(ClusterShardingSpec.config)
with AnyWordSpecLike
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala
index 89ee775e73..cf58630c75 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/scaladsl/ShardedDaemonProcessSpec.scala
@@ -15,9 +15,6 @@ package org.apache.pekko.cluster.sharding.typed.scaladsl
import scala.concurrent.duration._
-import com.typesafe.config.ConfigFactory
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.actor.testkit.typed.scaladsl.LogCapturing
import pekko.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
@@ -29,6 +26,10 @@ import pekko.cluster.sharding.typed.ShardedDaemonProcessSettings
import pekko.cluster.typed.Cluster
import pekko.cluster.typed.Join
+import org.scalatest.wordspec.AnyWordSpecLike
+
+import com.typesafe.config.ConfigFactory
+
object ShardedDaemonProcessSpec {
// single node cluster config
def config = ConfigFactory.parseString("""
diff --git a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala
index 8ae65d4a5f..e5adea23a0 100644
--- a/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala
+++ b/cluster-sharding-typed/src/test/scala/org/apache/pekko/cluster/sharding/typed/testkit/scaladsl/TestEntityRefSpec.scala
@@ -15,8 +15,6 @@ package org.apache.pekko.cluster.sharding.typed.testkit.scaladsl
import scala.concurrent.Future
-import org.scalatest.wordspec.AnyWordSpecLike
-
import org.apache.pekko
import pekko.Done
import pekko.actor.testkit.typed.scaladsl.LogCapturing
@@ -33,6 +31,8 @@ import pekko.cluster.sharding.typed.scaladsl.Entity
import pekko.cluster.sharding.typed.scaladsl.EntityRef
import pekko.cluster.sharding.typed.scaladsl.EntityTypeKey
+import org.scalatest.wordspec.AnyWordSpecLike
+
object TestEntityRefSpec {
final case class AskReq(s: String, replyTo: ActorRef[Done])
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala
index 6c587870bd..7ad8bb5133 100755
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterSharding.scala
@@ -19,6 +19,7 @@ import java.util.concurrent.ConcurrentHashMap
import scala.collection.immutable
import scala.concurrent.Await
+import scala.jdk.CollectionConverters._
import scala.util.control.NonFatal
import org.apache.pekko
@@ -50,7 +51,6 @@ import pekko.event.Logging
import pekko.pattern.BackoffOpts
import pekko.pattern.ask
import pekko.util.ByteString
-import scala.jdk.CollectionConverters._
/**
* This extension provides sharding functionality of actors in a cluster.
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala
index b078ee54c8..7b444887ca 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingHealthCheck.scala
@@ -13,21 +13,22 @@
package org.apache.pekko.cluster.sharding
+import scala.concurrent.ExecutionContext
+import scala.concurrent.Future
+import scala.concurrent.duration.FiniteDuration
+import scala.jdk.CollectionConverters._
+import scala.jdk.DurationConverters._
+
import org.apache.pekko
import pekko.actor.ActorRef
import pekko.actor.ActorSystem
import pekko.annotation.ApiMayChange
+import pekko.annotation.InternalApi
import pekko.event.Logging
+import pekko.pattern.AskTimeoutException
import pekko.pattern.ask
import pekko.util.Timeout
-import pekko.annotation.InternalApi
-import pekko.pattern.AskTimeoutException
-import scala.jdk.CollectionConverters._
-import scala.jdk.DurationConverters._
-import scala.concurrent.ExecutionContext
-import scala.concurrent.Future
-import scala.concurrent.duration.FiniteDuration
import com.typesafe.config.Config
/**
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala
index 14431679e2..2efbf1d551 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ClusterShardingSettings.scala
@@ -13,6 +13,10 @@
package org.apache.pekko.cluster.sharding
+import scala.collection.immutable
+import scala.concurrent.duration._
+import scala.jdk.DurationConverters._
+
import org.apache.pekko
import pekko.actor.ActorSystem
import pekko.actor.NoSerializationVerificationNeeded
@@ -22,11 +26,8 @@ import pekko.cluster.singleton.ClusterSingletonManagerSettings
import pekko.coordination.lease.LeaseUsageSettings
import pekko.japi.Util.immutableSeq
import pekko.util.Helpers.toRootLowerCase
-import scala.jdk.DurationConverters._
-import com.typesafe.config.Config
-import scala.collection.immutable
-import scala.concurrent.duration._
+import com.typesafe.config.Config
object ClusterShardingSettings {
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala
index 767e7d69b6..208f2a7612 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/JoinConfigCompatCheckSharding.scala
@@ -15,12 +15,12 @@ package org.apache.pekko.cluster.sharding
import scala.collection.{ immutable => im }
-import com.typesafe.config.Config
-
import org.apache.pekko
import pekko.annotation.InternalApi
import pekko.cluster.{ ConfigValidation, JoinConfigCompatChecker }
+import com.typesafe.config.Config
+
/**
* INTERNAL API
*/
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala
index 9f52a161f7..4b4d5273a5 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/RemoveInternalClusterShardingData.scala
@@ -13,11 +13,13 @@
package org.apache.pekko.cluster.sharding
+import scala.annotation.nowarn
import scala.concurrent.Future
import scala.concurrent.Promise
import scala.util.Failure
import scala.util.Success
import scala.util.Try
+
import org.apache.pekko
import pekko.actor.Actor
import pekko.actor.ActorLogging
@@ -30,8 +32,6 @@ import pekko.persistence._
import pekko.persistence.journal.leveldb.SharedLeveldbJournal
import pekko.persistence.journal.leveldb.SharedLeveldbStore
-import scala.annotation.nowarn
-
/**
* Utility program that removes the internal data stored with Pekko Persistence
* by the Cluster `ShardCoordinator`. The data contains the locations of the
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala
index faf48e346d..96bf7733bc 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala
@@ -15,6 +15,10 @@ package org.apache.pekko.cluster.sharding
import java.net.URLEncoder
import java.util
+
+import scala.collection.immutable.Set
+import scala.concurrent.duration._
+
import org.apache.pekko
import pekko.actor.Actor
import pekko.actor.ActorLogging
@@ -35,9 +39,9 @@ import pekko.cluster.ClusterEvent.MemberPreparingForShutdown
import pekko.cluster.ClusterEvent.MemberReadyForShutdown
import pekko.cluster.sharding.ShardRegion.ShardsUpdated
import pekko.cluster.sharding.internal.EntityPassivationStrategy
+import pekko.cluster.sharding.internal.RememberEntitiesProvider
import pekko.cluster.sharding.internal.RememberEntitiesShardStore
import pekko.cluster.sharding.internal.RememberEntitiesShardStore.GetEntities
-import pekko.cluster.sharding.internal.RememberEntitiesProvider
import pekko.cluster.sharding.internal.RememberEntityStarter
import pekko.coordination.lease.scaladsl.Lease
import pekko.coordination.lease.scaladsl.LeaseProvider
@@ -48,9 +52,6 @@ import pekko.util.OptionVal
import pekko.util.PrettyDuration._
import pekko.util.unused
-import scala.collection.immutable.Set
-import scala.concurrent.duration._
-
/**
* INTERNAL API
*
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala
index 2bb3fe7f1b..1cebbffc1b 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardCoordinator.scala
@@ -13,16 +13,18 @@
package org.apache.pekko.cluster.sharding
+import scala.annotation.nowarn
import scala.collection.immutable
+import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.util.Success
-import scala.annotation.nowarn
+
import org.apache.pekko
import pekko.actor._
import pekko.actor.DeadLetterSuppression
-import pekko.annotation.DoNotInherit
import pekko.annotation.{ InternalApi, InternalStableApi }
+import pekko.annotation.DoNotInherit
import pekko.cluster.Cluster
import pekko.cluster.ClusterEvent
import pekko.cluster.ClusterEvent._
@@ -31,15 +33,14 @@ import pekko.cluster.ddata.LWWRegisterKey
import pekko.cluster.ddata.Replicator._
import pekko.cluster.ddata.SelfUniqueAddress
import pekko.cluster.sharding.ShardRegion.ShardId
-import pekko.cluster.sharding.internal.AbstractLeastShardAllocationStrategy
-import pekko.cluster.sharding.internal.AbstractLeastShardAllocationStrategy.RegionEntry
-import pekko.cluster.sharding.internal.EventSourcedRememberEntitiesCoordinatorStore.MigrationMarker
import pekko.cluster.sharding.internal.{
EventSourcedRememberEntitiesCoordinatorStore,
RememberEntitiesCoordinatorStore,
RememberEntitiesProvider
}
-import scala.concurrent.ExecutionContext
+import pekko.cluster.sharding.internal.AbstractLeastShardAllocationStrategy
+import pekko.cluster.sharding.internal.AbstractLeastShardAllocationStrategy.RegionEntry
+import pekko.cluster.sharding.internal.EventSourcedRememberEntitiesCoordinatorStore.MigrationMarker
import pekko.event.{ BusLogging, Logging }
import pekko.pattern.{ pipe, AskTimeoutException }
import pekko.persistence._
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala
index ab0c842285..63eb189ca8 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.cluster.sharding
import java.net.URLEncoder
+
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.{ Future, Promise }
@@ -21,11 +22,12 @@ import scala.concurrent.duration._
import scala.reflect.ClassTag
import scala.runtime.AbstractFunction1
import scala.util.{ Failure, Success }
+
import org.apache.pekko
import pekko.Done
import pekko.actor._
-import pekko.annotation.ApiMayChange
import pekko.annotation.{ InternalApi, InternalStableApi }
+import pekko.annotation.ApiMayChange
import pekko.cluster.Cluster
import pekko.cluster.ClusterEvent._
import pekko.cluster.ClusterSettings
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala
index dab9fe9b15..5c1333cca4 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ExternalShardAllocationStrategy.scala
@@ -16,6 +16,7 @@ package org.apache.pekko.cluster.sharding.external
import scala.collection.immutable
import scala.concurrent.Future
import scala.concurrent.duration._
+import scala.jdk.DurationConverters._
import org.apache.pekko
import pekko.actor.Actor
@@ -39,7 +40,6 @@ import pekko.cluster.sharding.ShardRegion.ShardId
import pekko.event.Logging
import pekko.pattern.AskTimeoutException
import pekko.util.Timeout
-import scala.jdk.DurationConverters._
object ExternalShardAllocationStrategy {
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala
index 8d7520ae6a..5ce23eb3fe 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/ShardLocations.scala
@@ -13,10 +13,11 @@
package org.apache.pekko.cluster.sharding.external
+import scala.jdk.CollectionConverters._
+
import org.apache.pekko
import pekko.cluster.sharding.ShardRegion.ShardId
import pekko.cluster.sharding.external.ExternalShardAllocationStrategy.ShardLocation
-import scala.jdk.CollectionConverters._
final class ShardLocations(val locations: Map[ShardId, ShardLocation]) {
diff --git a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala
index 3370d4e3cd..2bec405869 100644
--- a/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala
+++ b/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/external/internal/ExternalShardAllocationClientImpl.scala
@@ -16,6 +16,9 @@ package org.apache.pekko.cluster.sharding.external.internal
import java.util.concurrent.CompletionStage
import scala.concurrent.Future
+import scala.jdk.CollectionConverters._
+import scala.jdk.DurationConverters._
+import scala.jdk.FutureConverters._
import org.apache.pekko
import pekko.Done
@@ -44,11 +47,8 @@ import pekko.cluster.sharding.external.ShardLocations
import pekko.dispatch.MessageDispatcher
import pekko.event.Logging
import pekko.pattern.ask
-import scala.jdk.FutureConverters._
-import scala.jdk.DurationConverters._
... 16960 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org