mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
Fixed an off-by-one error when deciding if we should grow BitSets.
This commit is contained in:
@ -105,9 +105,9 @@ public class BitSet implements Serializable, Cloneable {
|
||||
}
|
||||
}
|
||||
|
||||
private void enlarge(int newSize) {
|
||||
if (bits == null || bits.length < newSize) {
|
||||
long[] newBits = new long[newSize + 1];
|
||||
private void enlarge(int newPartition) {
|
||||
if (bits == null || bits.length < (newPartition + 1)) {
|
||||
long[] newBits = new long[newPartition + 1];
|
||||
if (bits != null) {
|
||||
System.arraycopy(bits, 0, newBits, 0, bits.length);
|
||||
}
|
||||
|
Reference in New Issue
Block a user