Merge pull request #25035 from piotrromanski/wip-fix-math-abs-usage
Handle a negative value returned by Math.abs()
This commit is contained in:
commit
d5b2aea176
9 changed files with 10 additions and 10 deletions
|
|
@ -118,7 +118,7 @@ class HubsDocSpec extends AkkaSpec with CompileOnlySpec {
|
|||
// value to the left is used)
|
||||
val runnableGraph: RunnableGraph[Source[String, NotUsed]] =
|
||||
producer.toMat(PartitionHub.sink(
|
||||
(size, elem) ⇒ math.abs(elem.hashCode) % size,
|
||||
(size, elem) ⇒ math.abs(elem.hashCode % size),
|
||||
startAfterNrOfConsumers = 2, bufferSize = 256))(Keep.right)
|
||||
|
||||
// By running/materializing the producer, we get back a Source, which
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue