From 7647f13b9da9615095947566683c76bb0a540a06 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 8 Jun 2024 10:17:13 +0100 Subject: [PATCH] fix some typos (#1358) --- .../pekko/actor/testkit/typed/javadsl/LoggingTestKit.scala | 4 ++-- .../pekko/actor/testkit/typed/scaladsl/LoggingTestKit.scala | 4 ++-- .../org/apache/pekko/actor/typed/ActorRefIgnoreSpec.scala | 2 +- .../sharding/external/ExternalShardAllocationStrategy.scala | 2 +- docs/src/main/paradox/typed/guide/tutorial_1.md | 2 +- .../pekko/persistence/journal/leveldb/LeveldbIdMapping.scala | 2 +- .../src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala | 2 +- .../src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala | 2 +- .../main/scala/org/apache/pekko/stream/javadsl/Source.scala | 2 +- .../main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala | 2 +- .../scala/org/apache/pekko/stream/javadsl/SubSource.scala | 2 +- .../main/scala/org/apache/pekko/stream/scaladsl/Sink.scala | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) 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 837edc09c8a..63432d9e962 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 @@ -173,7 +173,7 @@ object LoggingTestKit { messageContains(messageIncludes).withLogLevel(Level.WARN) /** - * Create a filter for WARN level events with a an included + * Create a filter for WARN level events with an included * `throwable` that is a class or subclass of the given * * `Throwable` class. * @@ -192,7 +192,7 @@ object LoggingTestKit { messageContains(messageIncludes).withLogLevel(Level.ERROR) /** - * Create a filter for ERROR level events with a an included + * Create a filter for ERROR level events with an included * `throwable` that is a class or subclass of the given * * `Throwable` class. * 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 5de7cf006db..460fa672700 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 @@ -182,7 +182,7 @@ object LoggingTestKit { messageContains(messageIncludes).withLogLevel(Level.WARN) /** - * Create a filter for WARN level events with a an included + * Create a filter for WARN level events with an included * `throwable` that is a class or subclass of the given * `Throwable` `ClassTag`. * @@ -201,7 +201,7 @@ object LoggingTestKit { messageContains(messageIncludes).withLogLevel(Level.ERROR) /** - * Create a filter for WARN level events with a an included + * Create a filter for WARN level events with an included * `throwable` that is a class or subclass of the given * `Throwable` `ClassTag`. * 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 937f6128bcf..ae1376300a5 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 @@ -47,7 +47,7 @@ class ActorRefIgnoreSpec extends ScalaTestWithActorTestKit() with AnyWordSpecLik } /** - * This actor sends a ask to 'askMeRef' at bootstrap and forward the answer to the probe. + * This actor sends an ask to 'askMeRef' at bootstrap and forward the answer to the probe. * We will use it through out this test. */ def behavior(askMeRef: ActorRef[Request], probe: TestProbe[Int]) = Behaviors.setup[Int] { context => 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 a4a6cfa5ec7..bf2fb5a78b9 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 @@ -204,7 +204,7 @@ class ExternalShardAllocationStrategy(systemProvider: ClassicActorSystemProvider val currentAllocationByAddress: Map[Address, immutable.IndexedSeq[ShardId]] = currentShardAllocations.map { case (ref: ActorRefScope, value) if ref.isLocal => - (cluster.selfAddress, value) // so it can be compared to a address with host and port + (cluster.selfAddress, value) // so it can be compared to an address with host and port case (key, value) => (key.path.address, value) } diff --git a/docs/src/main/paradox/typed/guide/tutorial_1.md b/docs/src/main/paradox/typed/guide/tutorial_1.md index 97472cdfa04..fe39dc2d935 100644 --- a/docs/src/main/paradox/typed/guide/tutorial_1.md +++ b/docs/src/main/paradox/typed/guide/tutorial_1.md @@ -35,7 +35,7 @@ In fact, before your first actor is started, Pekko has already created two actor The easiest way to see the actor hierarchy in action is to print @apidoc[actor.typed.ActorRef] instances. In this small experiment, we create an actor, print its reference, create a child of this actor, and print the child's reference. -In a new project, create a `com.example` package and with a @scala[a new Scala file called `ActorHierarchyExperiments.scala` here. Copy and paste the code from the snippet below to this new source file]@java[a Java file for each of the classes in the snippet below and copy the respective contents]. Save your @scala[file and run `sbt "runMain com.example.ActorHierarchyExperiments"`]@java[files and run `com.example.ActorHierarchyExperiments` from your build tool or IDE] to observe the output. +In a new project, create a `com.example` package and with a @scala[new Scala file called `ActorHierarchyExperiments.scala` here. Copy and paste the code from the snippet below to this new source file]@java[Java file for each of the classes in the snippet below and copy the respective contents]. Save your @scala[file and run `sbt "runMain com.example.ActorHierarchyExperiments"`]@java[files and run `com.example.ActorHierarchyExperiments` from your build tool or IDE] to observe the output. Scala : @@snip [ActorHierarchyExperiments.scala](/docs/src/test/scala/typed/tutorial_1/ActorHierarchyExperiments.scala) { #print-refs } diff --git a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala index 61c4ab0c883..99178a29825 100644 --- a/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala +++ b/persistence/src/main/scala/org/apache/pekko/persistence/journal/leveldb/LeveldbIdMapping.scala @@ -36,7 +36,7 @@ private[persistence] trait LeveldbIdMapping extends Actor { this: LeveldbStore = * Get the mapped numeric id for the specified persistent actor `id`. Creates and * stores a new mapping if necessary. * - * This method is thread safe and it is allowed to call it from a another + * This method is thread safe and it is allowed to call it from another * thread than the actor's thread. That is necessary for Future composition, * e.g. `asyncReadHighestSequenceNr` followed by `asyncReplayMessages`. */ diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala index 856a2636168..356c7e44c5f 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Flow.scala @@ -1359,7 +1359,7 @@ final class Flow[In, Out, Mat](delegate: scaladsl.Flow[In, Out, Mat]) extends Gr new Flow(delegate.scan(zero)(f.apply)) /** - * Similar to `scan` but with a asynchronous function, + * Similar to `scan` but with an asynchronous function, * emits its current value which starts at `zero` and then * applies the current and next value to the given function `f`, * emitting a `Future` that resolves to the next current value. diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala index a2f24df9dd0..b3b8a585279 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Sink.scala @@ -278,7 +278,7 @@ object Sink { new Sink(scaladsl.Sink.lastOption[In].mapMaterializedValue(_.map(_.toJava)(ExecutionContexts.parasitic).asJava)) /** - * A `Sink` that materializes into a a `CompletionStage` of `List` containing the last `n` collected elements. + * A `Sink` that materializes into a `CompletionStage` of `List` containing the last `n` collected elements. * * If the stream completes before signaling at least n elements, the `CompletionStage` will complete with all elements seen so far. * If the stream never completes the `CompletionStage` will never complete. diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala index c53881266c1..10637adac0e 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/Source.scala @@ -3102,7 +3102,7 @@ final class Source[Out, Mat](delegate: scaladsl.Source[Out, Mat]) extends Graph[ new Source(delegate.scan(zero)(f.apply)) /** - * Similar to `scan` but with a asynchronous function, + * Similar to `scan` but with an asynchronous function, * emits its current value which starts at `zero` and then * applies the current and next value to the given function `f`, * emitting a `Future` that resolves to the next current value. diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala index 5fb6bbfdcd0..5e3eea36e58 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubFlow.scala @@ -739,7 +739,7 @@ class SubFlow[In, Out, Mat]( new SubFlow(delegate.scan(zero)(f.apply)) /** - * Similar to `scan` but with a asynchronous function, + * Similar to `scan` but with an asynchronous function, * emits its current value which starts at `zero` and then * applies the current and next value to the given function `f`, * emitting a `Future` that resolves to the next current value. diff --git a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala index a3b39c391da..ee63fbfb93c 100755 --- a/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/javadsl/SubSource.scala @@ -730,7 +730,7 @@ class SubSource[Out, Mat]( new SubSource(delegate.scan(zero)(f.apply)) /** - * Similar to `scan` but with a asynchronous function, + * Similar to `scan` but with an asynchronous function, * emits its current value which starts at `zero` and then * applies the current and next value to the given function `f`, * emitting a `Future` that resolves to the next current value. diff --git a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala index c487fbdaeee..492115eba01 100644 --- a/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala +++ b/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Sink.scala @@ -248,7 +248,7 @@ object Sink { } /** - * A `Sink` that materializes into a a `Future` of `immutable.Seq[T]` containing the last `n` collected elements. + * A `Sink` that materializes into a `Future` of `immutable.Seq[T]` containing the last `n` collected elements. * * If the stream completes before signaling at least n elements, the `Future` will complete with all elements seen so far. * If the stream never completes, the `Future` will never complete.