mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8273162: AbstractSplittableWithBrineGenerator does not create a random salt
Reviewed-by: rriggs, bpb
This commit is contained in:
parent
d4177a98c1
commit
5e1df2c7d7
1 changed files with 1 additions and 1 deletions
|
@ -2380,7 +2380,7 @@ public class RandomSupport {
|
||||||
long bits = nextLong();
|
long bits = nextLong();
|
||||||
long multiplier = (1L << SALT_SHIFT) - 1;
|
long multiplier = (1L << SALT_SHIFT) - 1;
|
||||||
long salt = multiplier << (64 - SALT_SHIFT);
|
long salt = multiplier << (64 - SALT_SHIFT);
|
||||||
while ((salt & multiplier) != 0) {
|
while ((salt & multiplier) == 0) {
|
||||||
long digit = Math.multiplyHigh(bits, multiplier);
|
long digit = Math.multiplyHigh(bits, multiplier);
|
||||||
salt = (salt >>> SALT_SHIFT) | (digit << (64 - SALT_SHIFT));
|
salt = (salt >>> SALT_SHIFT) | (digit << (64 - SALT_SHIFT));
|
||||||
bits *= multiplier;
|
bits *= multiplier;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue