Skip to content
Permalink
Browse files
8273162: AbstractSplittableWithBrineGenerator does not create a rando…
…m salt

Reviewed-by: rriggs, bpb
  • Loading branch information
JimLaskey committed Sep 10, 2021
1 parent d4177a9 commit 5e1df2c7d71e9393beaa4fd2d8812b065d053392
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/java.base/share/classes/jdk/internal/util/random/RandomSupport.java
@@ -2380,7 +2380,7 @@ protected AbstractSplittableWithBrineGenerator() {
long bits = nextLong();
long multiplier = (1L << SALT_SHIFT) - 1;
long salt = multiplier << (64 - SALT_SHIFT);
while ((salt & multiplier) != 0) {
while ((salt & multiplier) == 0) {
long digit = Math.multiplyHigh(bits, multiplier);
salt = (salt >>> SALT_SHIFT) | (digit << (64 - SALT_SHIFT));
bits *= multiplier;

1 comment on commit 5e1df2c

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 5e1df2c Sep 10, 2021

Please sign in to comment.