Skip to content

Apache Lucene open-source search software

LUCENE-2989: Fix TestCollectionUtil to not fail on IBM JRE

Uwe Schindlerae382e3a3cd9
diff --git a/lucene/src/test/org/apache/lucene/util/TestCollectionUtil.java b/lucene/src/test/org/apache/lucene/util/TestCollectionUtil.java
index 159bc899a51..1c59c887db9 100644
--- a/lucene/src/test/org/apache/lucene/util/TestCollectionUtil.java
+++ b/lucene/src/test/org/apache/lucene/util/TestCollectionUtil.java
@@ -91,7 +91,7 @@ public class TestCollectionUtil extends LuceneTestCase {
// should produce no exceptions
public void testEmptyArraySort() {
- List<Integer> list = Collections.emptyList();
+ List<Integer> list = Arrays.asList(new Integer[0]);
CollectionUtil.quickSort(list);
CollectionUtil.mergeSort(list);
CollectionUtil.insertionSort(list);