8293567: AbstractSplittableWithBrineGenerator: salt has digits that duplicate the marker

Reviewed-by: jlaskey
This commit is contained in:
Raffaello Giulietti 2022-09-26 15:47:18 +00:00
parent 36b61c5d7e
commit 968af74de4

View File

@ -2399,7 +2399,7 @@ public class RandomSupport {
long multiplier = (1L << SALT_SHIFT) - 1;
long salt = multiplier << (64 - SALT_SHIFT);
while ((salt & multiplier) == 0) {
long digit = Math.multiplyHigh(bits, multiplier);
long digit = Math.unsignedMultiplyHigh(bits, multiplier);
salt = (salt >>> SALT_SHIFT) | (digit << (64 - SALT_SHIFT));
bits *= multiplier;
}