Use withDefaultValue instead of withDefault
* Just minor boy scouting cleanup
This commit is contained in:
parent
413680e305
commit
545becacfe
2 changed files with 2 additions and 2 deletions
|
|
@ -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]())
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue