diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-26 11:34:38 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-26 11:37:20 -0700 |
commit | 742cb71ec8c8205af032df609088affc12d3e1c5 (patch) | |
tree | 5de7ebbb7eec4a3678c94ed68026fb4003989f71 /src/actors-migration | |
parent | b716261a7b29bcf613cb4e3b47ca2fb5a97380bb (diff) | |
download | scala-742cb71ec8c8205af032df609088affc12d3e1c5.tar.gz scala-742cb71ec8c8205af032df609088affc12d3e1c5.tar.bz2 scala-742cb71ec8c8205af032df609088affc12d3e1c5.zip |
Don't write side-effecting nullary methods.
Style says never write methods like this:
def foo: Unit
If it is Unit, then it is side-effecting, and should be
def foo(): Unit
Since -Xlint warns about this, we must adhere to its dictate.
Diffstat (limited to 'src/actors-migration')
-rw-r--r-- | src/actors-migration/scala/actors/migration/StashingActor.scala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/actors-migration/scala/actors/migration/StashingActor.scala b/src/actors-migration/scala/actors/migration/StashingActor.scala index 9c3917b65e..d0a1432e72 100644 --- a/src/actors-migration/scala/actors/migration/StashingActor.scala +++ b/src/actors-migration/scala/actors/migration/StashingActor.scala @@ -18,7 +18,7 @@ trait StashingActor extends InternalActor { type Receive = PartialFunction[Any, Unit] // checks if StashingActor is created within the actorOf block - creationCheck; + creationCheck() private[actors] val ref = new InternalActorRef(this) @@ -112,8 +112,7 @@ trait StashingActor extends InternalActor { /* * Checks that StashingActor can be created only by MigrationSystem.actorOf method. */ - private[this] def creationCheck = { - + private[this] def creationCheck(): Unit = { // creation check (see ActorRef) val context = MigrationSystem.contextStack.get if (context.isEmpty) |