diff --git a/akka-actor/src/main/scala/akka/actor/TypedActor.scala b/akka-actor/src/main/scala/akka/actor/TypedActor.scala index 3dc5d4c000..c1cefd8153 100644 --- a/akka-actor/src/main/scala/akka/actor/TypedActor.scala +++ b/akka-actor/src/main/scala/akka/actor/TypedActor.scala @@ -259,7 +259,7 @@ object TypedActor extends ExtensionId[TypedActorExtension] with ExtensionIdProvi /** * Returns the ActorContext (for a TypedActor) when inside a method call in a TypedActor. */ - def context = currentContext.get match { + def context: ActorContext = currentContext.get match { case null ⇒ throw new IllegalStateException("Calling TypedActor.context outside of a TypedActor implementation method!") case some ⇒ some }