You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2020/09/28 17:19:16 UTC
[lucene-solr] branch branch_8x updated: LUCENE-9444: woops,
cannot use Set.of until JDK 9
This is an automated email from the ASF dual-hosted git repository.
mikemccand pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new acce3c1 LUCENE-9444: woops, cannot use Set.of until JDK 9
acce3c1 is described below
commit acce3c15b4a1dcdb69301d06e4ab9bda3d461d58
Author: Mike McCandless <mi...@apache.org>
AuthorDate: Mon Sep 28 13:18:47 2020 -0400
LUCENE-9444: woops, cannot use Set.of until JDK 9
---
.../apache/lucene/facet/taxonomy/TestTaxonomyFacetLabels.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetLabels.java b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetLabels.java
index 3a271b2..d6964d2 100644
--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetLabels.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetLabels.java
@@ -34,9 +34,10 @@ import org.apache.lucene.util.IOUtils;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import java.util.stream.Collectors;
public class TestTaxonomyFacetLabels extends FacetTestCase {
@@ -157,13 +158,13 @@ public class TestTaxonomyFacetLabels extends FacetTestCase {
assertTrue(facetLabels.stream()
.filter(l -> "Author".equals(l.components[0]))
.map(l -> l.components[1]).collect(Collectors.toSet())
- .equals(Set.of("Bob", "Lisa", "Susan", "Frank", "Tom")));
+ .equals(new HashSet<>(Arrays.asList("Bob", "Lisa", "Susan", "Frank", "Tom"))));
assertTrue(facetLabels.stream()
.filter(l -> "Publish Date".equals(l.components[0]))
.map(l -> String.join("/", l.components[1], l.components[2], l.components[3]))
.collect(Collectors.toSet())
- .equals(Set.of("2010/10/15", "2010/10/20", "2012/1/1", "2012/1/7", "1999/5/5")));
+ .equals(new HashSet<>(Arrays.asList("2010/10/15", "2010/10/20", "2012/1/1", "2012/1/7", "1999/5/5"))));
// Check labels for a specific dimension
facetLabels = lookupFacetLabels(taxoLabels, fc.getMatchingDocs(), "Publish Date");
@@ -172,7 +173,7 @@ public class TestTaxonomyFacetLabels extends FacetTestCase {
assertTrue(facetLabels.stream()
.map(l -> String.join("/", l.components[1], l.components[2], l.components[3]))
.collect(Collectors.toSet())
- .equals(Set.of("2010/10/15", "2010/10/20", "2012/1/1", "2012/1/7", "1999/5/5")));
+ .equals(new HashSet<>(Arrays.asList("2010/10/15", "2010/10/20", "2012/1/1", "2012/1/7", "1999/5/5"))));
try {
facetLabels = lookupFacetLabels(taxoLabels, fc.getMatchingDocs(), null, true);