Use growNoCopy for SortingStoredFieldsConsumer#NO_COMPRESSION (#12733)

This commit is contained in:
gf2121 2023-11-06 15:41:07 +08:00 committed by GitHub
parent 382aa549a7
commit 1448015641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ final class SortingStoredFieldsConsumer extends StoredFieldsConsumer {
public void decompress(
DataInput in, int originalLength, int offset, int length, BytesRef bytes)
throws IOException {
bytes.bytes = ArrayUtil.grow(bytes.bytes, length);
bytes.bytes = ArrayUtil.growNoCopy(bytes.bytes, length);
in.skipBytes(offset);
in.readBytes(bytes.bytes, 0, length);
bytes.offset = 0;