From 0c1b19a3216e58199f6e48d3859e5644af12dcec Mon Sep 17 00:00:00 2001 From: Christine Poerschke Date: Fri, 31 Jan 2020 16:15:22 +0000 Subject: [PATCH] LUCENE-8530: fix some 'rawtypes' javac warnings --- .../org/apache/lucene/search/grouping/GroupingSearch.java | 4 ++-- .../search/uhighlight/TestUnifiedHighlighterMTQ.java | 2 +- .../lucene/queries/payloads/TestPayloadCheckQuery.java | 8 ++++---- .../lucene/queries/payloads/TestPayloadScoreQuery.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lucene/grouping/src/java/org/apache/lucene/search/grouping/GroupingSearch.java b/lucene/grouping/src/java/org/apache/lucene/search/grouping/GroupingSearch.java index 8388480f115..b88fb743f08 100644 --- a/lucene/grouping/src/java/org/apache/lucene/search/grouping/GroupingSearch.java +++ b/lucene/grouping/src/java/org/apache/lucene/search/grouping/GroupingSearch.java @@ -42,7 +42,7 @@ import org.apache.lucene.util.mutable.MutableValue; */ public class GroupingSearch { - private final GroupSelector grouper; + private final GroupSelector grouper; private final Query groupEndDocs; private Sort groupSort = Sort.RELEVANCE; @@ -92,7 +92,7 @@ public class GroupingSearch { this(null, groupEndDocs); } - private GroupingSearch(GroupSelector grouper, Query groupEndDocs) { + private GroupingSearch(GroupSelector grouper, Query groupEndDocs) { this.grouper = grouper; this.groupEndDocs = groupEndDocs; } diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterMTQ.java b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterMTQ.java index 34fd46f7fdd..098a89bbf45 100644 --- a/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterMTQ.java +++ b/lucene/highlighter/src/test/org/apache/lucene/search/uhighlight/TestUnifiedHighlighterMTQ.java @@ -1004,7 +1004,7 @@ public class TestUnifiedHighlighterMTQ extends LuceneTestCase { int docId = searcher.search(new TermQuery(new Term("id", "id")), 1).scoreDocs[0].doc; WildcardQuery wildcardQuery = new WildcardQuery(new Term("body", "foxtr*")); - SpanMultiTermQueryWrapper wildcardQueryWrapper = new SpanMultiTermQueryWrapper<>(wildcardQuery); + SpanMultiTermQueryWrapper wildcardQueryWrapper = new SpanMultiTermQueryWrapper<>(wildcardQuery); SpanQuery wrappedQuery = new MyWrapperSpanQuery(wildcardQueryWrapper); diff --git a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadCheckQuery.java b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadCheckQuery.java index 68691772593..f77f076a5d7 100644 --- a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadCheckQuery.java +++ b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadCheckQuery.java @@ -211,10 +211,10 @@ public class TestPayloadCheckQuery extends LuceneTestCase { } public void testRewrite() throws IOException { - SpanMultiTermQueryWrapper fiv = new SpanMultiTermQueryWrapper(new WildcardQuery(new Term("field", "fiv*"))); - SpanMultiTermQueryWrapper hund = new SpanMultiTermQueryWrapper(new WildcardQuery(new Term("field", "hund*"))); - SpanMultiTermQueryWrapper twent = new SpanMultiTermQueryWrapper(new WildcardQuery(new Term("field", "twent*"))); - SpanMultiTermQueryWrapper nin = new SpanMultiTermQueryWrapper(new WildcardQuery(new Term("field", "nin*"))); + SpanMultiTermQueryWrapper fiv = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "fiv*"))); + SpanMultiTermQueryWrapper hund = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "hund*"))); + SpanMultiTermQueryWrapper twent = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "twent*"))); + SpanMultiTermQueryWrapper nin = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "nin*"))); SpanNearQuery sq = new SpanNearQuery(new SpanQuery[] {fiv, hund, twent, nin}, 0, true); diff --git a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java index dfd2b7f48f4..46b082d54a6 100644 --- a/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java +++ b/lucene/queries/src/test/org/apache/lucene/queries/payloads/TestPayloadScoreQuery.java @@ -195,7 +195,7 @@ public class TestPayloadScoreQuery extends LuceneTestCase { } public void testRewrite() throws IOException { - SpanMultiTermQueryWrapper xyz = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "xyz*"))); + SpanMultiTermQueryWrapper xyz = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "xyz*"))); PayloadScoreQuery psq = new PayloadScoreQuery(xyz, new AveragePayloadFunction(), PayloadDecoder.FLOAT_DECODER, false); // if query wasn't rewritten properly, the query would have failed with "Rewrite first!"