Apache Lucene open-source search software
LUCENE-9887: fix error param use in RadixSelector
liupanfengcce982146af7
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 1c32bcc9e02..c0a505edf92 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -333,6 +333,9 @@ Bug FixesLuwak/Monitor bug causing registered queries to sometimes fail tomatch. (Paweł Bugalski)+* LUCENE-9887: Fixed parameter use in RadixSelector.+ (liupanfeng via Adrien Grand)+Other---------------------diff --git a/lucene/core/src/java/org/apache/lucene/util/RadixSelector.java b/lucene/core/src/java/org/apache/lucene/util/RadixSelector.javaindex ddd1a8d1363..9ef63778642 100644--- a/lucene/core/src/java/org/apache/lucene/util/RadixSelector.java+++ b/lucene/core/src/java/org/apache/lucene/util/RadixSelector.java@@ -125,7 +125,7 @@ public abstract class RadixSelector extends Selector {}private void select(int from, int to, int k, int d, int l) {- if (to - from <= LENGTH_THRESHOLD || d >= LEVEL_THRESHOLD) {+ if (to - from <= LENGTH_THRESHOLD || l >= LEVEL_THRESHOLD) {getFallbackSelector(d).select(from, to, k);} else {radixSelect(from, to, k, d, l);