Fix bad api

This commit is contained in:
Houston Putman 2024-10-15 16:43:58 -05:00
parent b30e96749d
commit d1e021055f
1 changed files with 1 additions and 3 deletions

View File

@ -16,8 +16,6 @@
*/
package org.apache.lucene.util;
import java.util.Arrays;
/**
* An implementation of a selection algorithm, ie. computing the k-th greatest value from a
* collection.
@ -40,7 +38,7 @@ public abstract class Selector {
*/
public void multiSelect(int from, int to, int[] k) {
// k needs to be sorted, so copy the array
k = Arrays.copyOf(k, k.length);
k = ArrayUtil.copyArray(k);
checkMultiArgs(from, to, k);
multiSelect(from, to, k, 0, k.length);
}