Changing the default sender of ! to be Actor.noSender to keep null in one place and have a logical alternative when deadLetters isn't present in scope.

This commit is contained in:
Viktor Klang 2012-10-06 00:13:42 +02:00
parent 89c1f66b1f
commit 397083a218
11 changed files with 19 additions and 14 deletions

View file

@ -235,7 +235,7 @@ private[akka] class RemoteActorRef private[akka] (
provider.deadLetters ! message
}
override def !(message: Any)(implicit sender: ActorRef = null): Unit =
override def !(message: Any)(implicit sender: ActorRef = Actor.noSender): Unit =
try remote.send(message, Option(sender), this)
catch {
case e @ (_: InterruptedException | NonFatal(_))