8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem
Reviewed-by: jlahoda
This commit is contained in:
parent
6adc242cf3
commit
a6109bf1ea
@ -174,8 +174,7 @@ public abstract class EntryMap<T> {
|
||||
}
|
||||
|
||||
public static long nextPowerOfTwo( long x ) {
|
||||
x = -1 >>> Long.numberOfLeadingZeros(x - 1);
|
||||
return x + 1;
|
||||
return 1L << -Long.numberOfLeadingZeros(x - 1);
|
||||
}
|
||||
|
||||
public static int arraySize( final int expected, final float f ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user