mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
Fixed issue where BitSet didn't handle a range of 64 bits correctly on bulk operations - now just return the predefined MASK which has all the bits set when requesting that all the bits be set.
This commit is contained in:
@ -34,7 +34,11 @@ public class BitSet implements Serializable, Cloneable {
|
||||
|
||||
private static long getTrueMask(int fromIndex, int toIndex) {
|
||||
int currentRange = toIndex - fromIndex;
|
||||
return (((1L << currentRange) - 1L) << (fromIndex % BITS_PER_LONG));
|
||||
if (currentRange == 64) {
|
||||
return MASK;
|
||||
} else {
|
||||
return (((1L << currentRange) - 1L) << (fromIndex % BITS_PER_LONG));
|
||||
}
|
||||
}
|
||||
|
||||
public BitSet(int bitLength) {
|
||||
|
Reference in New Issue
Block a user