Apache Lucene open-source search software
Use growNoCopy for SortingStoredFieldsConsumer#NO_COMPRESSION (#12733)
gf21211448015641bb
diff --git a/lucene/core/src/java/org/apache/lucene/index/SortingStoredFieldsConsumer.java b/lucene/core/src/java/org/apache/lucene/index/SortingStoredFieldsConsumer.javaindex 61bd680f2bd..1c7c5820b6d 100644--- a/lucene/core/src/java/org/apache/lucene/index/SortingStoredFieldsConsumer.java+++ b/lucene/core/src/java/org/apache/lucene/index/SortingStoredFieldsConsumer.java@@ -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;