diff --git a/modules/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java b/modules/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java index 5291fe16dc3..d9972221c1b 100644 --- a/modules/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java +++ b/modules/facet/src/examples/org/apache/lucene/facet/example/multiCL/MultiCLIndexer.java @@ -1,5 +1,6 @@ package org.apache.lucene.facet.example.multiCL; +import java.util.Arrays; import java.util.List; import java.util.Random; @@ -162,7 +163,7 @@ public class MultiCLIndexer { int nDocsAdded = 0; int nFacetsAdded = 0; for (int docNum = 0; docNum < SimpleUtils.docTexts.length; docNum++) { - List facetList = SimpleUtils.categoryPathArrayToList(cPaths[docNum]); + List facetList = Arrays.asList(cPaths[docNum]); // we do not alter indexing parameters! // a category document builder will add the categories to a document diff --git a/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java b/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java index de6937667d8..cc5b803b260 100644 --- a/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java +++ b/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleIndexer.java @@ -1,5 +1,6 @@ package org.apache.lucene.facet.example.simple; +import java.util.Arrays; import java.util.List; import org.apache.lucene.document.Document; @@ -62,7 +63,7 @@ public class SimpleIndexer { for (int docNum=0; docNum facetList = SimpleUtils.categoryPathArrayToList(SimpleUtils.categories[docNum]); + List facetList = Arrays.asList(SimpleUtils.categories[docNum]); // we do not alter indexing parameters! // a category document builder will add the categories to a document once build() is called diff --git a/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleUtils.java b/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleUtils.java index 7765c855489..fda6ab0e628 100644 --- a/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleUtils.java +++ b/modules/facet/src/examples/org/apache/lucene/facet/example/simple/SimpleUtils.java @@ -72,16 +72,4 @@ public class SimpleUtils { */ public static final Analyzer analyzer = new WhitespaceAnalyzer(ExampleUtils.EXAMPLE_VER); - /** - * Utility method: List of category paths out of an array of them... - * @param categoryPaths input array of category paths. - */ - public static List categoryPathArrayToList (CategoryPath...categoryPaths) { - ArrayList res = new ArrayList(); - for (CategoryPath categoryPath : categoryPaths) { - res.add(categoryPath); - } - return res; - } - }