Use withDefaultValue instead of withDefault

* Just minor boy scouting cleanup
This commit is contained in:
Patrik Nordwall 2012-10-30 09:28:45 +01:00
parent 413680e305
commit 545becacfe
2 changed files with 2 additions and 2 deletions

View file

@ -55,7 +55,7 @@ private[akka] object SubclassifiedIndex {
}
private[SubclassifiedIndex] def emptyMergeMap[K, V] = internalEmptyMergeMap.asInstanceOf[Map[K, Set[V]]]
private[this] val internalEmptyMergeMap = Map[AnyRef, Set[AnyRef]]().withDefault(_ Set[AnyRef]())
private[this] val internalEmptyMergeMap = Map[AnyRef, Set[AnyRef]]().withDefaultValue(Set[AnyRef]())
}
/**

View file

@ -202,7 +202,7 @@ private[akka] class ClusterRouteeProvider(
} else {
// find the node with least routees
val numberOfRouteesPerNode: Map[Address, Int] =
currentRoutees.foldLeft(currentNodes.map(_ -> 0).toMap.withDefault(_ 0)) { (acc, x)
currentRoutees.foldLeft(currentNodes.map(_ -> 0).toMap.withDefaultValue(0)) { (acc, x)
val address = fullAddress(x)
acc + (address -> (acc(address) + 1))
}