LUCENE-8530: fix some 'rawtypes' javac warnings

This commit is contained in:
Christine Poerschke 2020-01-31 16:15:22 +00:00
parent 719b38c8d8
commit 0c1b19a321
4 changed files with 8 additions and 8 deletions

View File

@ -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;
}

View File

@ -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<WildcardQuery> wildcardQueryWrapper = new SpanMultiTermQueryWrapper<>(wildcardQuery);
SpanQuery wrappedQuery = new MyWrapperSpanQuery(wildcardQueryWrapper);

View File

@ -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<WildcardQuery> fiv = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "fiv*")));
SpanMultiTermQueryWrapper<WildcardQuery> hund = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "hund*")));
SpanMultiTermQueryWrapper<WildcardQuery> twent = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "twent*")));
SpanMultiTermQueryWrapper<WildcardQuery> nin = new SpanMultiTermQueryWrapper<>(new WildcardQuery(new Term("field", "nin*")));
SpanNearQuery sq = new SpanNearQuery(new SpanQuery[] {fiv, hund, twent, nin}, 0, true);

View File

@ -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<WildcardQuery> 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!"