Rename local val _routee, see #2442

This commit is contained in:
Patrik Nordwall 2012-08-29 14:59:27 +02:00
parent fa0ec4bd01
commit 305dceb102

View file

@ -517,9 +517,9 @@ trait RoundRobinLike { this: RouterConfig ⇒
val next = new AtomicLong(0)
def getNext(): ActorRef = {
val _routees = routeeProvider.routees
if (_routees.isEmpty) routeeProvider.context.system.deadLetters
else _routees((next.getAndIncrement % _routees.size).asInstanceOf[Int])
val currentRoutees = routeeProvider.routees
if (currentRoutees.isEmpty) routeeProvider.context.system.deadLetters
else currentRoutees((next.getAndIncrement % currentRoutees.size).asInstanceOf[Int])
}
{
@ -634,9 +634,9 @@ trait RandomLike { this: RouterConfig ⇒
routeeProvider.createAndRegisterRoutees(props, nrOfInstances, routees)
def getNext(): ActorRef = {
val _routees = routeeProvider.routees
if (_routees.isEmpty) routeeProvider.context.system.deadLetters
else _routees(ThreadLocalRandom.current.nextInt(_routees.size))
val currentRoutees = routeeProvider.routees
if (currentRoutees.isEmpty) routeeProvider.context.system.deadLetters
else currentRoutees(ThreadLocalRandom.current.nextInt(currentRoutees.size))
}
{