Initialize BitArray storage as number of bits (#62327) (#62354)

This commit is contained in:
Ignacio Vera 2020-09-15 08:34:22 +02:00 committed by GitHub
parent c81a076f5a
commit 3536f7f7c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -34,11 +34,11 @@ public final class BitArray implements Releasable {
/**
* Create the {@linkplain BitArray}.
* @param initialSize the initial size of underlying storage.
* @param initialSize the initial size of underlying storage expressed in bits.
*/
public BitArray(long initialSize, BigArrays bigArrays) {
this.bigArrays = bigArrays;
this.bits = bigArrays.newLongArray(initialSize, true);
this.bits = bigArrays.newLongArray(wordNum(initialSize) + 1, true);
}
/**