Skip to content

Commit 38c6be1

Browse files
asimmahmood1vinaykpud
authored andcommitted
Update to use RandomAccessInput.readBytes bulk method (opensearch-project#17555)
Signed-off-by: Asim Mahmood <[email protected]> Signed-off-by: Vinay Krishna Pudyodu <[email protected]>
1 parent c31a2e6 commit 38c6be1

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)