Minor renames of parameters of non-user API an some code cleanup
This commit is contained in:
parent
39ca090110
commit
4c8360e8d7
3 changed files with 10 additions and 17 deletions
|
|
@ -339,9 +339,7 @@ class Index[K <: AnyRef, V <: AnyRef: Manifest] {
|
|||
*/
|
||||
def foreach(fun: (K, V) ⇒ Unit) {
|
||||
import scala.collection.JavaConversions._
|
||||
container.entrySet foreach { (e) ⇒
|
||||
e.getValue.foreach(fun(e.getKey, _))
|
||||
}
|
||||
container.entrySet foreach { e ⇒ e.getValue.foreach(fun(e.getKey, _)) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,13 +22,8 @@ final case class MessageInvocation(receiver: ActorRef,
|
|||
senderFuture: Option[Promise[Any]]) {
|
||||
if (receiver eq null) throw new IllegalArgumentException("Receiver can't be null")
|
||||
|
||||
def invoke() {
|
||||
try {
|
||||
receiver.invoke(this)
|
||||
} catch {
|
||||
case e: NullPointerException ⇒ throw new ActorInitializationException(
|
||||
"Don't call 'self ! message' in the Actor's constructor (in Scala this means in the body of the class).")
|
||||
}
|
||||
final def invoke() {
|
||||
receiver invoke this
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -177,7 +172,7 @@ trait MessageDispatcher {
|
|||
val uuid = i.next()
|
||||
Actor.registry.local.actorFor(uuid) match {
|
||||
case Some(actor) ⇒ actor.stop()
|
||||
case None ⇒ {}
|
||||
case None ⇒
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,12 +137,12 @@ trait Mist {
|
|||
trait RootEndpointLocator {
|
||||
var root: ActorRef = null
|
||||
|
||||
def configureRoot(id: String) {
|
||||
def findRoot(id: String): ActorRef =
|
||||
Actor.registry.actorFor(id).getOrElse(
|
||||
throw new ConfigurationException("akka.http.root-actor-id configuration option does not have a valid actor address [" + id + "]"))
|
||||
def configureRoot(address: String) {
|
||||
def findRoot(address: String): ActorRef =
|
||||
Actor.registry.actorFor(address).getOrElse(
|
||||
throw new ConfigurationException("akka.http.root-actor-id configuration option does not have a valid actor address [" + address + "]"))
|
||||
|
||||
root = if ((id eq null) || id == "") findRoot(MistSettings.RootActorID) else findRoot(id)
|
||||
root = if ((address eq null) || address == "") findRoot(MistSettings.RootActorID) else findRoot(address)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ class RootEndpoint extends Actor with Endpoint {
|
|||
|
||||
def recv: Receive = {
|
||||
case NoneAvailable(uri, req) ⇒ _na(uri, req)
|
||||
case unknown ⇒ {}
|
||||
case unknown ⇒
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue