From 8e2d3782284f2dc0ca3cc3ebf549619e633a9aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20van=20den=20Hoek?= Date: Mon, 11 Feb 2019 17:25:05 +0100 Subject: [PATCH] fix typo: excpetion -> exception (#26352) --- .../src/test/scala/akka/actor/TypedActorSpec.scala | 2 +- akka-actor/src/main/mima-filters/2.5.21.backwards.excludes | 2 ++ akka-actor/src/main/scala/akka/pattern/AskSupport.scala | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 akka-actor/src/main/mima-filters/2.5.21.backwards.excludes diff --git a/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala index 5f27500f87..3c0a437ef2 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala @@ -269,7 +269,7 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) TypedActor(system).stop(null) should ===(false) } - "throw an IllegalStateExcpetion when TypedActor.self is called in the wrong scope" in { + "throw an IllegalStateException when TypedActor.self is called in the wrong scope" in { filterEvents(EventFilter[IllegalStateException]("Calling")) { (intercept[IllegalStateException] { TypedActor.self[Foo] diff --git a/akka-actor/src/main/mima-filters/2.5.21.backwards.excludes b/akka-actor/src/main/mima-filters/2.5.21.backwards.excludes new file mode 100644 index 0000000000..bc8cd45fd8 --- /dev/null +++ b/akka-actor/src/main/mima-filters/2.5.21.backwards.excludes @@ -0,0 +1,2 @@ +# Typo in Akka internal method - PR #26352 +ProblemFilters.exclude[DirectMissingMethodProblem]("akka.pattern.AskableActorRef.recipientTerminatedExcpetion") diff --git a/akka-actor/src/main/scala/akka/pattern/AskSupport.scala b/akka-actor/src/main/scala/akka/pattern/AskSupport.scala index d1eef4393f..6d809e987e 100644 --- a/akka-actor/src/main/scala/akka/pattern/AskSupport.scala +++ b/akka-actor/src/main/scala/akka/pattern/AskSupport.scala @@ -284,7 +284,7 @@ object AskableActorRef { /** * INTERNAL API */ - @InternalApi private[akka] def recipientTerminatedExcpetion(recipient: Any, message: Any, sender: ActorRef): AskTimeoutException = { + @InternalApi private[akka] def recipientTerminatedException(recipient: Any, message: Any, sender: ActorRef): AskTimeoutException = { new AskTimeoutException(s"Recipient [$recipient] had already been terminated. " + messagePartOfException(message, sender)) } @@ -327,7 +327,7 @@ final class AskableActorRef(val actorRef: ActorRef) extends AnyVal { private[pattern] def internalAsk(message: Any, timeout: Timeout, sender: ActorRef) = actorRef match { case ref: InternalActorRef if ref.isTerminated ⇒ actorRef ! message - Future.failed[Any](AskableActorRef.recipientTerminatedExcpetion(actorRef, message, sender)) + Future.failed[Any](AskableActorRef.recipientTerminatedException(actorRef, message, sender)) case ref: InternalActorRef ⇒ if (timeout.duration.length <= 0) Future.failed[Any](AskableActorRef.negativeTimeoutException(actorRef, message, sender)) @@ -359,7 +359,7 @@ final class ExplicitlyAskableActorRef(val actorRef: ActorRef) extends AnyVal { case ref: InternalActorRef if ref.isTerminated ⇒ val message = messageFactory(ref.provider.deadLetters) actorRef ! message - Future.failed[Any](AskableActorRef.recipientTerminatedExcpetion(actorRef, message, sender)) + Future.failed[Any](AskableActorRef.recipientTerminatedException(actorRef, message, sender)) case ref: InternalActorRef ⇒ if (timeout.duration.length <= 0) { val message = messageFactory(ref.provider.deadLetters)