Skip to content

Commit e80b907

Browse files
authored
Update to use RandomAccessInput.readBytes bulk method (#17555)
Signed-off-by: Asim Mahmood <[email protected]>
1 parent 7094de1 commit e80b907

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

server/src/main/java/org/opensearch/common/util/ByteArrayBackedBitset.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ public ByteArrayBackedBitset(int capacity) {
3131
*/
3232
public ByteArrayBackedBitset(RandomAccessInput in, long offset, int length) throws IOException {
3333
byteArray = new byte[length];
34-
int i = 0;
35-
while (i < length) {
36-
byteArray[i] = in.readByte(offset + i);
37-
i++;
38-
}
34+
in.readBytes(offset, byteArray, 0, length);
3935
}
4036

4137
/**

0 commit comments

Comments
 (0)