Apache Lucene open-source search software
Don't preserve auxiliary buffer contents in LSBRadixSorter if it grows (#12947)
Stefan Vodita8f50976c268b
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 2cc172bd316..6e7690119d3 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -273,6 +273,8 @@ Optimizations* GITHUB#13431: Replace TreeMap and use compiled Patterns in Japanese UserDictionary. (Bruno Roustant)+* GITHUB#12941: Don't preserve auxiliary buffer contents in LSBRadixSorter if it grows. (Stefan Vodita)+Bug Fixes---------------------(No changes)diff --git a/lucene/core/src/java/org/apache/lucene/util/LSBRadixSorter.java b/lucene/core/src/java/org/apache/lucene/util/LSBRadixSorter.javaindex 2b2c625a9ff..b1a53a966a0 100644--- a/lucene/core/src/java/org/apache/lucene/util/LSBRadixSorter.java+++ b/lucene/core/src/java/org/apache/lucene/util/LSBRadixSorter.java@@ -92,7 +92,7 @@ public final class LSBRadixSorter {return;}- buffer = ArrayUtil.grow(buffer, len);+ buffer = ArrayUtil.growNoCopy(buffer, len);int[] arr = array;