mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem
Reviewed-by: jlahoda
This commit is contained in:
parent
6adc242cf3
commit
a6109bf1ea
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue