diff --git a/lucene/facet/src/java/org/apache/lucene/facet/RandomSamplingFacetsCollector.java b/lucene/facet/src/java/org/apache/lucene/facet/RandomSamplingFacetsCollector.java index 58c0696477c..152efe79929 100644 --- a/lucene/facet/src/java/org/apache/lucene/facet/RandomSamplingFacetsCollector.java +++ b/lucene/facet/src/java/org/apache/lucene/facet/RandomSamplingFacetsCollector.java @@ -153,7 +153,7 @@ public class RandomSamplingFacetsCollector extends FacetsCollector { /** Create a sampled copy of the matching documents list. */ private List createSampledDocs(List matchingDocsList) { - List sampledDocsList = new ArrayList(matchingDocsList.size()); + List sampledDocsList = new ArrayList<>(matchingDocsList.size()); for (MatchingDocs docs : matchingDocsList) { sampledDocsList.add(createSample(docs)); }