Skip to content

Apache Lucene open-source search software

SOLR-13952: Separate out Gradle-specific code from other (mostly test) changes and commit separately

Erick Erickson4b34d726ab01
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/FixBrokenOffsetsFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/FixBrokenOffsetsFilterFactory.java
index 04503e42439..3ef9ebd676e 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/FixBrokenOffsetsFilterFactory.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/FixBrokenOffsetsFilterFactory.java
@@ -37,6 +37,7 @@ public class FixBrokenOffsetsFilterFactory extends TokenFilterFactory {
super(args);
}
+ @SuppressWarnings("deprecation")
@Override
public TokenStream create(TokenStream input) {
return new FixBrokenOffsetsFilter(input);
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilterFactory.java
index 3cd13e4601d..71ad6f90b1a 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilterFactory.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/WordDelimiterFilterFactory.java
@@ -33,8 +33,6 @@ import org.apache.lucene.analysis.util.ResourceLoaderAware;
import org.apache.lucene.analysis.util.TokenFilterFactory;
import org.apache.lucene.search.PhraseQuery;
-import static org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.*;
-
/**
* Factory for {@link WordDelimiterFilter}.
* <pre class="prettyprint">
@@ -76,31 +74,31 @@ public class WordDelimiterFilterFactory extends TokenFilterFactory implements Re
super(args);
int flags = 0;
if (getInt(args, "generateWordParts", 1) != 0) {
- flags |= GENERATE_WORD_PARTS;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.GENERATE_WORD_PARTS;
}
if (getInt(args, "generateNumberParts", 1) != 0) {
- flags |= GENERATE_NUMBER_PARTS;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.GENERATE_NUMBER_PARTS;
}
if (getInt(args, "catenateWords", 0) != 0) {
- flags |= CATENATE_WORDS;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.CATENATE_WORDS;
}
if (getInt(args, "catenateNumbers", 0) != 0) {
- flags |= CATENATE_NUMBERS;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.CATENATE_NUMBERS;
}
if (getInt(args, "catenateAll", 0) != 0) {
- flags |= CATENATE_ALL;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.CATENATE_ALL;
}
if (getInt(args, "splitOnCaseChange", 1) != 0) {
- flags |= SPLIT_ON_CASE_CHANGE;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.SPLIT_ON_CASE_CHANGE;
}
if (getInt(args, "splitOnNumerics", 1) != 0) {
- flags |= SPLIT_ON_NUMERICS;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.SPLIT_ON_NUMERICS;
}
if (getInt(args, "preserveOriginal", 0) != 0) {
- flags |= PRESERVE_ORIGINAL;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.PRESERVE_ORIGINAL;
}
if (getInt(args, "stemEnglishPossessive", 1) != 0) {
- flags |= STEM_ENGLISH_POSSESSIVE;
+ flags |= org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.STEM_ENGLISH_POSSESSIVE;
}
wordFiles = get(args, PROTECTED_TOKENS);
types = get(args, TYPES);
@@ -162,17 +160,17 @@ public class WordDelimiterFilterFactory extends TokenFilterFactory implements Re
private Byte parseType(String s) {
if (s.equals("LOWER"))
- return LOWER;
+ return org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.LOWER;
else if (s.equals("UPPER"))
- return UPPER;
+ return org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.UPPER;
else if (s.equals("ALPHA"))
- return ALPHA;
+ return org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.ALPHA;
else if (s.equals("DIGIT"))
- return DIGIT;
+ return org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.DIGIT;
else if (s.equals("ALPHANUM"))
- return ALPHANUM;
+ return org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.ALPHANUM;
else if (s.equals("SUBWORD_DELIM"))
- return SUBWORD_DELIM;
+ return org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.SUBWORD_DELIM;
else
return null;
}
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
index 97db1deb3e4..c7df3239e0f 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/SynonymMap.java
@@ -210,6 +210,7 @@ public class SynonymMap {
/**
* Builds an {@link SynonymMap} and returns it.
*/
+ @SuppressWarnings("deprecation")
public SynonymMap build() throws IOException {
ByteSequenceOutputs outputs = ByteSequenceOutputs.getSingleton();
// TODO: are we using the best sharing options?
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ckb/TestSoraniStemFilterFactory.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ckb/TestSoraniStemFilterFactory.java
index 1c4b1623c58..c54a2b6cd75 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ckb/TestSoraniStemFilterFactory.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ckb/TestSoraniStemFilterFactory.java
@@ -30,6 +30,7 @@ import org.apache.lucene.analysis.util.BaseTokenStreamFactoryTestCase;
*/
public class TestSoraniStemFilterFactory extends BaseTokenStreamFactoryTestCase {
+ @SuppressWarnings("resource")
public void testStemming() throws Exception {
Reader reader = new StringReader("پیاوەکان");
TokenStream stream = new MockTokenizer(MockTokenizer.WHITESPACE, false);
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/da_UTF8.xml b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/da_UTF8.xml
index 2c8d203be68..06dfa8f5237 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/da_UTF8.xml
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/da_UTF8.xml
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hyphenation-info SYSTEM "hyphenation.dtd">
<!--
- Copyright 1999-2004 The Apache Software Foundation
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
-->
<!--
This file contains the hyphenation patterns for danish.
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation-LUCENE-8124.xml b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation-LUCENE-8124.xml
index 8710eab0872..1c0572bfddb 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation-LUCENE-8124.xml
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation-LUCENE-8124.xml
@@ -1,17 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hyphenation-info SYSTEM "hyphenation.dtd">
<!--
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
-->
<!--
This file contains the hyphenation patterns for danish.
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation.dtd b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation.dtd
index fb3db16cf67..6da51d68958 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation.dtd
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/compound/hyphenation.dtd
@@ -1,18 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright 1999-2004 The Apache Software Foundation
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
-->
<!-- Id: hyphenation.dtd,v 1.3 2004/02/27 18:34:59 jeremias Exp $ -->
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestBugInSomething.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestBugInSomething.java
index 6cdff4bd5c9..50d2bd81791 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestBugInSomething.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestBugInSomething.java
@@ -257,6 +257,7 @@ public class TestBugInSomething extends BaseTokenStreamTestCase {
-119, 0, 92, 94, -36, 53, -9, -102, -18, 90, 94, -26, 31, 71, -20
};
Analyzer a = new Analyzer() {
+ @SuppressWarnings("deprecation")
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new WikipediaTokenizer();
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
index 10358c752c8..a0f5fb8ad82 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java
@@ -82,7 +82,6 @@ import org.apache.lucene.analysis.miscellaneous.LimitTokenOffsetFilter;
import org.apache.lucene.analysis.miscellaneous.LimitTokenPositionFilter;
import org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter;
import org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter.StemmerOverrideMap;
-import org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter;
import org.apache.lucene.analysis.miscellaneous.WordDelimiterGraphFilter;
import org.apache.lucene.analysis.path.PathHierarchyTokenizer;
import org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer;
@@ -112,6 +111,7 @@ import org.tartarus.snowball.SnowballProgram;
import org.xml.sax.InputSource;
/** tests random analysis chains */
+@SuppressWarnings("deprecation")
public class TestRandomChains extends BaseTokenStreamTestCase {
static List<Constructor<? extends Tokenizer>> tokenizers;
@@ -193,7 +193,7 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
// TODO: it seems to mess up offsets!?
WikipediaTokenizer.class,
// TODO: needs to be a tokenizer, doesnt handle graph inputs properly (a shingle or similar following will then cause pain)
- WordDelimiterFilter.class,
+ org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.class,
// Cannot correct offsets when a char filter had changed them:
WordDelimiterGraphFilter.class,
// requires a special encoded token value, so it may fail with random data:
@@ -321,6 +321,7 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
}
}
+ @SuppressWarnings("serial")
private static final Map<Class<?>,Function<Random,Object>> argProducers = new IdentityHashMap<Class<?>,Function<Random,Object>>() {{
put(int.class, random -> {
// TODO: could cause huge ram usage to use full int range for some filters
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java
index 1afb90eb764..9313a998474 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/custom/TestCustomAnalyzer.java
@@ -47,6 +47,7 @@ import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.SetOnce.AlreadySetException;
import org.apache.lucene.util.Version;
+@SuppressWarnings("deprecation")
public class TestCustomAnalyzer extends BaseTokenStreamTestCase {
// Test some examples (TODO: we only check behavior, we may need something like TestRandomChains...)
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestConcatenateGraphFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestConcatenateGraphFilter.java
index 61219352d95..8c429a55cf7 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestConcatenateGraphFilter.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestConcatenateGraphFilter.java
@@ -25,7 +25,6 @@ import org.apache.lucene.analysis.StopFilter;
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
-import org.apache.lucene.analysis.synonym.SynonymFilter;
import org.apache.lucene.analysis.synonym.SynonymGraphFilter;
import org.apache.lucene.analysis.synonym.SynonymMap;
import org.apache.lucene.util.CharsRef;
@@ -69,17 +68,19 @@ public class TestConcatenateGraphFilter extends BaseTokenStreamTestCase {
assertTokenStreamContents(stream, new String[]{builder.toCharsRef().toString()}, null, null, new int[]{1});
}
+ @SuppressWarnings("deprecation")
@Test
public void testWithSynonym() throws Exception {
SynonymMap.Builder builder = new SynonymMap.Builder(true);
builder.add(new CharsRef("mykeyword"), new CharsRef("mysynonym"), true);
Tokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, true);
tokenizer.setReader(new StringReader("mykeyword"));
- SynonymFilter filter = new SynonymFilter(tokenizer, builder.build(), true);
+ org.apache.lucene.analysis.synonym.SynonymFilter filter = new org.apache.lucene.analysis.synonym.SynonymFilter(tokenizer, builder.build(), true);
ConcatenateGraphFilter stream = new ConcatenateGraphFilter(filter);
assertTokenStreamContents(stream, new String[] {"mykeyword", "mysynonym"}, null, null, new int[] { 1, 0 });
}
+ @SuppressWarnings("deprecation")
@Test
public void testWithSynonyms() throws Exception {
SynonymMap.Builder builder = new SynonymMap.Builder(true);
@@ -87,7 +88,7 @@ public class TestConcatenateGraphFilter extends BaseTokenStreamTestCase {
Tokenizer tokenStream = new MockTokenizer(MockTokenizer.WHITESPACE, true);
String input = "mykeyword another keyword";
tokenStream.setReader(new StringReader(input));
- SynonymFilter filter = new SynonymFilter(tokenStream, builder.build(), true);
+ org.apache.lucene.analysis.synonym.SynonymFilter filter = new org.apache.lucene.analysis.synonym.SynonymFilter(tokenStream, builder.build(), true);
ConcatenateGraphFilter stream = new ConcatenateGraphFilter(filter, SEP_LABEL, false, 100);
String[] expectedOutputs = new String[2];
CharsRefBuilder expectedOutput = new CharsRefBuilder();
@@ -132,6 +133,7 @@ public class TestConcatenateGraphFilter extends BaseTokenStreamTestCase {
}
}
+ @SuppressWarnings("deprecation")
@Test
public void testValidNumberOfExpansions() throws IOException {
SynonymMap.Builder builder = new SynonymMap.Builder(true);
@@ -145,7 +147,7 @@ public class TestConcatenateGraphFilter extends BaseTokenStreamTestCase {
}
MockTokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, true);
tokenizer.setReader(new StringReader(valueBuilder.toString()));
- SynonymFilter filter = new SynonymFilter(tokenizer, builder.build(), true);
+ org.apache.lucene.analysis.synonym.SynonymFilter filter = new org.apache.lucene.analysis.synonym.SynonymFilter(tokenizer, builder.build(), true);
int count;
try (ConcatenateGraphFilter stream = new ConcatenateGraphFilter(filter)) {
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestFixBrokenOffsetsFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestFixBrokenOffsetsFilter.java
index ada5014334f..6d670604643 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestFixBrokenOffsetsFilter.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestFixBrokenOffsetsFilter.java
@@ -31,6 +31,7 @@ import org.apache.lucene.store.Directory;
public class TestFixBrokenOffsetsFilter extends BaseTokenStreamTestCase {
+ @SuppressWarnings("deprecation")
public void testBogusTermVectors() throws IOException {
Directory dir = newDirectory();
IndexWriter iw = new IndexWriter(dir, newIndexWriterConfig(null));
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenPositionFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenPositionFilter.java
index 46d3025b14d..88aacd51d50 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenPositionFilter.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenPositionFilter.java
@@ -20,7 +20,6 @@ import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.BaseTokenStreamTestCase;
import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.synonym.SynonymFilter;
import org.apache.lucene.analysis.synonym.SynonymMap;
import org.apache.lucene.util.CharsRef;
import org.apache.lucene.util.CharsRefBuilder;
@@ -60,6 +59,7 @@ public class TestLimitTokenPositionFilter extends BaseTokenStreamTestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testMaxPosition3WithSynomyms() throws IOException {
for (final boolean consumeAll : new boolean[]{true, false}) {
MockTokenizer tokenizer = whitespaceMockTokenizer("one two three four five");
@@ -76,7 +76,7 @@ public class TestLimitTokenPositionFilter extends BaseTokenStreamTestCase {
SynonymMap.Builder.join(new String[]{"dopple", "ganger"}, multiWordCharsRef);
builder.add(new CharsRef("two"), multiWordCharsRef.get(), true);
SynonymMap synonymMap = builder.build();
- TokenStream stream = new SynonymFilter(tokenizer, synonymMap, true);
+ TokenStream stream = new org.apache.lucene.analysis.synonym.SynonymFilter(tokenizer, synonymMap, true);
stream = new LimitTokenPositionFilter(stream, 3, consumeAll);
// "only", the 4th word of multi-word synonym "and indubitably single only" is not emitted, since its position is greater than 3.
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
index d1e2e2ee477..84b7d1047ed 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
@@ -156,6 +156,7 @@ public class TestRemoveDuplicatesTokenFilter extends BaseTokenStreamTestCase {
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new MockTokenizer(MockTokenizer.SIMPLE, true);
+ @SuppressWarnings("deprecation")
TokenStream stream = new SynonymFilter(tokenizer, map, ignoreCase);
return new TokenStreamComponents(tokenizer, new RemoveDuplicatesTokenFilter(stream));
}
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java
index 790e7589e97..2267f0cb995 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestWordDelimiterFilter.java
@@ -54,6 +54,7 @@ import static org.apache.lucene.analysis.miscellaneous.WordDelimiterIterator.DEF
* TODO: should explicitly test things like protWords and not rely on
* the factory tests in Solr.
*/
+@SuppressWarnings("deprecation")
public class TestWordDelimiterFilter extends BaseTokenStreamTestCase {
/*
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenizerTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenizerTest.java
index 7fbea5f8d60..e96ced8700e 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenizerTest.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/EdgeNGramTokenizerTest.java
@@ -119,6 +119,7 @@ public class EdgeNGramTokenizerTest extends BaseTokenStreamTestCase {
false);
}
+ @SuppressWarnings("deprecation")
private static void testNGrams(int minGram, int maxGram, int length, final String nonTokenChars) throws IOException {
final String s = RandomStrings.randomAsciiOfLength(random(), length);
testNGrams(minGram, maxGram, s, nonTokenChars);
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java
index cb54fa2fc44..adcc9ee3d34 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/ngram/NGramTokenizerTest.java
@@ -119,6 +119,7 @@ public class NGramTokenizerTest extends BaseTokenStreamTestCase {
}
}
+ @SuppressWarnings("deprecation")
private static void testNGrams(int minGram, int maxGram, int length, final String nonTokenChars) throws IOException {
final String s = RandomStrings.randomAsciiOfLength(random(), length);
testNGrams(minGram, maxGram, s, nonTokenChars);
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSolrSynonymParser.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSolrSynonymParser.java
index 748b177a25f..c81b89417ea 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSolrSynonymParser.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSolrSynonymParser.java
@@ -47,6 +47,7 @@ public class TestSolrSynonymParser extends BaseSynonymParserTestCase {
analyzer.close();
analyzer = new Analyzer() {
+ @SuppressWarnings("deprecation")
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, true);
@@ -138,6 +139,7 @@ public class TestSolrSynonymParser extends BaseSynonymParserTestCase {
final SynonymMap map = parser.build();
analyzer.close();
analyzer = new Analyzer() {
+ @SuppressWarnings("deprecation")
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new MockTokenizer(MockTokenizer.KEYWORD, false);
@@ -171,6 +173,7 @@ public class TestSolrSynonymParser extends BaseSynonymParserTestCase {
analyzer.close();
analyzer = new Analyzer() {
+ @SuppressWarnings("deprecation")
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, true);
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilterFactory.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilterFactory.java
index e3bb00ab607..ae3b475f03f 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilterFactory.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilterFactory.java
@@ -30,6 +30,7 @@ import org.apache.lucene.util.Version;
public class TestSynonymFilterFactory extends BaseTokenStreamFactoryTestCase {
/** checks for synonyms of "GB" in synonyms.txt */
+ @SuppressWarnings("deprecation")
private void checkSolrSynonyms(TokenFilterFactory factory) throws Exception {
Reader reader = new StringReader("GB");
TokenStream stream = whitespaceMockTokenizer(reader);
@@ -41,6 +42,7 @@ public class TestSynonymFilterFactory extends BaseTokenStreamFactoryTestCase {
}
/** checks for synonyms of "second" in synonyms-wordnet.txt */
+ @SuppressWarnings("deprecation")
private void checkWordnetSynonyms(TokenFilterFactory factory) throws Exception {
Reader reader = new StringReader("second");
TokenStream stream = whitespaceMockTokenizer(reader);
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymMapFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymMapFilter.java
index 0fbbd2e58cc..0b4a08c0352 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymMapFilter.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymMapFilter.java
@@ -39,6 +39,7 @@ import org.apache.lucene.analysis.tokenattributes.*;
import org.apache.lucene.util.CharsRefBuilder;
import org.apache.lucene.util.TestUtil;
+@SuppressWarnings("deprecation")
public class TestSynonymMapFilter extends BaseTokenStreamTestCase {
private SynonymMap.Builder b;
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestWordnetSynonymParser.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestWordnetSynonymParser.java
index 2449f8fd242..62abd67d431 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestWordnetSynonymParser.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestWordnetSynonymParser.java
@@ -45,6 +45,7 @@ public class TestWordnetSynonymParser extends BaseTokenStreamTestCase {
analyzer.close();
analyzer = new Analyzer() {
+ @SuppressWarnings("deprecation")
@Override
protected TokenStreamComponents createComponents(String fieldName) {
Tokenizer tokenizer = new MockTokenizer(MockTokenizer.WHITESPACE, false);
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestAnalysisSPILoader.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestAnalysisSPILoader.java
index 2398c1e822c..b2cdd353f94 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestAnalysisSPILoader.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestAnalysisSPILoader.java
@@ -29,6 +29,7 @@ import org.apache.lucene.util.Version;
public class TestAnalysisSPILoader extends LuceneTestCase {
+ @SuppressWarnings("serial")
private Map<String,String> versionArgOnly() {
return new HashMap<String, String>() {{
put("luceneMatchVersion", Version.LATEST.toString());
diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestFilesystemResourceLoader.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestFilesystemResourceLoader.java
index eaa6174ae7c..85b8607bc97 100644
--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestFilesystemResourceLoader.java
+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/util/TestFilesystemResourceLoader.java
@@ -54,6 +54,7 @@ public class TestFilesystemResourceLoader extends LuceneTestCase {
rl.newInstance("org.apache.lucene.analysis.util.RollingCharBuffer", Object.class).getClass().getName());
}
+ @SuppressWarnings("deprecation")
public void testBaseDir() throws Exception {
final Path base = createTempDir("fsResourceLoaderBase");
Writer os = Files.newBufferedWriter(base.resolve("template.txt"), StandardCharsets.UTF_8);
diff --git a/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUTransformFilter.java b/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUTransformFilter.java
index bfe7c12a2a9..35f141003ca 100644
--- a/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUTransformFilter.java
+++ b/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUTransformFilter.java
@@ -73,6 +73,7 @@ public final class ICUTransformFilter extends TokenFilter {
* @param input {@link TokenStream} to filter.
* @param transform Transliterator to transform the text.
*/
+ @SuppressWarnings("deprecation")
public ICUTransformFilter(TokenStream input, Transliterator transform) {
super(input);
this.transform = transform;
diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java
index b466e964cc9..274bd428fff 100644
--- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java
+++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/SpatialDocMaker.java
@@ -169,6 +169,7 @@ public class SpatialDocMaker extends DocMaker {
final boolean bbox = config.get(configKeyPrefix + "bbox", false);
return new ShapeConverter() {
+ @SuppressWarnings("deprecation")
@Override
public Shape convert(Shape shape) {
if (shape instanceof Point && (radiusDegrees != 0.0 || plusMinus != 0.0)) {
@@ -217,6 +218,7 @@ public class SpatialDocMaker extends DocMaker {
return doc;
}
+ @SuppressWarnings("deprecation")
public static Shape makeShapeFromString(SpatialStrategy strategy, String name, String shapeStr) {
if (shapeStr != null && shapeStr.length() > 0) {
try {
diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java
index 051a8fc0bd1..518ede494b9 100644
--- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java
+++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/AnalyzerFactoryTask.java
@@ -288,7 +288,7 @@ public class AnalyzerFactoryTask extends PerfTask {
* @param stok stream tokenizer from which to draw analysis factory params
* @param clazz analysis factory class to instantiate
*/
- @SuppressWarnings("fallthrough")
+ @SuppressWarnings({"fallthrough", "deprecation"})
private void createAnalysisPipelineComponent
(StreamTokenizer stok, Class<? extends AbstractAnalysisFactory> clazz) {
Map<String,String> argMap = new HashMap<>();
diff --git a/lucene/core/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java b/lucene/core/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java
index bc9806dcddd..c6ea6f263f4 100644
--- a/lucene/core/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java
+++ b/lucene/core/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java
@@ -33,6 +33,7 @@ import org.apache.lucene.util.SuppressForbidden;
@SuppressForbidden(reason = "Uses a Long instance as a marker")
public final class PositiveIntOutputs extends Outputs<Long> {
+ @SuppressWarnings("deprecation")
private final static Long NO_OUTPUT = new Long(0);
private final static PositiveIntOutputs singleton = new PositiveIntOutputs();
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/TestCharArraySet.java b/lucene/core/src/test/org/apache/lucene/analysis/TestCharArraySet.java
index e51f2072087..a28de9266d8 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/TestCharArraySet.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/TestCharArraySet.java
@@ -57,6 +57,7 @@ public class TestCharArraySet extends LuceneTestCase {
assertTrue(set.contains(new String(findme,1,4)));
}
+ @SuppressWarnings("deprecation")
@SuppressForbidden(reason = "Explicitly checking new Integers")
public void testObjectContains() {
CharArraySet set = new CharArraySet(10, true);
@@ -211,7 +212,6 @@ public class TestCharArraySet extends LuceneTestCase {
}
}
- @SuppressWarnings("deprecated")
public void testCopyCharArraySetBWCompat() {
CharArraySet setIngoreCase = new CharArraySet(10, true);
CharArraySet setCaseSensitive = new CharArraySet(10, false);
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestDocument.java b/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
index 50c1ed0a919..1d026852ca9 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
@@ -212,6 +212,7 @@ public class TestDocument extends LuceneTestCase {
dir.close();
}
+ @SuppressWarnings("deprecation")
public void testGetValues() {
Document doc = makeDocumentWithFields();
assertEquals(new String[] {"test1", "test2"},
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestFieldUpdatesBuffer.java b/lucene/core/src/test/org/apache/lucene/index/TestFieldUpdatesBuffer.java
index 0ca3af8de66..cb387fd4288 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestFieldUpdatesBuffer.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestFieldUpdatesBuffer.java
@@ -149,6 +149,7 @@ public class TestFieldUpdatesBuffer extends LuceneTestCase {
assertFalse(buffer.isNumeric());
}
+ @SuppressWarnings("unchecked")
public <T extends DocValuesUpdate> T getRandomUpdate(boolean binary) {
String termField = RandomPicks.randomFrom(random(), Arrays.asList("id", "_id", "some_other_field"));
String docId = "" + random().nextInt(10);
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java b/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
index 69e1e1039b2..94537218a98 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java
@@ -33,8 +33,6 @@ import org.junit.Test;
import java.io.IOException;
-import junit.framework.Assert;
-
public class TestMultiTermConstantScore extends BaseTestRangeFilter {
/** threshold for comparing floats */
@@ -43,8 +41,9 @@ public class TestMultiTermConstantScore extends BaseTestRangeFilter {
static Directory small;
static IndexReader reader;
+ @SuppressWarnings("deprecation")
static public void assertEquals(String m, int e, int a) {
- Assert.assertEquals(m, e, a);
+ junit.framework.Assert.assertEquals(m, e, a);
}
@BeforeClass
diff --git a/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java b/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java
index 2ce677c84e6..90a25723331 100644
--- a/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java
+++ b/lucene/core/src/test/org/apache/lucene/search/TestSearchAfter.java
@@ -281,6 +281,7 @@ public class TestSearchAfter extends LuceneTestCase {
assertEquals(all.scoreDocs.length, pageStart);
}
+ @SuppressWarnings("deprecation")
void assertPage(int pageStart, TopDocs all, TopDocs paged) throws IOException {
assertEquals(all.totalHits.value, paged.totalHits.value);
for (int i = 0; i < paged.scoreDocs.length; i++) {
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestCharsRef.java b/lucene/core/src/test/org/apache/lucene/util/TestCharsRef.java
index 079b3b774b5..8ed9352e8e9 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestCharsRef.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestCharsRef.java
@@ -20,6 +20,7 @@ import java.util.Arrays;
public class TestCharsRef extends LuceneTestCase {
+ @SuppressWarnings("deprecation")
public void testUTF16InUTF8Order() {
final int numStrings = atLeast(1000);
BytesRef utf8[] = new BytesRef[numStrings];
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestVersion.java b/lucene/core/src/test/org/apache/lucene/util/TestVersion.java
index e19c6150812..02d566ea10a 100644
--- a/lucene/core/src/test/org/apache/lucene/util/TestVersion.java
+++ b/lucene/core/src/test/org/apache/lucene/util/TestVersion.java
@@ -23,6 +23,7 @@ import java.text.ParseException;
import java.util.Locale;
import java.util.Random;
+@SuppressWarnings("deprecation")
public class TestVersion extends LuceneTestCase {
public void testOnOrAfter() throws Exception {
diff --git a/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java b/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
deleted file mode 100644
index 4dfe86b3f50..00000000000
--- a/lucene/core/src/test/org/apache/lucene/util/TestVirtualMethod.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.lucene.util;
-
-public class TestVirtualMethod extends LuceneTestCase {
-
- private static final VirtualMethod<TestVirtualMethod> publicTestMethod =
- new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
- private static final VirtualMethod<TestVirtualMethod> protectedTestMethod =
- new VirtualMethod<>(TestVirtualMethod.class, "protectedTest", int.class);
-
- public void publicTest(String test) {}
- protected void protectedTest(int test) {}
-
- static class TestClass1 extends TestVirtualMethod {
- @Override
- public void publicTest(String test) {}
- @Override
- protected void protectedTest(int test) {}
- }
-
- static class TestClass2 extends TestClass1 {
- @Override // make it public here
- public void protectedTest(int test) {}
- }
-
- static class TestClass3 extends TestClass2 {
- @Override
- public void publicTest(String test) {}
- }
-
- static class TestClass4 extends TestVirtualMethod {
- }
-
- static class TestClass5 extends TestClass4 {
- }
-
- public void testGeneral() {
- assertEquals(0, publicTestMethod.getImplementationDistance(this.getClass()));
- assertEquals(1, publicTestMethod.getImplementationDistance(TestClass1.class));
- assertEquals(1, publicTestMethod.getImplementationDistance(TestClass2.class));
- assertEquals(3, publicTestMethod.getImplementationDistance(TestClass3.class));
- assertFalse(publicTestMethod.isOverriddenAsOf(TestClass4.class));
- assertFalse(publicTestMethod.isOverriddenAsOf(TestClass5.class));
-
- assertEquals(0, protectedTestMethod.getImplementationDistance(this.getClass()));
- assertEquals(1, protectedTestMethod.getImplementationDistance(TestClass1.class));
- assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass2.class));
- assertEquals(2, protectedTestMethod.getImplementationDistance(TestClass3.class));
- assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass4.class));
- assertFalse(protectedTestMethod.isOverriddenAsOf(TestClass5.class));
-
- assertTrue(VirtualMethod.compareImplementationDistance(TestClass3.class, publicTestMethod, protectedTestMethod) > 0);
- assertEquals(0, VirtualMethod.compareImplementationDistance(TestClass5.class, publicTestMethod, protectedTestMethod));
- }
-
- @SuppressWarnings({"rawtypes","unchecked"})
- public void testExceptions() {
- // LuceneTestCase is not a subclass and can never override publicTest(String)
- expectThrows(IllegalArgumentException.class, () -> {
- // cast to Class to remove generics:
- publicTestMethod.getImplementationDistance((Class) LuceneTestCase.class);
- });
-
- // Method bogus() does not exist, so IAE should be thrown
- expectThrows(IllegalArgumentException.class, () -> {
- new VirtualMethod<>(TestVirtualMethod.class, "bogus");
- });
-
- // Method publicTest(String) is not declared in TestClass2, so IAE should be thrown
- expectThrows(IllegalArgumentException.class, () -> {
- new VirtualMethod<>(TestClass2.class, "publicTest", String.class);
- });
-
- // try to create a second instance of the same baseClass / method combination
- expectThrows(UnsupportedOperationException.class, () -> {
- new VirtualMethod<>(TestVirtualMethod.class, "publicTest", String.class);
- });
- }
-
-}
diff --git a/lucene/core/src/test/org/apache/lucene/util/fst/Test2BFST.java b/lucene/core/src/test/org/apache/lucene/util/fst/Test2BFST.java
index cc093b3cdba..7948ef1c57b 100644
--- a/lucene/core/src/test/org/apache/lucene/util/fst/Test2BFST.java
+++ b/lucene/core/src/test/org/apache/lucene/util/fst/Test2BFST.java
@@ -39,6 +39,7 @@ public class Test2BFST extends LuceneTestCase {
private static long LIMIT = 3L*1024*1024*1024;
+ @SuppressWarnings("deprecation")
public void test() throws Exception {
assumeWorkingMMapOnWindows();
diff --git a/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java b/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
index 316cbdf1e42..319079d1a65 100644
--- a/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
+++ b/lucene/core/src/test/org/apache/lucene/util/fst/TestFSTs.java
@@ -567,7 +567,7 @@ public class TestFSTs extends LuceneTestCase {
} else {
// Get by output
final Long output = (Long) getOutput(intsRef.get(), ord);
- @SuppressWarnings("unchecked") final IntsRef actual = Util.getByOutput((FST<Long>) fst, output.longValue());
+ @SuppressWarnings({"unchecked", "deprecation"}) final IntsRef actual = Util.getByOutput((FST<Long>) fst, output.longValue());
if (actual == null) {
throw new RuntimeException("unexpected null input from output=" + output);
}
@@ -787,6 +787,7 @@ public class TestFSTs extends LuceneTestCase {
}
*/
+ @SuppressWarnings("deprecation")
public void testSimple() throws Exception {
// Get outputs -- passing true means FST will share
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java b/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java
index 15df7e3d957..e9a38e533ce 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/DrillSideways.java
@@ -404,6 +404,7 @@ public class DrillSideways {
}
/** Runs a search, using a {@link CollectorManager} to gather and merge search results */
+ @SuppressWarnings("unchecked")
public <R> ConcurrentDrillSidewaysResult<R> search(final DrillDownQuery query,
final CollectorManager<?, R> hitCollectorManager) throws IOException {
diff --git a/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java b/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
index 87a1d97efe7..dc19f6d7c6b 100644
--- a/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
+++ b/lucene/grouping/src/test/org/apache/lucene/search/grouping/TestGrouping.java
@@ -287,9 +287,11 @@ public class TestGrouping extends LuceneTestCase {
private Collection<SearchGroup<BytesRef>> getSearchGroups(FirstPassGroupingCollector<?> c, int groupOffset) throws IOException {
if (TermGroupSelector.class.isAssignableFrom(c.getGroupSelector().getClass())) {
+ @SuppressWarnings("unchecked")
FirstPassGroupingCollector<BytesRef> collector = (FirstPassGroupingCollector<BytesRef>) c;
return collector.getTopGroups(groupOffset);
} else if (ValueSourceGroupSelector.class.isAssignableFrom(c.getGroupSelector().getClass())) {
+ @SuppressWarnings("unchecked")
FirstPassGroupingCollector<MutableValue> collector = (FirstPassGroupingCollector<MutableValue>) c;
Collection<SearchGroup<MutableValue>> mutableValueGroups = collector.getTopGroups(groupOffset);
if (mutableValueGroups == null) {
@@ -404,7 +406,6 @@ public class TestGrouping extends LuceneTestCase {
};
}
- @SuppressWarnings({"unchecked","rawtypes"})
private Comparable<?>[] fillFields(GroupDoc d, Sort sort) {
final SortField[] sortFields = sort.getSort();
final Comparable<?>[] fields = new Comparable[sortFields.length];
@@ -490,7 +491,7 @@ public class TestGrouping extends LuceneTestCase {
final int limit = Math.min(groupOffset + topNGroups, groups.size());
final Comparator<GroupDoc> docSortComp = getComparator(docSort);
- @SuppressWarnings({"unchecked","rawtypes"})
+ @SuppressWarnings({"unchecked"})
final GroupDocs<BytesRef>[] result = new GroupDocs[limit-groupOffset];
int totalGroupedHitCount = 0;
for(int idx=groupOffset;idx < limit;idx++) {
@@ -1042,7 +1043,7 @@ public class TestGrouping extends LuceneTestCase {
}
// Get block grouping result:
sBlocks.search(query, c4);
- @SuppressWarnings({"unchecked","rawtypes"})
+ @SuppressWarnings({"unchecked"})
final TopGroups<BytesRef> tempTopGroupsBlocks = (TopGroups<BytesRef>) c3.getTopGroups(docSort, groupOffset, docOffset, docOffset+docsPerGroup);
final TopGroups<BytesRef> groupsResultBlocks;
if (doAllGroups && tempTopGroupsBlocks != null) {
@@ -1198,7 +1199,7 @@ public class TestGrouping extends LuceneTestCase {
if (mergedTopGroups != null) {
// Now 2nd pass:
- @SuppressWarnings({"unchecked","rawtypes"})
+ @SuppressWarnings({"unchecked"})
final TopGroups<BytesRef>[] shardTopGroups = new TopGroups[subSearchers.length];
for(int shardIDX=0;shardIDX<subSearchers.length;shardIDX++) {
final TopGroupsCollector<?> secondPassCollector = createSecondPassCollector(firstPassGroupingCollectors.get(shardIDX),
diff --git a/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java b/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
index c555297fa95..dfdff00c30a 100644
--- a/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
+++ b/lucene/highlighter/src/test/org/apache/lucene/search/highlight/HighlighterTest.java
@@ -2005,6 +2005,7 @@ public class HighlighterTest extends BaseTokenStreamTestCase implements Formatte
TopDocs hits = searcher.search(query, 10);
assertEquals(1, hits.scoreDocs.length);
+ @SuppressWarnings("deprecation")
TokenStream stream = TokenSources.getAnyTokenStream(searcher.getIndexReader(), 0, FIELD_NAME, analyzer);
if (random().nextBoolean()) {
stream = new CachingTokenFilter(stream);//conceals detection of TokenStreamFromTermVector
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinSortField.java b/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinSortField.java
index fef167e62f9..dce141601a8 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinSortField.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinSortField.java
@@ -107,6 +107,7 @@ public class ToParentBlockJoinSortField extends SortField {
private FieldComparator<?> getStringComparator(int numHits) {
return new FieldComparator.TermOrdValComparator(numHits, getField(), missingValue == STRING_LAST) {
+ @SuppressWarnings("deprecation")
@Override
protected SortedDocValues getSortedDocValues(LeafReaderContext context, String field) throws IOException {
SortedSetDocValues sortedSet = DocValues.getSortedSet(context.reader(), field);
@@ -126,6 +127,7 @@ public class ToParentBlockJoinSortField extends SortField {
private FieldComparator<?> getIntComparator(int numHits) {
return new FieldComparator.IntComparator(numHits, getField(), (Integer) missingValue) {
+ @SuppressWarnings("deprecation")
@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
@@ -144,6 +146,7 @@ public class ToParentBlockJoinSortField extends SortField {
private FieldComparator<?> getLongComparator(int numHits) {
return new FieldComparator.LongComparator(numHits, getField(), (Long) missingValue) {
+ @SuppressWarnings("deprecation")
@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
@@ -162,6 +165,7 @@ public class ToParentBlockJoinSortField extends SortField {
private FieldComparator<?> getFloatComparator(int numHits) {
return new FieldComparator.FloatComparator(numHits, getField(), (Float) missingValue) {
+ @SuppressWarnings("deprecation")
@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
@@ -186,6 +190,7 @@ public class ToParentBlockJoinSortField extends SortField {
private FieldComparator<?> getDoubleComparator(int numHits) {
return new FieldComparator.DoubleComparator(numHits, getField(), (Double) missingValue) {
+ @SuppressWarnings("deprecation")
@Override
protected NumericDocValues getNumericDocValues(LeafReaderContext context, String field) throws IOException {
SortedNumericDocValues sortedNumeric = DocValues.getSortedNumeric(context.reader(), field);
diff --git a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSelector.java b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSelector.java
index 838826fcbb4..d88a87d78ed 100644
--- a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSelector.java
+++ b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoinSelector.java
@@ -108,6 +108,7 @@ public class TestBlockJoinSelector extends LuceneTestCase {
: ((NumericDocValues) sdv).advanceExact(target);
}
+ @SuppressWarnings("deprecation")
public void testSortedSelector() throws IOException {
final BitSet parents = new FixedBitSet(20);
parents.set(0);
@@ -217,6 +218,7 @@ public class TestBlockJoinSelector extends LuceneTestCase {
}
}
+ @SuppressWarnings("deprecation")
public void testNumericSelector() throws Exception {
final BitSet parents = new FixedBitSet(20);
parents.set(0);
diff --git a/lucene/licenses/jetty-NOTICE.txt b/lucene/licenses/jetty-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/lucene/licenses/jetty-NOTICE.txt
+++ b/lucene/licenses/jetty-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/lucene/licenses/junit-LICENSE-CPL.txt b/lucene/licenses/junit-LICENSE-CPL.txt
index 4efdc7b204b..e3f47c46371 100644
--- a/lucene/licenses/junit-LICENSE-CPL.txt
+++ b/lucene/licenses/junit-LICENSE-CPL.txt
@@ -10,8 +10,8 @@ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICEN
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
+i) changes to the Program, and
+ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
@@ -28,24 +28,24 @@ where such changes and/or additions to the Program originate from and are distri
2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
diff --git a/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstDirectory.java b/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstDirectory.java
index a9d83b0fa8c..626286232c9 100644
--- a/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstDirectory.java
+++ b/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstDirectory.java
@@ -335,6 +335,7 @@ public class TestMemoryIndexAgainstDirectory extends BaseTokenStreamTestCase {
reader.close();
}
+ @SuppressWarnings("unused")
private Allocator randomByteBlockAllocator() {
if (random().nextBoolean()) {
return new RecyclingByteBlockAllocator();
@@ -377,6 +378,7 @@ public class TestMemoryIndexAgainstDirectory extends BaseTokenStreamTestCase {
}
// LUCENE-3831
+ @SuppressWarnings("resource")
public void testNullPointerException() throws IOException {
RegexpQuery regex = new RegexpQuery(new Term("field", "worl."));
SpanQuery wrappedquery = new SpanMultiTermQueryWrapper<>(regex);
@@ -390,6 +392,7 @@ public class TestMemoryIndexAgainstDirectory extends BaseTokenStreamTestCase {
}
// LUCENE-3831
+ @SuppressWarnings("resource")
public void testPassesIfWrapped() throws IOException {
RegexpQuery regex = new RegexpQuery(new Term("field", "worl."));
SpanQuery wrappedquery = new SpanOrQuery(new SpanMultiTermQueryWrapper<>(regex));
diff --git a/lucene/misc/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.java b/lucene/misc/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.java
index 327de1ff5f4..42ae747c572 100644
--- a/lucene/misc/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.java
+++ b/lucene/misc/src/java/org/apache/lucene/util/fst/UpToTwoPositiveIntOutputs.java
@@ -83,6 +83,7 @@ public final class UpToTwoPositiveIntOutputs extends Outputs<Object> {
}
}
+ @SuppressWarnings("deprecation")
private final static Long NO_OUTPUT = new Long(0);
private final boolean doShare;
diff --git a/lucene/misc/src/test/org/apache/lucene/search/similarity/TestLegacyBM25Similarity.java b/lucene/misc/src/test/org/apache/lucene/search/similarity/TestLegacyBM25Similarity.java
index b3a0cd24ca1..f3ab5468052 100644
--- a/lucene/misc/src/test/org/apache/lucene/search/similarity/TestLegacyBM25Similarity.java
+++ b/lucene/misc/src/test/org/apache/lucene/search/similarity/TestLegacyBM25Similarity.java
@@ -23,6 +23,7 @@ import org.apache.lucene.search.similarities.BM25Similarity;
import org.apache.lucene.search.similarities.BaseSimilarityTestCase;
import org.apache.lucene.search.similarities.Similarity;
+@SuppressWarnings("deprecation")
public class TestLegacyBM25Similarity extends BaseSimilarityTestCase {
public void testIllegalK1() {
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
index 1ba35804002..7bbe82dbd6a 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/ValueSource.java
@@ -42,6 +42,7 @@ import org.apache.lucene.search.SortField;
*
*
*/
+@SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
public abstract class ValueSource {
/**
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java
index e03e3160495..c915293df28 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DocFreqValueSource.java
@@ -144,6 +144,7 @@ public class DocFreqValueSource extends ValueSource {
return name() + '(' + field + ',' + val + ')';
}
+ @SuppressWarnings("rawtypes")
@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
IndexSearcher searcher = (IndexSearcher)context.get("searcher");
@@ -151,6 +152,7 @@ public class DocFreqValueSource extends ValueSource {
return new ConstIntDocValues(docfreq, this);
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void createWeight(Map context, IndexSearcher searcher) throws IOException {
context.put("searcher",searcher);
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java
index ccd73269bed..2270978fbb9 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxDocValueSource.java
@@ -40,11 +40,13 @@ public class MaxDocValueSource extends ValueSource {
return name() + "()";
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void createWeight(Map context, IndexSearcher searcher) throws IOException {
context.put("searcher",searcher);
}
+ @SuppressWarnings("rawtypes")
@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
IndexSearcher searcher = (IndexSearcher)context.get("searcher");
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java
index ffbb0c5fe4e..30bdc31af50 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/NormValueSource.java
@@ -54,11 +54,13 @@ public class NormValueSource extends ValueSource {
return name() + '(' + field + ')';
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
@Override
public void createWeight(Map context, IndexSearcher searcher) throws IOException {
context.put("searcher",searcher);
}
+ @SuppressWarnings("rawtypes")
@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
IndexSearcher searcher = (IndexSearcher)context.get("searcher");
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
index e535b55018f..b142c37b715 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/QueryValueSource.java
@@ -36,6 +36,7 @@ import org.apache.lucene.util.mutable.MutableValueFloat;
/**
* <code>QueryValueSource</code> returns the relevance score of the query
*/
+@SuppressWarnings({"unchecked", "rawtypes"})
public class QueryValueSource extends ValueSource {
final Query q;
final float defVal;
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
index 38bd86a7a00..161d14297d7 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
@@ -59,6 +59,7 @@ public class ScaleFloatFunction extends ValueSource {
float maxVal;
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
private ScaleInfo createScaleInfo(Map context, LeafReaderContext readerContext) throws IOException {
final List<LeafReaderContext> leaves = ReaderUtil.getTopLevelContext(readerContext).leaves();
@@ -99,6 +100,7 @@ public class ScaleFloatFunction extends ValueSource {
return scaleInfo;
}
+ @SuppressWarnings("rawtypes")
@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
@@ -132,6 +134,7 @@ public class ScaleFloatFunction extends ValueSource {
};
}
+ @SuppressWarnings("rawtypes")
@Override
public void createWeight(Map context, IndexSearcher searcher) throws IOException {
source.createWeight(context, searcher);
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java
index 716d3045397..3f25d34ec08 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/SumTotalTermFreqValueSource.java
@@ -47,11 +47,13 @@ public class SumTotalTermFreqValueSource extends ValueSource {
return name() + '(' + indexedField + ')';
}
+ @SuppressWarnings("rawtypes")
@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
return (FunctionValues)context.get(this);
}
+ @SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void createWeight(Map context, IndexSearcher searcher) throws IOException {
long sumTotalTermFreq = 0;
diff --git a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java
index 5a69e42fcd2..5e571213df4 100644
--- a/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java
+++ b/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/TotalTermFreqValueSource.java
@@ -54,11 +54,13 @@ public class TotalTermFreqValueSource extends ValueSource {
return name() + '(' + field + ',' + val + ')';
}
+ @SuppressWarnings("rawtypes")
@Override
public FunctionValues getValues(Map context, LeafReaderContext readerContext) throws IOException {
return (FunctionValues)context.get(this);
}
+ @SuppressWarnings({"rawtypes", "unchecked"})
@Override
public void createWeight(Map context, IndexSearcher searcher) throws IOException {
long totalTermFreq = 0;
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..5b99e705f52 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
@@ -210,6 +210,7 @@ public class TestPayloadCheckQuery extends LuceneTestCase {
assertFalse(query3.equals(query4));
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
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*")));
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java
index d528111f4d1..f61285dd41f 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/FastCharStream.java
@@ -109,7 +109,12 @@ public final class FastCharStream implements CharStream {
public final int getColumn() {
return bufferStart + bufferPosition;
}
+ /**
+ * @deprecated use getEndLine
+ * @see #getEndLine
+ */
@Override
+ @Deprecated
public final int getLine() {
return 1;
}
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
index 7a03a3cefb9..0ea7b37be04 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java
@@ -65,6 +65,7 @@ public abstract class QueryParserBase extends QueryBuilder implements CommonQuer
protected String field;
int phraseSlop = 0;
+ @SuppressWarnings("deprecation")
float fuzzyMinSim = FuzzyQuery.defaultMinSimilarity;
int fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;
Locale locale = Locale.getDefault();
@@ -588,6 +589,7 @@ public abstract class QueryParserBase extends QueryBuilder implements CommonQuer
* @param prefixLength prefix length
* @return new FuzzyQuery Instance
*/
+ @SuppressWarnings("deprecation")
protected Query newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength) {
// FuzzyQuery doesn't yet allow constant score rewrite
String text = term.text();
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/FuzzyQueryNodeBuilder.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/FuzzyQueryNodeBuilder.java
index 2575e802053..81fe0d8bf8b 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/FuzzyQueryNodeBuilder.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/builders/FuzzyQueryNodeBuilder.java
@@ -36,6 +36,7 @@ public class FuzzyQueryNodeBuilder implements StandardQueryBuilder {
FuzzyQueryNode fuzzyNode = (FuzzyQueryNode) queryNode;
String text = fuzzyNode.getTextAsString();
+ @SuppressWarnings("deprecation")
int numEdits = FuzzyQuery.floatToEdits(fuzzyNode.getSimilarity(),
text.codePointCount(0, text.length()));
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java
index b0ca671514f..1856e73ce24 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java
@@ -25,6 +25,7 @@ public class FuzzyConfig {
private int prefixLength = FuzzyQuery.defaultPrefixLength;
+ @SuppressWarnings("deprecation")
private float minSimilarity = FuzzyQuery.defaultMinSimilarity;
public FuzzyConfig() {}
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java
index ee0f9afe822..86b205ade1e 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/FastCharStream.java
@@ -106,10 +106,21 @@ public final class FastCharStream implements CharStream {
}
@Override
+ @Deprecated
+ /**
+ * Returns the column position of the character last read.
+ * @deprecated
+ * @see #getEndColumn
+ */
public final int getColumn() {
return bufferStart + bufferPosition;
}
@Override
+ @Deprecated
+ /**
+ * @deprecated
+ * @see #getEndLine
+ */
public final int getLine() {
return 1;
}
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/FastCharStream.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/FastCharStream.java
index 3a033f5046d..1f2436841a4 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/FastCharStream.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/FastCharStream.java
@@ -105,10 +105,21 @@ public final class FastCharStream implements CharStream {
}
@Override
+ @Deprecated
+ /**
+ * @deprecated
+ * @see #getEndColumn
+ */
public final int getColumn() {
return bufferStart + bufferPosition;
}
@Override
+ @Deprecated
+ /**
+ * Returns the line number of the character last read.
+ * @deprecated
+ * @see #getEndLine
+ */
public final int getLine() {
return 1;
}
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/FuzzyLikeThisQueryBuilder.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/FuzzyLikeThisQueryBuilder.java
index daf7354a73b..a1e02af6f77 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/FuzzyLikeThisQueryBuilder.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/builders/FuzzyLikeThisQueryBuilder.java
@@ -33,6 +33,7 @@ import org.w3c.dom.NodeList;
public class FuzzyLikeThisQueryBuilder implements QueryBuilder {
private static final int DEFAULT_MAX_NUM_TERMS = 50;
+ @SuppressWarnings("deprecation")
private static final float DEFAULT_MIN_SIMILARITY = FuzzyQuery.defaultMinSimilarity;
private static final int DEFAULT_PREFIX_LENGTH = 1;
private static final boolean DEFAULT_IGNORE_TF = false;
diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/core/builders/TestQueryTreeBuilder.java b/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/core/builders/TestQueryTreeBuilder.java
index be1eb2457ed..2e132441d2a 100644
--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/core/builders/TestQueryTreeBuilder.java
+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/flexible/core/builders/TestQueryTreeBuilder.java
@@ -27,8 +27,9 @@ import org.apache.lucene.queryparser.flexible.core.util.UnescapedCharSequence;
import org.apache.lucene.util.LuceneTestCase;
import org.junit.Test;
+@SuppressWarnings("deprecation")
public class TestQueryTreeBuilder extends LuceneTestCase {
-
+
@Test
public void testSetFieldBuilder() throws QueryNodeException {
QueryTreeBuilder qtb = new QueryTreeBuilder();
diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java b/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
index c482ec27218..08ae407a968 100644
--- a/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
@@ -51,6 +51,7 @@ public abstract class ReplicatorTestCase extends LuceneTestCase {
* Returns a new {@link Server HTTP Server} instance. To obtain its port, use
* {@link #serverPort(Server)}.
*/
+ @SuppressWarnings("deprecation")
public static synchronized Server newHttpServer(Handler handler) throws Exception {
// if this property is true, then jetty will be configured to use SSL
// leveraging the same system properties as java to specify
diff --git a/lucene/sandbox/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.java b/lucene/sandbox/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.java
index 17b595f7139..c6dc6c2e007 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/geo/SimpleWKTShapeParser.java
@@ -114,6 +114,7 @@ public class SimpleWKTShapeParser {
}
/** Parses a list of points into latitude and longitude arraylists */
+ @SuppressWarnings("rawtypes")
private static void parseCoordinates(StreamTokenizer stream, ArrayList lats, ArrayList lons)
throws IOException, ParseException {
boolean isOpenParen = false;
@@ -137,6 +138,7 @@ public class SimpleWKTShapeParser {
}
/** parses a single coordinate, w/ optional 3rd dimension */
+ @SuppressWarnings({"unchecked", "rawtypes"})
private static void parseCoordinate(StreamTokenizer stream, ArrayList lats, ArrayList lons)
throws IOException, ParseException {
lons.add(nextNumber(stream));
@@ -152,8 +154,8 @@ public class SimpleWKTShapeParser {
if (token.equals(EMPTY)) {
return null;
}
- ArrayList<Double> lats = new ArrayList();
- ArrayList<Double> lons = new ArrayList();
+ ArrayList<Double> lats = new ArrayList<>();
+ ArrayList<Double> lons = new ArrayList<>();
parseCoordinates(stream, lats, lons);
double[][] result = new double[lats.size()][2];
for (int i = 0; i < lats.size(); ++i) {
@@ -168,8 +170,8 @@ public class SimpleWKTShapeParser {
if (token.equals(EMPTY)) {
return null;
}
- ArrayList<Double> lats = new ArrayList();
- ArrayList<Double> lons = new ArrayList();
+ ArrayList<Double> lats = new ArrayList<>();
+ ArrayList<Double> lons = new ArrayList<>();
parseCoordinates(stream, lats, lons);
return new Line(lats.stream().mapToDouble(i->i).toArray(), lons.stream().mapToDouble(i->i).toArray());
}
@@ -180,7 +182,7 @@ public class SimpleWKTShapeParser {
if (token.equals(EMPTY)) {
return null;
}
- ArrayList<Line> lines = new ArrayList();
+ ArrayList<Line> lines = new ArrayList<>();
lines.add(parseLine(stream));
while (nextCloserOrComma(stream).equals(COMMA)) {
lines.add(parseLine(stream));
@@ -189,6 +191,7 @@ public class SimpleWKTShapeParser {
}
/** parses the hole of a polygon */
+ @SuppressWarnings({"rawtypes", "unchecked"})
private static Polygon parsePolygonHole(StreamTokenizer stream) throws IOException, ParseException {
ArrayList<Double> lats = new ArrayList();
ArrayList<Double> lons = new ArrayList();
@@ -197,6 +200,7 @@ public class SimpleWKTShapeParser {
}
/** parses a POLYGON */
+ @SuppressWarnings({"rawtypes", "unchecked"})
private static Polygon parsePolygon(StreamTokenizer stream) throws IOException, ParseException {
if (nextEmptyOrOpen(stream).equals(EMPTY)) {
return null;
@@ -222,7 +226,7 @@ public class SimpleWKTShapeParser {
if (token.equals(EMPTY)) {
return null;
}
- ArrayList<Polygon> polygons = new ArrayList();
+ ArrayList<Polygon> polygons = new ArrayList<>();
polygons.add(parsePolygon(stream));
while (nextCloserOrComma(stream).equals(COMMA)) {
polygons.add(parsePolygon(stream));
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java
index 215fa1d1a57..79eb98ab569 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/SpatialStrategy.java
@@ -133,6 +133,7 @@ public abstract class SpatialStrategy {
* scores will be 1 for indexed points at the center of the query shape and as
* low as ~0.1 at its furthest edges.
*/
+ @SuppressWarnings("deprecation")
public final DoubleValuesSource makeRecipDistanceValueSource(Shape queryShape) {
Rectangle bbox = queryShape.getBoundingBox();
double diagonalDist = ctx.getDistCalc().distance(
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java
index 1a2525ed05b..e31c5c13ab1 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/bbox/BBoxValueSource.java
@@ -45,6 +45,7 @@ class BBoxValueSource extends ShapeValuesSource {
return "bboxShape(" + strategy.getFieldName() + ")";
}
+ @SuppressWarnings("deprecation")
@Override
public ShapeValues getValues(LeafReaderContext readerContext) throws IOException {
LeafReader reader = readerContext.reader();
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java
index 6c5253e0d34..174e5695d74 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/HeatmapFacetCounter.java
@@ -88,6 +88,7 @@ public class HeatmapFacetCounter {
* @param facetLevel the target depth (detail) of cells.
* @param maxCells the maximum number of cells to return. If the cells exceed this count, an
*/
+ @SuppressWarnings("deprecation")
public static Heatmap calcFacets(PrefixTreeStrategy strategy, IndexReaderContext context, Bits topAcceptDocs,
Shape inputShape, final int facetLevel, int maxCells) throws IOException {
if (maxCells > (MAX_ROWS_OR_COLUMNS * MAX_ROWS_OR_COLUMNS)) {
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java
index f595f0e4639..3958a67326d 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/WithinPrefixTreeQuery.java
@@ -102,6 +102,7 @@ public class WithinPrefixTreeQuery extends AbstractVisitingPrefixTreeQuery {
/** Returns a new shape that is larger than shape by at distErr.
*/
//TODO move this generic code elsewhere? Spatial4j?
+ @SuppressWarnings("deprecation")
protected Shape bufferShape(Shape shape, double distErr) {
if (distErr <= 0)
throw new IllegalArgumentException("distErr must be > 0");
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
index a7174a49eef..56adc72aa70 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
@@ -84,6 +84,7 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
return new PackedQuadCell(0x0L);
}
+ @SuppressWarnings("deprecation")
@Override
public Cell getCell(Point p, int level) {
if (!robust) { // old method
@@ -144,6 +145,7 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
checkBattenbergNotRobustly(QUAD[3], x + w, y - h, level, matches, term, shape, maxLevel);
}
+ @SuppressWarnings("deprecation")
protected void checkBattenbergNotRobustly(byte quad, double cx, double cy, int level, List<Cell> matches,
long term, Shape shape, int maxLevel) {
// short-circuit if we find a match for the point (no need to continue recursion)
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java
index e060302c2a9..e4d72432eab 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/QuadPrefixTree.java
@@ -138,6 +138,7 @@ public class QuadPrefixTree extends LegacyPrefixTree {
return maxLevels;
}
+ @SuppressWarnings("deprecation")
@Override
public Cell getCell(Point p, int level) {
if (!robust) { // old method
@@ -208,6 +209,7 @@ public class QuadPrefixTree extends LegacyPrefixTree {
// if we actually use the range property in the query, this could be useful
}
+ @SuppressWarnings("deprecation")
protected void checkBattenbergNotRobustly(
char c,
double cx,
@@ -321,6 +323,7 @@ public class QuadPrefixTree extends LegacyPrefixTree {
return shape;
}
+ @SuppressWarnings("deprecation")
protected Rectangle makeShape() {
BytesRef token = getTokenBytesNoLeaf(null);
double xmin = QuadPrefixTree.this.xmin;
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java
index 79ad7a94803..c3bd3508afc 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/query/SpatialArgsParser.java
@@ -112,6 +112,7 @@ public class SpatialArgsParser {
args.setDistErr(readDouble(nameValPairs.remove(DIST_ERR)));
}
+ @SuppressWarnings("deprecation")
protected Shape parseShape(String str, SpatialContext ctx) throws ParseException {
//return ctx.readShape(str);//still in Spatial4j 0.4 but will be deleted
return ctx.readShapeFromWkt(str);
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShapeFactory.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShapeFactory.java
index 071c77517b6..dbb557f449a 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShapeFactory.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/spatial4j/Geo3dShapeFactory.java
@@ -66,7 +66,6 @@ public class Geo3dShapeFactory implements S2ShapeFactory {
private static final double DEFAULT_CIRCLE_ACCURACY = 1e-4;
private double circleAccuracy = DEFAULT_CIRCLE_ACCURACY;
- @SuppressWarnings("unchecked")
public Geo3dShapeFactory(SpatialContext context, SpatialContextFactory factory) {
this.context = context;
this.planetModel = ((Geo3dSpatialContextFactory) factory).planetModel;
@@ -197,6 +196,7 @@ public class Geo3dShapeFactory implements S2ShapeFactory {
}
@Override
+ @Deprecated // use a builder
public Shape lineString(List<Point> list, double distance) {
LineStringBuilder builder = lineString();
for (Point point : list) {
@@ -207,6 +207,7 @@ public class Geo3dShapeFactory implements S2ShapeFactory {
}
@Override
+ @Deprecated // use a builder
public <S extends Shape> ShapeCollection<S> multiShape(List<S> list) {
throw new UnsupportedOperationException();
}
@@ -326,7 +327,6 @@ public class Geo3dShapeFactory implements S2ShapeFactory {
}
}
- @SuppressWarnings("unchecked")
@Override
public Shape build() {
GeoPolygonFactory.PolygonDescription description = new GeoPolygonFactory.PolygonDescription(points, polyHoles);
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java
index 989252e3c6d..a39bafb9ef8 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java
@@ -36,6 +36,7 @@ import org.locationtech.spatial4j.context.SpatialContext;
import org.locationtech.spatial4j.shape.Point;
import org.locationtech.spatial4j.shape.Shape;
+@SuppressWarnings("deprecation")
public class DistanceStrategyTest extends StrategyTestCase {
@ParametersFactory(argumentFormatting = "strategy=%s")
public static Iterable<Object[]> parameters() {
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java
index f55daf64bb0..d9d2124e7ba 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/PortedSolr3Test.java
@@ -40,6 +40,7 @@ import org.locationtech.spatial4j.shape.Shape;
/**
* Based off of Solr 3's SpatialFilterTest.
*/
+@SuppressWarnings("deprecation")
public class PortedSolr3Test extends StrategyTestCase {
@ParametersFactory(argumentFormatting = "strategy=%s")
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java
index f52ef2b444d..20188e81b08 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/QueryEqualsHashCodeTest.java
@@ -102,11 +102,13 @@ public class QueryEqualsHashCodeTest extends LuceneTestCase {
assertTrue(first.hashCode() != second.hashCode());
}
+ @SuppressWarnings("deprecation")
private SpatialArgs makeArgs1() {
final Shape shape1 = ctx.makeRectangle(0, 0, 10, 10);
return new SpatialArgs(predicate, shape1);
}
+ @SuppressWarnings("deprecation")
private SpatialArgs makeArgs2() {
final Shape shape2 = ctx.makeRectangle(0, 0, 20, 20);
return new SpatialArgs(predicate, shape2);
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java
index da351fc857e..7d19d0e05b4 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialArgsTest.java
@@ -23,6 +23,7 @@ import org.junit.Test;
import org.locationtech.spatial4j.context.SpatialContext;
import org.locationtech.spatial4j.shape.Shape;
+@SuppressWarnings("deprecation")
public class SpatialArgsTest extends LuceneTestCase {
@Test
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java
index f810ab74438..1cad30f60e3 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialExample.java
@@ -53,6 +53,7 @@ import org.locationtech.spatial4j.shape.Shape;
* This class serves as example code to show how to use the Lucene spatial
* module.
*/
+@SuppressWarnings("deprecation")
public class SpatialExample extends LuceneTestCase {
//Note: Test invoked via TestTestFramework.spatialExample()
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java
index 55ad1d7e466..ac802633628 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestCase.java
@@ -119,6 +119,7 @@ public abstract class SpatialTestCase extends LuceneTestCase {
}
}
+ @SuppressWarnings("deprecation")
protected Point randomPoint() {
final Rectangle WB = ctx.getWorldBounds();
return ctx.makePoint(
@@ -130,6 +131,7 @@ public abstract class SpatialTestCase extends LuceneTestCase {
return randomRectangle(ctx.getWorldBounds());
}
+ @SuppressWarnings("deprecation")
protected Rectangle randomRectangle(Rectangle bounds) {
double[] xNewStartAndWidth = randomSubRange(bounds.getMinX(), bounds.getWidth());
double xMin = xNewStartAndWidth[0];
@@ -147,6 +149,7 @@ public abstract class SpatialTestCase extends LuceneTestCase {
}
/** Returns new minStart and new length that is inside the range specified by the arguments. */
+ @SuppressWarnings("deprecation")
protected double[] randomSubRange(double boundStart, double boundLen) {
if (boundLen >= 3 && usually()) { // typical
// prefer integers for ease of debugability ... and prefer 1/16th of bound
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java
index 06a68ce72e9..9dc81646587 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/SpatialTestData.java
@@ -41,6 +41,7 @@ public class SpatialTestData {
* an "id", a "name" and the "shape". Empty lines and lines starting with a '#' are skipped.
* The stream is closed.
*/
+ @SuppressWarnings("deprecation")
public static Iterator<SpatialTestData> getTestData(InputStream in, SpatialContext ctx) throws IOException {
List<SpatialTestData> results = new ArrayList<>();
BufferedReader bufInput = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java
index 199ebcf01a7..f44e995a2de 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/StrategyTestCase.java
@@ -184,6 +184,7 @@ public abstract class StrategyTestCase extends SpatialTestCase {
return strategy.makeQuery(q.args);
}
+ @SuppressWarnings("deprecation")
protected void adoc(String id, String shapeStr) throws IOException, ParseException {
Shape shape = shapeStr==null ? null : ctx.readShapeFromWkt(shapeStr);
addDocument(newDoc(id, shape));
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
index 210ab386fab..b8219015613 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
@@ -36,6 +36,7 @@ import org.locationtech.spatial4j.shape.Rectangle;
import org.locationtech.spatial4j.shape.Shape;
import org.locationtech.spatial4j.shape.impl.RectangleImpl;
+@SuppressWarnings("deprecation")
public class TestBBoxStrategy extends RandomSpatialOpStrategyTestCase {
@Override
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java
index e74c2b5d074..f5e19b31bce 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/composite/CompositeStrategyTest.java
@@ -116,6 +116,7 @@ public class CompositeStrategyTest extends RandomSpatialOpStrategyTestCase {
}
//TODO move up
+ @SuppressWarnings("deprecation")
private Shape randomCircle() {
final Point point = randomPoint();
//TODO pick using gaussian
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java
index 54296da040c..42821bb5f19 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/DateNRStrategyTest.java
@@ -38,6 +38,7 @@ public class DateNRStrategyTest extends RandomSpatialOpStrategyTestCase {
long randomCalWindowMs;
+ @SuppressWarnings("deprecation")
@Before
public void setUp() throws Exception {
super.setUp();
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
index a38f5b6e7a7..edbfddb1fff 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/HeatmapFacetCounterTest.java
@@ -43,6 +43,7 @@ import org.locationtech.spatial4j.shape.impl.RectangleImpl;
import static com.carrotsearch.randomizedtesting.RandomizedTest.atMost;
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
+@SuppressWarnings("deprecation")
public class HeatmapFacetCounterTest extends StrategyTestCase {
SpatialPrefixTree grid;
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java
index 7d029f10e97..974e14df06a 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/JtsPolygonTest.java
@@ -37,6 +37,7 @@ import org.junit.Test;
import java.text.ParseException;
import java.util.HashMap;
+@SuppressWarnings("deprecation")
public class JtsPolygonTest extends StrategyTestCase {
private static final double LUCENE_4464_distErrPct = SpatialArgs.DEFAULT_DISTERRPCT;//DEFAULT 2.5%
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java
index 9c128836f92..680c26c3b04 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/NumberRangeFacetsTest.java
@@ -45,6 +45,7 @@ import org.locationtech.spatial4j.shape.Shape;
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt;
import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween;
+@SuppressWarnings("deprecation")
public class NumberRangeFacetsTest extends StrategyTestCase {
DateRangePrefixTree tree;
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
index c5b145f97c9..60d9b13ef9a 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
@@ -63,6 +63,7 @@ import static org.locationtech.spatial4j.shape.SpatialRelation.WITHIN;
/** Randomized PrefixTree test that considers the fuzziness of the
* results introduced by grid approximation. */
+@SuppressWarnings("deprecation")
public class RandomSpatialOpFuzzyPrefixTreeTest extends StrategyTestCase {
static final int ITERATIONS = 10;
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java
index 22c58393f5f..517cd7f2c9c 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpStrategyTestCase.java
@@ -34,6 +34,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.randomIntBetween
/** Base test harness, ideally for SpatialStrategy impls that have exact results
* (not grid approximated), hence "not fuzzy".
*/
+@SuppressWarnings("deprecation")
public abstract class RandomSpatialOpStrategyTestCase extends StrategyTestCase {
//Note: this is partially redundant with StrategyTestCase.runTestQuery & testOperation
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java
index f852464ca19..91967f87089 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestRecursivePrefixTreeStrategy.java
@@ -31,6 +31,7 @@ import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
+@SuppressWarnings("deprecation")
public class TestRecursivePrefixTreeStrategy extends StrategyTestCase {
private int maxLength;
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java
index fc131c5d788..def1aa1f607 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/TestTermQueryPrefixGridStrategy.java
@@ -30,9 +30,9 @@ import org.junit.Test;
import java.io.IOException;
import java.util.Arrays;
-
public class TestTermQueryPrefixGridStrategy extends SpatialTestCase {
+ @SuppressWarnings("deprecation")
@Test
public void testNGramPrefixGridLosAngeles() throws IOException {
SpatialContext ctx = SpatialContext.GEO;
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java
index cc63b5e17ca..e1dfdc4252e 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/tree/SpatialPrefixTreeTest.java
@@ -79,6 +79,7 @@ public class SpatialPrefixTreeTest extends SpatialTestCase {
* A PrefixTree pruning optimization gone bad, applicable when optimize=true.
* See <a href="https://issues.apache.org/jira/browse/LUCENE-4770">LUCENE-4770</a>.
*/
+ @SuppressWarnings("deprecation")
@Test
public void testBadPrefixTreePrune() throws Exception {
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java
index 6ec773b8faf..07f49099c61 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dRptTest.java
@@ -46,6 +46,7 @@ import org.locationtech.spatial4j.shape.Shape;
import static org.locationtech.spatial4j.distance.DistanceUtils.DEGREES_TO_RADIANS;
+@SuppressWarnings("deprecation")
public class Geo3dRptTest extends RandomSpatialOpStrategyTestCase {
private PlanetModel planetModel;
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java
index bf152b7fdfb..5012803c095 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/Geo3dShapeSphereModelRectRelationTest.java
@@ -66,6 +66,7 @@ public class Geo3dShapeSphereModelRectRelationTest extends ShapeRectRelationTest
}
+ @SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
@Test
public void testFailure2_LUCENE6475() {
GeoCircle geo3dCircle = GeoCircleFactory.makeGeoCircle(planetModel, 1.6282053147165243E-4 * RADIANS_PER_DEGREE,
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java
index 0c18f5d7dde..0c90b31ff9c 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/RandomizedShapeTestCase.java
@@ -36,6 +36,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.*;
* A base test class with utility methods to help test shapes.
* Extends from RandomizedTest.
*/
+@SuppressWarnings("deprecation")
public abstract class RandomizedShapeTestCase extends LuceneTestCase {
protected static final double EPS = 10e-9;
@@ -55,7 +56,6 @@ public abstract class RandomizedShapeTestCase extends LuceneTestCase {
this.ctx = ctx;
}
- @SuppressWarnings("unchecked")
public static void checkShapesImplementEquals( Class<?>[] classes ) {
for( Class<?> clazz : classes ) {
try {
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java
index 901594ef749..320bb7415ef 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/vector/TestPointVectorStrategy.java
@@ -33,6 +33,7 @@ import org.locationtech.spatial4j.context.SpatialContext;
import org.locationtech.spatial4j.shape.Circle;
import org.locationtech.spatial4j.shape.Point;
+@SuppressWarnings("deprecation")
public class TestPointVectorStrategy extends StrategyTestCase {
@Before
diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/jaspell/JaspellLookup.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/jaspell/JaspellLookup.java
index 948ebeb0151..b816773e5d4 100644
--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/jaspell/JaspellLookup.java
+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/jaspell/JaspellLookup.java
@@ -23,7 +23,6 @@ import java.util.Set;
import org.apache.lucene.search.suggest.InputIterator;
import org.apache.lucene.search.suggest.Lookup;
-import org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode;
import org.apache.lucene.store.DataInput;
import org.apache.lucene.store.DataOutput;
import org.apache.lucene.util.Accountable;
@@ -39,6 +38,7 @@ import org.apache.lucene.util.CharsRefBuilder;
* @deprecated Migrate to one of the newer suggesters which are much more RAM efficient.
*/
@Deprecated
+@SuppressWarnings("deprecation")
public class JaspellLookup extends Lookup implements Accountable {
JaspellTernarySearchTrie trie = new JaspellTernarySearchTrie();
private boolean usePrefix = true;
@@ -140,52 +140,52 @@ public class JaspellLookup extends Lookup implements Accountable {
private static final byte HI_KID = 0x04;
private static final byte HAS_VALUE = 0x08;
- private void readRecursively(DataInput in, TSTNode node) throws IOException {
+ private void readRecursively(DataInput in, org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode node) throws IOException {
node.splitchar = in.readString().charAt(0);
byte mask = in.readByte();
if ((mask & HAS_VALUE) != 0) {
node.data = Long.valueOf(in.readLong());
}
if ((mask & LO_KID) != 0) {
- TSTNode kid = new TSTNode('\0', node);
- node.relatives[TSTNode.LOKID] = kid;
+ org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode kid = new org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode('\0', node);
+ node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.LOKID] = kid;
readRecursively(in, kid);
}
if ((mask & EQ_KID) != 0) {
- TSTNode kid = new TSTNode('\0', node);
- node.relatives[TSTNode.EQKID] = kid;
+ org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode kid = new org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode('\0', node);
+ node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.EQKID] = kid;
readRecursively(in, kid);
}
if ((mask & HI_KID) != 0) {
- TSTNode kid = new TSTNode('\0', node);
- node.relatives[TSTNode.HIKID] = kid;
+ org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode kid = new org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode('\0', node);
+ node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.HIKID] = kid;
readRecursively(in, kid);
}
}
- private void writeRecursively(DataOutput out, TSTNode node) throws IOException {
+ private void writeRecursively(DataOutput out, org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode node) throws IOException {
if (node == null) {
return;
}
out.writeString(new String(new char[] {node.splitchar}, 0, 1));
byte mask = 0;
- if (node.relatives[TSTNode.LOKID] != null) mask |= LO_KID;
- if (node.relatives[TSTNode.EQKID] != null) mask |= EQ_KID;
- if (node.relatives[TSTNode.HIKID] != null) mask |= HI_KID;
+ if (node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.LOKID] != null) mask |= LO_KID;
+ if (node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.EQKID] != null) mask |= EQ_KID;
+ if (node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.HIKID] != null) mask |= HI_KID;
if (node.data != null) mask |= HAS_VALUE;
out.writeByte(mask);
if (node.data != null) {
out.writeLong(((Number)node.data).longValue());
}
- writeRecursively(out, node.relatives[TSTNode.LOKID]);
- writeRecursively(out, node.relatives[TSTNode.EQKID]);
- writeRecursively(out, node.relatives[TSTNode.HIKID]);
+ writeRecursively(out, node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.LOKID]);
+ writeRecursively(out, node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.EQKID]);
+ writeRecursively(out, node.relatives[org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode.HIKID]);
}
@Override
public boolean store(DataOutput output) throws IOException {
output.writeVLong(count);
- TSTNode root = trie.getRoot();
+ org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode root = trie.getRoot();
if (root == null) { // empty tree
return false;
}
@@ -196,7 +196,7 @@ public class JaspellLookup extends Lookup implements Accountable {
@Override
public boolean load(DataInput input) throws IOException {
count = input.readVLong();
- TSTNode root = new TSTNode('\0', null);
+ org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode root = new org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode('\0', null);
readRecursively(input, root);
trie.setRoot(root);
return true;
diff --git a/lucene/suggest/src/test/org/apache/lucene/search/spell/TestWordBreakSpellChecker.java b/lucene/suggest/src/test/org/apache/lucene/search/spell/TestWordBreakSpellChecker.java
index 35e8245ac8b..cc2dbadf027 100644
--- a/lucene/suggest/src/test/org/apache/lucene/search/spell/TestWordBreakSpellChecker.java
+++ b/lucene/suggest/src/test/org/apache/lucene/search/spell/TestWordBreakSpellChecker.java
@@ -38,6 +38,7 @@ import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TestUtil;
+@SuppressWarnings("deprecation")
public class TestWordBreakSpellChecker extends LuceneTestCase {
private Directory dir;
private Analyzer analyzer;
diff --git a/lucene/suggest/src/test/org/apache/lucene/search/suggest/LookupBenchmarkTest.java b/lucene/suggest/src/test/org/apache/lucene/search/suggest/LookupBenchmarkTest.java
index 9f9190a5773..a38a33343e2 100644
--- a/lucene/suggest/src/test/org/apache/lucene/search/suggest/LookupBenchmarkTest.java
+++ b/lucene/suggest/src/test/org/apache/lucene/search/suggest/LookupBenchmarkTest.java
@@ -40,7 +40,6 @@ import org.apache.lucene.search.suggest.analyzing.FreeTextSuggester;
import org.apache.lucene.search.suggest.analyzing.FuzzySuggester;
import org.apache.lucene.search.suggest.fst.FSTCompletionLookup;
import org.apache.lucene.search.suggest.fst.WFSTCompletionLookup;
-import org.apache.lucene.search.suggest.jaspell.JaspellLookup;
import org.apache.lucene.search.suggest.tst.TSTLookup;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
@@ -53,12 +52,12 @@ import org.junit.Ignore;
*/
@Ignore("COMMENT ME TO RUN BENCHMARKS!")
public class LookupBenchmarkTest extends LuceneTestCase {
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("deprecation")
private final List<Class<? extends Lookup>> benchmarkClasses = Arrays.asList(
FuzzySuggester.class,
AnalyzingSuggester.class,
AnalyzingInfixSuggester.class,
- JaspellLookup.class,
+ org.apache.lucene.search.suggest.jaspell.JaspellLookup.class,
TSTLookup.class,
FSTCompletionLookup.class,
WFSTCompletionLookup.class,
diff --git a/lucene/suggest/src/test/org/apache/lucene/search/suggest/PersistenceTest.java b/lucene/suggest/src/test/org/apache/lucene/search/suggest/PersistenceTest.java
index fd5b558de4e..c060a1c7876 100644
--- a/lucene/suggest/src/test/org/apache/lucene/search/suggest/PersistenceTest.java
+++ b/lucene/suggest/src/test/org/apache/lucene/search/suggest/PersistenceTest.java
@@ -51,6 +51,7 @@ public class PersistenceTest extends LuceneTestCase {
runTest(TSTLookup.class, true);
}
+ @SuppressWarnings("deprecation")
public void testJaspellPersistence() throws Exception {
runTest(JaspellLookup.class, true);
}
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java b/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java
index cdbac777846..d4ec009a95e 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/QueryUtils.java
@@ -20,7 +20,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Random;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.Fields;
@@ -40,9 +40,9 @@ import org.apache.lucene.util.Bits;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.Version;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
* Utility class for sanity-checking queries.
diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java b/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java
index 590841d8e78..cc0faae5ade 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java
@@ -341,6 +341,7 @@ public class FSTTester<T> {
}
// FST is complete
+ @SuppressWarnings("deprecation")
private void verifyUnPruned(int inputMode, FST<T> fst) throws IOException {
final FST<Long> fstLong;
diff --git a/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java b/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
index 2f0f067c513..4e7adf1a4da 100644
--- a/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
+++ b/lucene/test-framework/src/test/org/apache/lucene/search/TestBaseExplanationTestCase.java
@@ -20,9 +20,6 @@ import java.io.IOException;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.Term;
-
-import junit.framework.AssertionFailedError;
-
/**
* Tests that the {@link BaseExplanationTestCase} helper code, as well as
* {@link CheckHits#checkNoMatchExplanations} are checking what they are suppose to.
@@ -30,12 +27,12 @@ import junit.framework.AssertionFailedError;
public class TestBaseExplanationTestCase extends BaseExplanationTestCase {
public void testQueryNoMatchWhenExpected() throws Exception {
- expectThrows(AssertionFailedError.class, () -> {
+ expectThrows(AssertionError.class, () -> {
qtest(new TermQuery(new Term(FIELD, "BOGUS")), new int[] { 3 /* none */ });
});
}
public void testQueryMatchWhenNotExpected() throws Exception {
- expectThrows(AssertionFailedError.class, () -> {
+ expectThrows(AssertionError.class, () -> {
qtest(new TermQuery(new Term(FIELD, "w1")), new int[] { 0, 1 /*, 2, 3 */ });
});
}
@@ -45,7 +42,7 @@ public class TestBaseExplanationTestCase extends BaseExplanationTestCase {
qtest(new TermQuery(new Term(FIELD, "zz")), new int[] { 1, 3 });
// ensure when the Explanations are broken, we get an error about those matches
- expectThrows(AssertionFailedError.class, () -> {
+ expectThrows(AssertionError.class, () -> {
qtest(new BrokenExplainTermQuery(new Term(FIELD, "zz"), false, true), new int[] { 1, 3 });
});
@@ -56,7 +53,7 @@ public class TestBaseExplanationTestCase extends BaseExplanationTestCase {
qtest(new TermQuery(new Term(FIELD, "zz")), new int[] { 1, 3 });
// ensure when the Explanations are broken, we get an error about the non matches
- expectThrows(AssertionFailedError.class, () -> {
+ expectThrows(AssertionError.class, () -> {
CheckHits.checkNoMatchExplanations(new BrokenExplainTermQuery(new Term(FIELD, "zz"), true, false),
FIELD, searcher, new int[] { 1, 3 });
});
diff --git a/lucene/test-framework/src/test/org/apache/lucene/util/TestExceptionInBeforeClassHooks.java b/lucene/test-framework/src/test/org/apache/lucene/util/TestExceptionInBeforeClassHooks.java
index bd99b4bea64..bc9e89af61f 100644
--- a/lucene/test-framework/src/test/org/apache/lucene/util/TestExceptionInBeforeClassHooks.java
+++ b/lucene/test-framework/src/test/org/apache/lucene/util/TestExceptionInBeforeClassHooks.java
@@ -20,7 +20,7 @@ import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java b/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
index f723a25b24c..41d6a796bd9 100644
--- a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
+++ b/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
@@ -96,6 +96,7 @@ public class ICUCollationField extends FieldType {
/**
* Setup the field according to the provided parameters
*/
+ @SuppressWarnings("deprecation")
private void setup(ResourceLoader loader, Map<String,String> args) {
String custom = args.remove("custom");
String localeID = args.remove("locale");
@@ -197,6 +198,7 @@ public class ICUCollationField extends FieldType {
* Read custom rules from a file, and create a RuleBasedCollator
* The file cannot support comments, as # might be in the rules!
*/
+ @SuppressWarnings("deprecation")
static Collator createFromRules(String fileName, ResourceLoader loader) {
InputStream input = null;
try {
diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java b/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
index f164080a7b8..0916fe83233 100644
--- a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
+++ b/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
@@ -62,6 +62,7 @@ public class TestICUCollationField extends SolrTestCaseJ4 {
* look out for jvm differences with collation).
* So it's preferable to create this file on-the-fly.
*/
+ @SuppressWarnings("deprecation")
public static String setupSolrHome() throws Exception {
String tmpFile = createTempDir().toFile().getAbsolutePath();
// make data and conf dirs
diff --git a/solr/contrib/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java b/solr/contrib/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java
index 9407d1dd354..29ce7ed45a6 100644
--- a/solr/contrib/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java
+++ b/solr/contrib/analytics/src/java/org/apache/solr/analytics/ExpressionFactory.java
@@ -465,6 +465,7 @@ public class ExpressionFactory {
* @return an analytics representation of the field
* @throws SolrException if the field is not supported by the analytics framework
*/
+ @SuppressWarnings("deprecation")
private AnalyticsField createField(SchemaField field) throws SolrException {
String fieldName = field.getName();
if (fields.containsKey(fieldName)) {
@@ -577,6 +578,7 @@ public class ExpressionFactory {
* @return an array of param strings
* @throws SolrException if the function has incorrect syntax
*/
+ @SuppressWarnings("unused")
private static String[] getFunctionParams(String function) throws SolrException {
return getParams(function, null, null);
}
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DateFieldsTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DateFieldsTest.java
index fb86738acc2..8947550a430 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DateFieldsTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DateFieldsTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
public class DateFieldsTest extends AbstractAnalyticsFieldTest {
+ @SuppressWarnings("deprecation")
@Test
public void expressionFactoryCreationTest() {
ExpressionFactory fact = getExpressionFactory();
@@ -68,6 +69,7 @@ public class DateFieldsTest extends AbstractAnalyticsFieldTest {
checkSingleFieldValues(singleDates, values, missing);
}
+ @SuppressWarnings("deprecation")
@Test
public void multiValuedTrieDateTest() throws IOException {
DateMultiTrieField valueField = new DateMultiTrieField("date_dtm_t");
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DoubleFieldsTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DoubleFieldsTest.java
index e046f59f6cd..b4c01809172 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DoubleFieldsTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/DoubleFieldsTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
public class DoubleFieldsTest extends AbstractAnalyticsFieldTest {
+ @SuppressWarnings("deprecation")
@Test
public void expressionFactoryCreationTest() {
ExpressionFactory fact = getExpressionFactory();
@@ -68,6 +69,7 @@ public class DoubleFieldsTest extends AbstractAnalyticsFieldTest {
checkSingleFieldValues(singleDoubles, values, missing);
}
+ @SuppressWarnings("deprecation")
@Test
public void multiValuedTrieDoubleTest() throws IOException {
DoubleMultiTrieField valueField = new DoubleMultiTrieField("double_dm_t");
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/FloatFieldsTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/FloatFieldsTest.java
index bba6d465bb4..ac39ab03473 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/FloatFieldsTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/FloatFieldsTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
public class FloatFieldsTest extends AbstractAnalyticsFieldTest {
+ @SuppressWarnings("deprecation")
@Test
public void expressionFactoryCreationTest() {
ExpressionFactory fact = getExpressionFactory();
@@ -68,6 +69,7 @@ public class FloatFieldsTest extends AbstractAnalyticsFieldTest {
checkSingleFieldValues(singleFloats, values, missing);
}
+ @SuppressWarnings("deprecation")
@Test
public void multiValuedTrieFloatTest() throws IOException {
FloatMultiTrieField valueField = new FloatMultiTrieField("float_fm_t");
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/IntFieldsTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/IntFieldsTest.java
index ec52f681431..ba60204bda8 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/IntFieldsTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/IntFieldsTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
public class IntFieldsTest extends AbstractAnalyticsFieldTest {
+ @SuppressWarnings("deprecation")
@Test
public void expressionFactoryCreationTest() {
ExpressionFactory fact = getExpressionFactory();
@@ -68,6 +69,7 @@ public class IntFieldsTest extends AbstractAnalyticsFieldTest {
checkSingleFieldValues(singleInts, values, missing);
}
+ @SuppressWarnings("deprecation")
@Test
public void multiValuedTrieIntTest() throws IOException {
IntMultiTrieField valueField = new IntMultiTrieField("int_im_t");
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/LongFieldsTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/LongFieldsTest.java
index 6c190db52da..960fcf4c2e3 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/LongFieldsTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/function/field/LongFieldsTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
public class LongFieldsTest extends AbstractAnalyticsFieldTest {
+ @SuppressWarnings("deprecation")
@Test
public void expressionFactoryCreationTest() {
ExpressionFactory fact = getExpressionFactory();
@@ -68,6 +69,7 @@ public class LongFieldsTest extends AbstractAnalyticsFieldTest {
checkSingleFieldValues(singleLongs, values, missing);
}
+ @SuppressWarnings("deprecation")
@Test
public void multiValuedTrieLongTest() throws IOException {
LongMultiTrieField valueField = new LongMultiTrieField("long_lm_t");
diff --git a/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyFieldFacetTest.java b/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyFieldFacetTest.java
index d3943808b56..f1d468cbec5 100644
--- a/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyFieldFacetTest.java
+++ b/solr/contrib/analytics/src/test/org/apache/solr/analytics/legacy/facet/LegacyFieldFacetTest.java
@@ -938,7 +938,6 @@ public class LegacyFieldFacetTest extends LegacyAbstractAnalyticsFacetTest{
assertEquals(getRawResponse(),stringLong,stringLongTest);
}
- @SuppressWarnings("unchecked")
@Test
public void missingTest() throws Exception {
//Int Date
@@ -1057,6 +1056,7 @@ public class LegacyFieldFacetTest extends LegacyAbstractAnalyticsFacetTest{
}
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
public static void assertEquals(String mes, Object actual, Object expected) {
Collections.sort((List<Comparable>) actual);
Collections.sort((List<Comparable>) expected);
diff --git a/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java b/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
index b75b8c6deed..cb72bbe4eda 100644
--- a/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
+++ b/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
@@ -286,6 +286,7 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
/**
* Prepares Carrot2 documents for clustering.
*/
+ @SuppressWarnings("deprecation")
private List<Document> getDocuments(SolrDocumentList solrDocList, Map<SolrDocument, Integer> docIds,
Query query, final SolrQueryRequest sreq) throws IOException {
SolrHighlighter highlighter = null;
diff --git a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
index f19a4ca9ffd..45ce4f6ba46 100644
--- a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
+++ b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
@@ -52,6 +52,7 @@ import com.sun.mail.gimap.GmailRawSearchTerm;
*
* @since solr 1.4
*/
+@SuppressWarnings("unchecked")
public class MailEntityProcessor extends EntityProcessorBase {
private static final SimpleDateFormat sinceDateParser =
diff --git a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
index 875032b5a1f..1245dd8e104 100644
--- a/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
+++ b/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
@@ -124,6 +124,7 @@ public class TikaEntityProcessor extends EntityProcessorBase {
spatialMetadataField = context.getResolvedEntityAttribute("spatialMetadataField");
}
+ @SuppressWarnings({"unchecked", "deprecation"})
@Override
public Map<String, Object> nextRow() {
if(done) return null;
diff --git a/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java b/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
index 0b00be60557..fa5bfe0112a 100644
--- a/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
+++ b/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
@@ -46,6 +46,7 @@ import java.util.Map;
* @since solr 1.4
*/
@Ignore("Needs a Mock Mail Server to work")
+@SuppressWarnings("unchecked")
public class TestMailEntityProcessor extends AbstractDataImportHandlerTestCase {
// Credentials
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java
index 4bbe0467349..52656fe6e89 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java
@@ -36,6 +36,7 @@ import java.util.Map;
* @since solr 1.4
*/
public class ClobTransformer extends Transformer {
+ @SuppressWarnings("unchecked")
@Override
public Object transformRow(Map<String, Object> aRow, Context context) {
for (Map<String, String> map : context.getAllEntityFields()) {
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/Context.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/Context.java
index 4d0cb3a683c..9cdfa0a17b5 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/Context.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/Context.java
@@ -102,6 +102,7 @@ public abstract class Context {
* @see org.apache.solr.handler.dataimport.DataSource
* @see #getDataSource(String)
*/
+ @SuppressWarnings("rawtypes")
public abstract DataSource getDataSource();
/**
@@ -112,6 +113,7 @@ public abstract class Context {
* @return a new DataSource instance
* @see org.apache.solr.handler.dataimport.DataSource
*/
+ @SuppressWarnings("rawtypes")
public abstract DataSource getDataSource(String name);
/**
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java
index 20a2aad456d..98028cdd156 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java
@@ -31,6 +31,7 @@ import java.util.Map;
*
* @since solr 1.3
*/
+@SuppressWarnings("rawtypes")
public class ContextImpl extends Context {
protected EntityProcessorWrapper epw;
@@ -84,7 +85,7 @@ public class ContextImpl extends Context {
@Override
public List<Map<String, String>> getAllEntityFields() {
- return epw==null || epw.getEntity() == null ? Collections.EMPTY_LIST : epw.getEntity().getAllFieldsList();
+ return epw==null || epw.getEntity() == null ? Collections.emptyList() : epw.getEntity().getAllFieldsList();
}
@Override
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
index c48c332616f..f01b7bbb72e 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
@@ -65,6 +65,7 @@ import static org.apache.solr.handler.dataimport.DataImporter.IMPORT_CMD;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class DataImportHandler extends RequestHandlerBase implements
SolrCoreAware {
@@ -89,7 +90,6 @@ public class DataImportHandler extends RequestHandlerBase implements
}
@Override
- @SuppressWarnings("unchecked")
public void init(NamedList args) {
super.init(args);
Map<String,String> macro = new HashMap<>();
@@ -98,7 +98,6 @@ public class DataImportHandler extends RequestHandlerBase implements
}
@Override
- @SuppressWarnings("unchecked")
public void inform(SolrCore core) {
try {
String name = getPluginInfo().name;
@@ -116,7 +115,6 @@ public class DataImportHandler extends RequestHandlerBase implements
}
@Override
- @SuppressWarnings("unchecked")
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)
throws Exception {
rsp.setHttpCaching(false);
@@ -250,7 +248,6 @@ public class DataImportHandler extends RequestHandlerBase implements
&& !writerClassStr.equals(DocBuilder.class.getPackage().getName() + "."
+ DEFAULT_WRITER_NAME)) {
try {
- @SuppressWarnings("unchecked")
Class<DIHWriter> writerClass = DocBuilder.loadClass(writerClassStr, req.getCore());
Constructor<DIHWriter> cnstr = writerClass.getConstructor(new Class[] {
UpdateRequestProcessor.class, SolrQueryRequest.class});
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java
index 932849bbd9b..89ad15be72a 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java
@@ -68,6 +68,7 @@ import java.util.concurrent.locks.ReentrantLock;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class DataImporter {
public enum Status {
@@ -187,6 +188,7 @@ public class DataImporter {
config = loadDataConfig(configFile);
}
+ @SuppressWarnings("deprecation")
public DIHConfiguration loadDataConfig(InputSource configFile) {
DIHConfiguration dihcfg = null;
@@ -327,7 +329,6 @@ public class DataImporter {
return new DIHConfiguration(documentTags.get(0), this, functions, script, dataSources, pw);
}
- @SuppressWarnings("unchecked")
private DIHProperties createPropertyWriter() {
DIHProperties propWriter = null;
PropertyWriter configPw = config.getPropertyWriter();
@@ -489,7 +490,6 @@ public class DataImporter {
}
}
- @SuppressWarnings("unchecked")
Map<String, String> getStatusMessages() {
//this map object is a Collections.synchronizedMap(new LinkedHashMap()). if we
// synchronize on the object it must be safe to iterate through the map
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java
index 6da9cc1b08b..f514e21a97e 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java
@@ -42,7 +42,6 @@ public class DateFormatTransformer extends Transformer {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Override
- @SuppressWarnings("unchecked")
public Object transformRow(Map<String, Object> aRow, Context context) {
for (Map<String, String> map : context.getAllEntityFields()) {
@@ -68,6 +67,7 @@ public class DateFormatTransformer extends Transformer {
try {
Object o = aRow.get(srcCol);
if (o instanceof List) {
+ @SuppressWarnings("rawtypes")
List inputs = (List) o;
List<Date> results = new ArrayList<>();
for (Object input : inputs) {
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java
index 2fd93031073..e4751bea680 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java
@@ -41,6 +41,7 @@ import java.util.Stack;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
class DebugLogger {
private Stack<DebugInfo> debugStack;
@@ -54,6 +55,7 @@ class DebugLogger {
boolean enabled = true;
+ @SuppressWarnings("serial")
public DebugLogger() {
// writer = solrWriter;
output = new NamedList();
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java
index 285b135c9a0..f4181f00580 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java
@@ -48,6 +48,7 @@ import java.util.concurrent.atomic.AtomicLong;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class DocBuilder {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
index 984f0303e33..517b00dcbbe 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
@@ -40,6 +40,7 @@ import java.util.Map;
*
* @since solr 1.4
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class EntityProcessorWrapper extends EntityProcessor {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -78,7 +79,7 @@ public class EntityProcessorWrapper extends EntityProcessor {
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("serial")
void loadTransformers() {
String transClasses = context.getEntityAttribute(TRANSFORMER);
@@ -149,7 +150,6 @@ public class EntityProcessorWrapper extends EntityProcessor {
}
}
- @SuppressWarnings("unchecked")
static class ReflectionTransformer extends Transformer {
final Method meth;
@@ -185,7 +185,6 @@ public class EntityProcessorWrapper extends EntityProcessor {
return r;
}
- @SuppressWarnings("unchecked")
protected Map<String, Object> applyTransformer(Map<String, Object> row) {
if(row == null) return null;
if (transformers == null)
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/HTMLStripTransformer.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/HTMLStripTransformer.java
index e62c329283e..62754b761e0 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/HTMLStripTransformer.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/HTMLStripTransformer.java
@@ -35,7 +35,7 @@ import java.util.Map;
public class HTMLStripTransformer extends Transformer {
@Override
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
public Object transformRow(Map<String, Object> row, Context context) {
List<Map<String, String>> fields = context.getAllEntityFields();
for (Map<String, String> field : fields) {
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/JdbcDataSource.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
index 5eb35172466..a8cacce22d2 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/JdbcDataSource.java
@@ -170,6 +170,7 @@ public class JdbcDataSource extends
}
return factory = new Callable<Connection>() {
+ @SuppressWarnings("unchecked")
@Override
public Connection call() throws Exception {
log.info("Creating a connection for entity "
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java
index 0940cbd4cf4..1a871606fea 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/LineEntityProcessor.java
@@ -129,6 +129,7 @@ public class LineEntityProcessor extends EntityProcessorBase {
}
}
+ @SuppressWarnings("deprecation")
public void closeResources() {
if (reader != null) {
IOUtils.closeQuietly(reader);
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java
index 349b14eee30..665ba6d2339 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/NumberFormatTransformer.java
@@ -44,7 +44,7 @@ import java.util.Map;
public class NumberFormatTransformer extends Transformer {
@Override
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
public Object transformRow(Map<String, Object> row, Context context) {
for (Map<String, String> fld : context.getAllEntityFields()) {
String style = context.replaceTokens(fld.get(FORMAT_STYLE));
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java
index c75608c95a9..e378488ac72 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/PlainTextEntityProcessor.java
@@ -42,6 +42,7 @@ public class PlainTextEntityProcessor extends EntityProcessorBase {
ended = false;
}
+ @SuppressWarnings({"unchecked", "deprecation"})
@Override
public Map<String, Object> nextRow() {
if (ended) return null;
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/RegexTransformer.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/RegexTransformer.java
index 719decae906..9825d64d214 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/RegexTransformer.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/RegexTransformer.java
@@ -43,7 +43,7 @@ public class RegexTransformer extends Transformer {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Override
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
public Map<String, Object> transformRow(Map<String, Object> row,
Context ctx) {
List<Map<String, String>> fields = ctx.getAllEntityFields();
@@ -128,14 +128,13 @@ public class RegexTransformer extends Transformer {
}
}
- @SuppressWarnings("unchecked")
private List<String> readBySplit(String splitBy, String value) {
String[] vals = value.split(splitBy);
List<String> l = new ArrayList<>(Arrays.asList(vals));
return l;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
private Object readfromRegExp(String reStr, String value, String columnName, String gNames) {
String[] groupNames = null;
if(gNames != null && gNames.trim().length() >0){
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/TemplateTransformer.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/TemplateTransformer.java
index f655edd17d8..299550930ba 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/TemplateTransformer.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/TemplateTransformer.java
@@ -52,7 +52,6 @@ public class TemplateTransformer extends Transformer {
private Map<String ,List<String>> templateVsVars = new HashMap<>();
@Override
- @SuppressWarnings("unchecked")
public Object transformRow(Map<String, Object> row, Context context) {
@@ -94,6 +93,7 @@ public class TemplateTransformer extends Transformer {
return row;
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
private void addToRow(String key, Map<String, Object> row, Object value) {
Object prevVal = row.get(key);
if (prevVal != null) {
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java
index c93b581fdfc..addee547e17 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathEntityProcessor.java
@@ -100,6 +100,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
}
+ @SuppressWarnings("deprecation")
private void initXpathReader(VariableResolver resolver) {
reinitXPathReader = false;
useSolrAddXml = Boolean.parseBoolean(context
@@ -183,7 +184,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
}
}
String url = context.getEntityAttribute(URL);
- List<String> l = url == null ? Collections.EMPTY_LIST : resolver.getVariables(url);
+ List<String> l = url == null ? Collections.emptyList() : resolver.getVariables(url);
for (String s : l) {
if (s.startsWith(entityName + ".")) {
if (placeHolderVariables == null)
@@ -224,7 +225,6 @@ public class XPathEntityProcessor extends EntityProcessorBase {
readUsefulVars(r);
}
- @SuppressWarnings("unchecked")
private Map<String, Object> fetchNextRow() {
Map<String, Object> r = null;
while (true) {
@@ -283,6 +283,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
}
+ @SuppressWarnings("unchecked")
private void initQuery(String s) {
Reader data = null;
try {
@@ -355,6 +356,7 @@ public class XPathEntityProcessor extends EntityProcessorBase {
}
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
protected Map<String, Object> readRow(Map<String, Object> record, String xpath) {
if (useSolrAddXml) {
List<String> names = (List<String>) record.get("name");
@@ -391,7 +393,6 @@ public class XPathEntityProcessor extends EntityProcessorBase {
}
- @SuppressWarnings("unchecked")
private Map<String, Object> readUsefulVars(Map<String, Object> r) {
Object val = r.get(HAS_MORE);
if (val != null)
diff --git a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java
index 13daf49b085..db0fbeb76c0 100644
--- a/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java
+++ b/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java
@@ -585,6 +585,7 @@ public class XPathRecordReader {
* records values. If a fields value is a List then they have to be
* deep-copied for thread safety
*/
+ @SuppressWarnings("unchecked")
private static Map<String, Object> getDeepCopy(Map<String, Object> values) {
Map<String, Object> result = new HashMap<>();
for (Map.Entry<String, Object> entry : values.entrySet()) {
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHCacheTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHCacheTestCase.java
index 9a0f3a772e7..7a7b3ec88ca 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHCacheTestCase.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHCacheTestCase.java
@@ -81,7 +81,7 @@ public class AbstractDIHCacheTestCase {
}
@Override
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
public int compareTo(ControlData cd) {
Comparable c1 = (Comparable) data[0];
Comparable c2 = (Comparable) cd.data[0];
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java
index 5428e186a42..c8c94bfc03d 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDIHJdbcTestCase.java
@@ -24,7 +24,7 @@ import java.sql.Statement;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.apache.solr.request.LocalSolrQueryRequest;
import org.junit.After;
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
index 3674a3d58f1..2c4c4381a09 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractDataImportHandlerTestCase.java
@@ -115,6 +115,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
* @param extraParams any extra request parameters needed to be passed to DataImportHandler
* @throws Exception in case of any error
*/
+ @SuppressWarnings({"rawtypes", "unchecked"})
protected void runFullImport(String dataConfig, Map<String, String> extraParams) throws Exception {
HashMap<String, String> params = new HashMap<>();
params.put("command", "full-import");
@@ -134,7 +135,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
/**
* Helper for creating a Context instance. Useful for testing Transformers
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public static TestContext getContext(EntityProcessorWrapper parent,
VariableResolver resolver, DataSource parentDataSource,
String currProcess, final List<Map<String, String>> entityFields,
@@ -150,7 +151,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
* Strings at even index are keys, odd-index strings are values in the
* returned map
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public static Map createMap(Object... args) {
return Utils.makeMap(args);
}
@@ -216,6 +217,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
return delegate.getVariableResolver();
}
+ @SuppressWarnings("rawtypes")
@Override
public DataSource getDataSource() {
return delegate.getDataSource();
@@ -256,6 +258,7 @@ public abstract class AbstractDataImportHandlerTestCase extends
return delegate.getParentContext();
}
+ @SuppressWarnings("rawtypes")
@Override
public DataSource getDataSource(String name) {
return delegate.getDataSource(name);
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java
index 277404451c1..dc06fc28a48 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/AbstractSqlEntityProcessorTestCase.java
@@ -16,7 +16,7 @@
*/
package org.apache.solr.handler.dataimport;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.apache.solr.common.util.SuppressForbidden;
import org.junit.After;
import org.junit.Before;
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/MockInitialContextFactory.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/MockInitialContextFactory.java
index 756821027ed..b32660aae73 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/MockInitialContextFactory.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/MockInitialContextFactory.java
@@ -41,7 +41,6 @@ public class MockInitialContextFactory implements InitialContextFactory {
}
@Override
- @SuppressWarnings("unchecked")
public javax.naming.Context getInitialContext(Hashtable env) {
return context;
}
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestClobTransformer.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestClobTransformer.java
index fe00d491d04..215234b07cb 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestClobTransformer.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestClobTransformer.java
@@ -42,7 +42,7 @@ public class TestClobTransformer extends AbstractDataImportHandlerTestCase {
f.put(ClobTransformer.CLOB, "true");
f.put(DataImporter.NAME, "description");
flds.add(f);
- Context ctx = getContext(null, new VariableResolver(), null, Context.FULL_DUMP, flds, Collections.EMPTY_MAP);
+ Context ctx = getContext(null, new VariableResolver(), null, Context.FULL_DUMP, flds, Collections.emptyMap());
Transformer t = new ClobTransformer();
Map<String, Object> row = new HashMap<>();
Clob clob = (Clob) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{Clob.class}, new InvocationHandler() {
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
index 34e50e00c7e..b006665e991 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestContentStreamDataSource.java
@@ -65,6 +65,7 @@ public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCa
super.tearDown();
}
+ @SuppressWarnings("rawtypes")
@Test
public void testSimple() throws Exception {
DirectXmlRequest req = new DirectXmlRequest("/dataimport", xml);
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDataConfig.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDataConfig.java
index 7a56fd2f36e..1ea4a5ee160 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDataConfig.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDataConfig.java
@@ -42,7 +42,7 @@ public class TestDataConfig extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
public void testDataConfigWithDataSource() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder.java
index 7f7278e7d0b..0cbee682b9f 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder.java
@@ -51,6 +51,7 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
assertNotNull(clz);
}
+ @SuppressWarnings("unchecked")
@Test
public void singleEntityNoRows() {
DataImporter di = new DataImporter();
@@ -70,6 +71,7 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
assertEquals(0, di.getDocBuilder().importStatistics.rowsCount.get());
}
+ @SuppressWarnings("unchecked")
@Test
public void testDeltaImportNoRows_MustNotCommit() {
DataImporter di = new DataImporter();
@@ -92,6 +94,7 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
assertEquals(0, di.getDocBuilder().importStatistics.rowsCount.get());
}
+ @SuppressWarnings("unchecked")
@Test
public void singleEntityOneRow() {
DataImporter di = new DataImporter();
@@ -121,6 +124,7 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
}
}
+ @SuppressWarnings("unchecked")
@Test
public void testImportCommand() {
DataImporter di = new DataImporter();
@@ -150,6 +154,7 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
}
}
+ @SuppressWarnings("unchecked")
@Test
public void singleEntityMultipleRows() {
DataImporter di = new DataImporter();
@@ -182,6 +187,7 @@ public class TestDocBuilder extends AbstractDataImportHandlerTestCase {
assertEquals(3, di.getDocBuilder().importStatistics.rowsCount.get());
}
+ @SuppressWarnings("unchecked")
@Test
public void templateXPath() {
DataImporter di = new DataImporter();
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java
index 27865cd5e34..6279a23b73c 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestDocBuilder2.java
@@ -36,6 +36,7 @@ import java.nio.charset.StandardCharsets;
*
* @since solr 1.3
*/
+@SuppressWarnings({"unchecked", "rawtypes"})
public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
@BeforeClass
@@ -44,7 +45,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testSingleEntity() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
@@ -60,7 +60,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testSingleEntity_CaseInsensitive() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desC", "one"));
@@ -88,7 +87,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testDynamicFields() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
@@ -101,7 +99,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testRequestParamsAsVariable() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "101", "desc", "ApacheSolr"));
@@ -116,7 +113,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testDynamicFieldNames() throws Exception {
List rows = new ArrayList();
rows.add(createMap("mypk", "101", "text", "ApacheSolr"));
@@ -130,7 +126,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testRequestParamsAsFieldName() throws Exception {
List rows = new ArrayList();
rows.add(createMap("mypk", "101", "text", "ApacheSolr"));
@@ -145,7 +140,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testContext() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
@@ -155,7 +149,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testSkipDoc() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
@@ -169,7 +162,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testSkipRow() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
@@ -204,7 +196,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testStopTransform() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
@@ -219,7 +210,6 @@ public class TestDocBuilder2 extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testDeleteDocs() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestEphemeralCache.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestEphemeralCache.java
index ddccafeaa3e..351ec4654d2 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestEphemeralCache.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestEphemeralCache.java
@@ -44,7 +44,7 @@ public class TestEphemeralCache extends AbstractDataImportHandlerTestCase {
assertFullImport(getDataConfigDotXml());
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
private void setupMockData() {
List parentRows = new ArrayList();
parentRows.add(createMap("id", new BigDecimal("1"), "parent_s", "one"));
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestErrorHandling.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestErrorHandling.java
index 1ea1ad483a1..441125121ef 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestErrorHandling.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestErrorHandling.java
@@ -80,6 +80,7 @@ public class TestErrorHandling extends AbstractDataImportHandlerTestCase {
assertQ(req("*:*"), "//*[@numFound='0']");
}
+ @SuppressWarnings("unchecked")
public void testTransformerErrorContinue() throws Exception {
StringDataSource.xml = wellformedXml;
List<Map<String, Object>> rows = new ArrayList<>();
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFieldReader.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFieldReader.java
index 347a40bf1ab..fc57c14f975 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFieldReader.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFieldReader.java
@@ -31,6 +31,7 @@ import java.util.Map;
*/
public class TestFieldReader extends AbstractDataImportHandlerTestCase {
+ @SuppressWarnings("unchecked")
@Test
public void simple() {
DataImporter di = new DataImporter();
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java
index dd2cf72f642..6cbac9ae73c 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestFileListEntityProcessor.java
@@ -40,10 +40,10 @@ import org.junit.Test;
*
* @since solr 1.3
*/
+@SuppressWarnings({"unchecked", "rawtypes"})
public class TestFileListEntityProcessor extends AbstractDataImportHandlerTestCase {
@Test
- @SuppressWarnings("unchecked")
public void testSimple() throws IOException {
File tmpdir = createTempDir().toFile();
@@ -119,7 +119,6 @@ public class TestFileListEntityProcessor extends AbstractDataImportHandlerTestCa
assertEquals(l, new HashSet<>(fList));
}
- @SuppressWarnings("unchecked")
static List<String> getFiles(VariableResolver resolver, Map attrs) {
Context c = getContext(null,
resolver, null, Context.FULL_DUMP, Collections.EMPTY_LIST, attrs);
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestJdbcDataSourceConvertType.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestJdbcDataSourceConvertType.java
index 94f437c3709..80436a84e2d 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestJdbcDataSourceConvertType.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestJdbcDataSourceConvertType.java
@@ -30,6 +30,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Properties;
+@SuppressWarnings("deprecation")
@ThreadLeakAction({ThreadLeakAction.Action.WARN})
@ThreadLeakLingering(linger = 0)
@ThreadLeakZombies(ThreadLeakZombies.Consequence.CONTINUE)
@@ -48,6 +49,7 @@ public class TestJdbcDataSourceConvertType extends AbstractDataImportHandlerTest
convertTypeTest("true", Long.class);
}
+ @SuppressWarnings("rawtypes")
private void convertTypeTest(String convertType, Class resultClass) throws Throwable {
JdbcDataSource dataSource = new JdbcDataSource();
Properties p = new Properties();
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
index eb9989c181a..f8a65087880 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestLineEntityProcessor.java
@@ -31,6 +31,7 @@ import java.util.*;
*/
public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
+ @SuppressWarnings({"rawtypes", "unchecked"})
@Test
/************************************************************************/
public void testSimple() throws IOException {
@@ -53,7 +54,7 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
new VariableResolver(), //resolver
getDataSource(filecontents), //parentDataSource
Context.FULL_DUMP, //currProcess
- Collections.EMPTY_LIST, //entityFields
+ Collections.emptyList(), //entityFields
attrs //entityAttrs
);
LineEntityProcessor ep = new LineEntityProcessor();
@@ -71,6 +72,7 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
assertEquals(24, fList.size());
}
+ @SuppressWarnings("rawtypes")
@Test
/************************************************************************/
public void testOnly_xml_files() throws IOException {
@@ -88,12 +90,13 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
LineEntityProcessor.SKIP_LINE_REGEX, null
);
+ @SuppressWarnings("unchecked")
Context c = getContext(
null, //parentEntity
new VariableResolver(), //resolver
getDataSource(filecontents), //parentDataSource
Context.FULL_DUMP, //currProcess
- Collections.EMPTY_LIST, //entityFields
+ Collections.emptyList(), //entityFields
attrs //entityAttrs
);
LineEntityProcessor ep = new LineEntityProcessor();
@@ -109,6 +112,7 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
assertEquals(5, fList.size());
}
+ @SuppressWarnings("rawtypes")
@Test
/************************************************************************/
public void testOnly_xml_files_no_xsd() throws IOException {
@@ -126,12 +130,13 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
LineEntityProcessor.SKIP_LINE_REGEX, "\\.xsd"
);
+ @SuppressWarnings("unchecked")
Context c = getContext(
null, //parentEntity
new VariableResolver(), //resolver
getDataSource(filecontents), //parentDataSource
Context.FULL_DUMP, //currProcess
- Collections.EMPTY_LIST, //entityFields
+ Collections.emptyList(), //entityFields
attrs //entityAttrs
);
LineEntityProcessor ep = new LineEntityProcessor();
@@ -147,6 +152,7 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
assertEquals(4, fList.size());
}
+ @SuppressWarnings("rawtypes")
@Test
/************************************************************************/
public void testNo_xsd_files() throws IOException {
@@ -162,12 +168,13 @@ public class TestLineEntityProcessor extends AbstractDataImportHandlerTestCase {
LineEntityProcessor.SKIP_LINE_REGEX, "\\.xsd"
);
+ @SuppressWarnings("unchecked")
Context c = getContext(
null, //parentEntity
new VariableResolver(), //resolver
getDataSource(filecontents), //parentDataSource
Context.FULL_DUMP, //currProcess
- Collections.EMPTY_LIST, //entityFields
+ Collections.emptyList(), //entityFields
attrs //entityAttrs
);
LineEntityProcessor ep = new LineEntityProcessor();
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
index 23854382dde..be9eb4b902f 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestPlainTextEntityProcessor.java
@@ -39,6 +39,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
* @since solr 1.4
*/
public class TestPlainTextEntityProcessor extends AbstractDataImportHandlerTestCase {
+ @SuppressWarnings("unchecked")
@Test
public void testSimple() throws IOException {
DataImporter di = new DataImporter();
@@ -114,6 +115,7 @@ public class TestPlainTextEntityProcessor extends AbstractDataImportHandlerTestC
}
}
+ @SuppressWarnings("unchecked")
@Test
public void testSimple2() throws IOException {
DataImporter di = new DataImporter();
@@ -148,6 +150,7 @@ public class TestPlainTextEntityProcessor extends AbstractDataImportHandlerTestC
}
+ @SuppressWarnings("rawtypes")
public static class DS extends DataSource {
static String s = "hello world";
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestRegexTransformer.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestRegexTransformer.java
index e792804634f..0d4971ddd6a 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestRegexTransformer.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestRegexTransformer.java
@@ -36,6 +36,7 @@ import java.util.Map;
*/
public class TestRegexTransformer extends AbstractDataImportHandlerTestCase {
+ @SuppressWarnings("rawtypes")
@Test
public void testCommaSeparated() {
List<Map<String, String>> fields = new ArrayList<>();
@@ -52,6 +53,7 @@ public class TestRegexTransformer extends AbstractDataImportHandlerTestCase {
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
@Test
public void testGroupNames() {
List<Map<String, String>> fields = new ArrayList<>();
@@ -114,6 +116,7 @@ public class TestRegexTransformer extends AbstractDataImportHandlerTestCase {
assertEquals("valueWithoutSpaces", result.get("title_underscore")); // value should be returned as-is
}
+ @SuppressWarnings("unchecked")
@Test
public void testMileage() {
// init a whole pile of fields
@@ -163,6 +166,7 @@ public class TestRegexTransformer extends AbstractDataImportHandlerTestCase {
assertEquals("Fuel Economy range: 26 mpg Hwy, 19 mpg City", result.get("t3"));
}
+ @SuppressWarnings("unchecked")
@Test
public void testMultiValuedRegex(){
List<Map<String, String>> fields = new ArrayList<>();
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestScriptTransformer.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestScriptTransformer.java
index c106f8e5a5d..3262bfd59c8 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestScriptTransformer.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestScriptTransformer.java
@@ -35,6 +35,7 @@ import java.util.Map;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class TestScriptTransformer extends AbstractDataImportHandlerTestCase {
@Test
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorUnit.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorUnit.java
index a2a9fffa9ab..19162108023 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorUnit.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSolrEntityProcessorUnit.java
@@ -27,6 +27,7 @@ import org.junit.Test;
/**
* Unit test of SolrEntityProcessor. A very basic test outside of the DIH.
*/
+@SuppressWarnings("rawtypes")
public class TestSolrEntityProcessorUnit extends AbstractDataImportHandlerTestCase {
private static final class NoNextMockProcessor extends SolrEntityProcessor {
@@ -66,6 +67,7 @@ public class TestSolrEntityProcessorUnit extends AbstractDataImportHandlerTestCa
}
}
+ @SuppressWarnings("serial")
private MockSolrEntityProcessor createAndInit(List<Doc> docs, int rowsNum) {
MockSolrEntityProcessor processor = new MockSolrEntityProcessor(docs, rowsNum);
HashMap<String,String> entityAttrs = new HashMap<String,String>(){{put(SolrEntityProcessor.SOLR_SERVER,"http://route:66/no");}};
@@ -97,6 +99,7 @@ public class TestSolrEntityProcessorUnit extends AbstractDataImportHandlerTestCa
processor.destroy();
}
}
+ @SuppressWarnings("serial")
@Test (expected = DataImportHandlerException.class)
public void testNoQuery() {
SolrEntityProcessor processor = new SolrEntityProcessor();
@@ -111,6 +114,7 @@ public class TestSolrEntityProcessorUnit extends AbstractDataImportHandlerTestCa
}
}
+ @SuppressWarnings("serial")
public void testPagingQuery() {
SolrEntityProcessor processor = new NoNextMockProcessor() ;
@@ -135,6 +139,7 @@ public class TestSolrEntityProcessorUnit extends AbstractDataImportHandlerTestCa
}
}
+ @SuppressWarnings("serial")
public void testCursorQuery() {
SolrEntityProcessor processor = new NoNextMockProcessor() ;
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSortedMapBackedCache.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSortedMapBackedCache.java
index 7b0e613ea75..8d6a5c602a5 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSortedMapBackedCache.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSortedMapBackedCache.java
@@ -105,6 +105,7 @@ public class TestSortedMapBackedCache extends AbstractDIHCacheTestCase {
}
}
+ @SuppressWarnings("unused")
@Test
public void testCacheReopensWithUpdate() {
DIHCache cache = null;
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestTemplateTransformer.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestTemplateTransformer.java
index b5c38117ac3..b1898954c3c 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestTemplateTransformer.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestTemplateTransformer.java
@@ -31,10 +31,10 @@ import java.util.Arrays;
*
* @since solr 1.3
*/
+@SuppressWarnings({"unchecked", "rawtypes"})
public class TestTemplateTransformer extends AbstractDataImportHandlerTestCase {
@Test
- @SuppressWarnings("unchecked")
public void testTransformRow() {
List fields = new ArrayList();
fields.add(createMap("column", "firstName"));
@@ -71,7 +71,6 @@ public class TestTemplateTransformer extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
public void testTransformRowMultiValue() {
List fields = new ArrayList();
fields.add(createMap("column", "year"));
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolver.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolver.java
index 00285649fe6..1431de209a6 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolver.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolver.java
@@ -147,7 +147,7 @@ public class TestVariableResolver extends AbstractDataImportHandlerTestCase {
l.add(m);
resolver.setEvaluators(new DataImporter().getEvaluators(l));
ContextImpl context = new ContextImpl(null, resolver, null,
- Context.FULL_DUMP, Collections.EMPTY_MAP, null, null);
+ Context.FULL_DUMP, Collections.emptyMap(), null, null);
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ROOT);
format.setTimeZone(TimeZone.getTimeZone("UTC"));
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolverEndToEnd.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolverEndToEnd.java
index 8ee6878c0ee..78477103fb8 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolverEndToEnd.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestVariableResolverEndToEnd.java
@@ -23,7 +23,7 @@ import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.apache.solr.request.SolrQueryRequest;
import org.junit.Test;
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestWriterImpl.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestWriterImpl.java
index e5c2a949f25..c56d658ac3f 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestWriterImpl.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestWriterImpl.java
@@ -41,7 +41,7 @@ public class TestWriterImpl extends AbstractDataImportHandlerTestCase {
}
@Test
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "rawtypes"})
public void testDataConfigWithDataSource() throws Exception {
List rows = new ArrayList();
rows.add(createMap("id", "1", "desc", "one"));
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
index 72da77a60ba..62f638d2bc9 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathEntityProcessor.java
@@ -36,6 +36,7 @@ import org.junit.Test;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class TestXPathEntityProcessor extends AbstractDataImportHandlerTestCase {
boolean simulateSlowReader;
boolean simulateSlowResultProcessor;
@@ -93,7 +94,6 @@ public class TestXPathEntityProcessor extends AbstractDataImportHandlerTestCase
assertEquals("ü", l.get(2));
}
- @SuppressWarnings({"rawtypes", "unchecked"})
@Test
public void testMultiValuedWithMultipleDocuments() throws Exception {
Map entityAttrs = createMap("name", "e", "url", "testdata.xml", XPathEntityProcessor.FOR_EACH, "/documents/doc");
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathRecordReader.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathRecordReader.java
index 2b0757a4ac9..47409fc1d30 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathRecordReader.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestXPathRecordReader.java
@@ -29,6 +29,7 @@ import org.junit.Test;
*
* @since solr 1.3
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class TestXPathRecordReader extends AbstractDataImportHandlerTestCase {
@Test
public void testBasic() {
diff --git a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java
index 9279d282753..0476a448ad4 100644
--- a/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java
+++ b/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestZKPropertiesWriter.java
@@ -93,6 +93,7 @@ public class TestZKPropertiesWriter extends AbstractDataImportHandlerTestCase {
zkDir = null;
}
+ @SuppressWarnings({"unchecked", "rawtypes"})
@SuppressForbidden(reason = "Needs currentTimeMillis to construct date stamps")
@Test
public void testZKPropertiesWriter() throws Exception {
diff --git a/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java b/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
index cd5d4af576f..8cc63135e57 100644
--- a/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
+++ b/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingDocumentLoader.java
@@ -51,10 +51,6 @@ import org.apache.tika.sax.XHTMLContentHandler;
import org.apache.tika.sax.xpath.Matcher;
import org.apache.tika.sax.xpath.MatchingContentHandler;
import org.apache.tika.sax.xpath.XPathParser;
-import org.apache.xml.serialize.BaseMarkupSerializer;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.TextSerializer;
-import org.apache.xml.serialize.XMLSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.ContentHandler;
@@ -131,6 +127,7 @@ public class ExtractingDocumentLoader extends ContentStreamLoader {
doAdd(handler, templateAdd);
}
+ @SuppressWarnings({"deprecation", "unchecked", "rawtypes"})
@Override
public void load(SolrQueryRequest req, SolrQueryResponse rsp,
ContentStream stream, UpdateRequestProcessor processor) throws Exception {
@@ -176,16 +173,16 @@ public class ExtractingDocumentLoader extends ContentStreamLoader {
ContentHandler parsingHandler = handler;
StringWriter writer = null;
- BaseMarkupSerializer serializer = null;
+ org.apache.xml.serialize.BaseMarkupSerializer serializer = null;
if (extractOnly == true) {
String extractFormat = params.get(ExtractingParams.EXTRACT_FORMAT, "xml");
writer = new StringWriter();
if (extractFormat.equals(TEXT_FORMAT)) {
- serializer = new TextSerializer();
+ serializer = new org.apache.xml.serialize.TextSerializer();
serializer.setOutputCharStream(writer);
- serializer.setOutputFormat(new OutputFormat("Text", "UTF-8", true));
+ serializer.setOutputFormat(new org.apache.xml.serialize.OutputFormat("Text", "UTF-8", true));
} else {
- serializer = new XMLSerializer(writer, new OutputFormat("XML", "UTF-8", true));
+ serializer = new org.apache.xml.serialize.XMLSerializer(writer, new org.apache.xml.serialize.OutputFormat("XML", "UTF-8", true));
}
if (xpathExpr != null) {
Matcher matcher =
diff --git a/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java b/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
index 3af9b5b5aa8..dfa068b5cc6 100644
--- a/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
+++ b/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
@@ -55,7 +55,7 @@ public class ExtractingRequestHandler extends ContentStreamHandlerBase implement
}
@Override
- public void init(NamedList args) {
+ public void init(@SuppressWarnings("rawtypes") NamedList args) {
super.init(args);
}
diff --git a/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/XLSXResponseWriter.java b/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/XLSXResponseWriter.java
index 9264a1d97e5..aa65ad8963a 100644
--- a/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/XLSXResponseWriter.java
+++ b/solr/contrib/extraction/src/java/org/apache/solr/handler/extraction/XLSXResponseWriter.java
@@ -85,6 +85,7 @@ public class XLSXResponseWriter extends RawResponseWriter {
}
}
+@SuppressWarnings("rawtypes")
class XLSXWriter extends TabularResponseWriter {
static class SerialWriteWorkbook {
@@ -144,7 +145,6 @@ class XLSXWriter extends TabularResponseWriter {
} catch (IOException e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
- String stacktrace = sw.toString();
}finally {
swb.dispose();
}
@@ -232,6 +232,7 @@ class XLSXWriter extends TabularResponseWriter {
//NOTE: a document cannot currently contain another document
List tmpList;
+ @SuppressWarnings({"unchecked"})
@Override
public void writeSolrDocument(String name, SolrDocument doc, ReturnFields returnFields, int idx ) throws IOException {
if (tmpList == null) {
diff --git a/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java b/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
index 14de8422ee1..96152f0a9db 100644
--- a/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
+++ b/solr/contrib/extraction/src/test/org/apache/solr/handler/extraction/ExtractingRequestHandlerTest.java
@@ -461,6 +461,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
// Note: If you load a plain text file specifying neither MIME type nor filename, extraction will silently fail. This is because Tika's
// automatic MIME type detection will fail, and it will default to using an empty-string-returning default parser
+ @SuppressWarnings("rawtypes")
@Test
public void testExtractOnly() throws Exception {
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
@@ -498,6 +499,7 @@ public class ExtractingRequestHandlerTest extends SolrTestCaseJ4 {
}
+ @SuppressWarnings("rawtypes")
@Test
public void testXPath() throws Exception {
ExtractingRequestHandler handler = (ExtractingRequestHandler) h.getCore().getRequestHandler("/update/extract");
diff --git a/solr/contrib/langid/src/java/org/apache/solr/update/processor/OpenNLPLangDetectUpdateProcessorFactory.java b/solr/contrib/langid/src/java/org/apache/solr/update/processor/OpenNLPLangDetectUpdateProcessorFactory.java
index b4e0253e235..dd42e3caac0 100644
--- a/solr/contrib/langid/src/java/org/apache/solr/update/processor/OpenNLPLangDetectUpdateProcessorFactory.java
+++ b/solr/contrib/langid/src/java/org/apache/solr/update/processor/OpenNLPLangDetectUpdateProcessorFactory.java
@@ -60,6 +60,7 @@ public class OpenNLPLangDetectUpdateProcessorFactory extends UpdateRequestProces
protected SolrParams invariants;
private SolrResourceLoader solrResourceLoader;
+ @SuppressWarnings("rawtypes")
@Override
public void init( NamedList args )
{
@@ -107,6 +108,7 @@ public class OpenNLPLangDetectUpdateProcessorFactory extends UpdateRequestProces
return new OpenNLPLangDetectUpdateProcessor(req, rsp, next, model);
}
+ @SuppressWarnings("deprecation")
private void loadModel() throws IOException {
InputStream is = null;
try{
diff --git a/solr/contrib/langid/src/java/org/apache/solr/update/processor/TikaLanguageIdentifierUpdateProcessor.java b/solr/contrib/langid/src/java/org/apache/solr/update/processor/TikaLanguageIdentifierUpdateProcessor.java
index 5a43bd52e79..75d175c6472 100644
--- a/solr/contrib/langid/src/java/org/apache/solr/update/processor/TikaLanguageIdentifierUpdateProcessor.java
+++ b/solr/contrib/langid/src/java/org/apache/solr/update/processor/TikaLanguageIdentifierUpdateProcessor.java
@@ -23,7 +23,6 @@ import java.util.List;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.SolrQueryResponse;
-import org.apache.tika.language.LanguageIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,12 +43,13 @@ public class TikaLanguageIdentifierUpdateProcessor extends LanguageIdentifierUpd
super(req, rsp, next);
}
+ @SuppressWarnings("deprecation")
@Override
protected List<DetectedLanguage> detectLanguage(Reader solrDocReader) {
String content = SolrInputDocumentReader.asString(solrDocReader);
List<DetectedLanguage> languages = new ArrayList<>();
if (content.length() != 0) {
- LanguageIdentifier identifier = new LanguageIdentifier(content);
+ org.apache.tika.language.LanguageIdentifier identifier = new org.apache.tika.language.LanguageIdentifier(content);
// FIXME: Hack - we get the distance from toString and calculate our own certainty score
Double distance = Double.parseDouble(tikaSimilarityPattern.matcher(identifier.toString()).replaceFirst("$1"));
// This formula gives: 0.02 => 0.8, 0.1 => 0.5 which is a better sweetspot than isReasonablyCertain()
diff --git a/solr/contrib/langid/src/test/org/apache/solr/update/processor/LanguageIdentifierUpdateProcessorFactoryTestCase.java b/solr/contrib/langid/src/test/org/apache/solr/update/processor/LanguageIdentifierUpdateProcessorFactoryTestCase.java
index a74c80fea77..efb4f257ef2 100644
--- a/solr/contrib/langid/src/test/org/apache/solr/update/processor/LanguageIdentifierUpdateProcessorFactoryTestCase.java
+++ b/solr/contrib/langid/src/test/org/apache/solr/update/processor/LanguageIdentifierUpdateProcessorFactoryTestCase.java
@@ -384,6 +384,7 @@ public abstract class LanguageIdentifierUpdateProcessorFactoryTestCase extends S
/*
Utility test method to process a clone of a document
*/
+ @SuppressWarnings("rawtypes")
private SolrInputDocument process(SolrInputDocument origDoc) {
SolrInputDocument modifiedDoc = origDoc.deepCopy();
if (random().nextBoolean()) {
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java
index e1426106c9e..9d709956970 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/LTRThreadModule.java
@@ -57,6 +57,7 @@ import org.apache.solr.util.plugin.NamedListInitializedPlugin;
* <code>totalPoolThreads</code> imposes a contention between the queries if
* <code>(totalPoolThreads &lt; numThreadsPerRequest * total parallel queries)</code>.
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
final public class LTRThreadModule extends CloseHook implements NamedListInitializedPlugin {
public static LTRThreadModule getInstance(NamedList args) {
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
index 908b0735cc7..0c33daf9189 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/LinearModel.java
@@ -78,6 +78,7 @@ public class LinearModel extends LTRScoringModel {
*/
protected Float[] featureToWeight;
+ @SuppressWarnings("unchecked")
public void setWeights(Object weights) {
final Map<String,Double> modelWeights = (Map<String,Double>) weights;
for (int ii = 0; ii < features.size(); ++ii) {
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/MultipleAdditiveTreesModel.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/MultipleAdditiveTreesModel.java
index c3e434ba013..2587eed0b2c 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/MultipleAdditiveTreesModel.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/MultipleAdditiveTreesModel.java
@@ -88,6 +88,7 @@ import org.apache.solr.util.SolrPluginUtils;
* Advances in Neural Information Processing Systems (NIPS), 2007.</a>
* </ul>
*/
+@SuppressWarnings("unchecked")
public class MultipleAdditiveTreesModel extends LTRScoringModel {
/**
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/NeuralNetworkModel.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/NeuralNetworkModel.java
index d72b29b8120..e46b7d4cac5 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/NeuralNetworkModel.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/model/NeuralNetworkModel.java
@@ -92,6 +92,7 @@ import org.apache.solr.util.SolrPluginUtils;
* Proceedings of the 22nd International Conference on Machine Learning (ICML), ACM, 2005.</a>
* </ul>
*/
+@SuppressWarnings("unchecked")
public class NeuralNetworkModel extends LTRScoringModel {
/**
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java
index c6c4d7bff64..cc9246f1909 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java
@@ -110,6 +110,7 @@ public class LTRFeatureLoggerTransformerFactory extends TransformerFactory {
this.csvFeatureSeparator = csvFeatureSeparator.charAt(0);
}
+ @SuppressWarnings("unchecked")
@Override
public void init(@SuppressWarnings("rawtypes") NamedList args) {
super.init(args);
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/search/LTRQParserPlugin.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/search/LTRQParserPlugin.java
index af9977538ca..e9e8a53cae3 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/search/LTRQParserPlugin.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/search/LTRQParserPlugin.java
@@ -78,6 +78,7 @@ public class LTRQParserPlugin extends QParserPlugin implements ResourceLoaderAwa
**/
public static final String RERANK_DOCS = "reRankDocs";
+ @SuppressWarnings("unchecked")
@Override
public void init(@SuppressWarnings("rawtypes") NamedList args) {
super.init(args);
diff --git a/solr/contrib/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java b/solr/contrib/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java
index 60cabccab55..f735fc9d9d4 100644
--- a/solr/contrib/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java
+++ b/solr/contrib/ltr/src/java/org/apache/solr/ltr/store/rest/ManagedModelStore.java
@@ -105,7 +105,6 @@ public class ManagedModelStore extends ManagedResource implements ManagedResourc
private Object managedData;
- @SuppressWarnings("unchecked")
@Override
protected void onManagedDataLoadedFromStorage(NamedList<?> managedInitArgs,
Object managedData) throws SolrException {
@@ -119,6 +118,7 @@ public class ManagedModelStore extends ManagedResource implements ManagedResourc
}
+ @SuppressWarnings("unchecked")
public void loadStoredModels() {
log.info("------ managed models ~ loading ------");
diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestFeatureExtractionFromMultipleSegments.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestFeatureExtractionFromMultipleSegments.java
index a15178bd007..0ef1d40ef67 100644
--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestFeatureExtractionFromMultipleSegments.java
+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestFeatureExtractionFromMultipleSegments.java
@@ -78,6 +78,7 @@ public class TestFeatureExtractionFromMultipleSegments extends TestRerankBase {
aftertest();
}
+ @SuppressWarnings("unchecked")
@Test
public void testFeatureExtractionFromMultipleSegments() throws Exception {
diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestNoMatchSolrFeature.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestNoMatchSolrFeature.java
index 48c1262c547..0c78d25564e 100644
--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestNoMatchSolrFeature.java
+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestNoMatchSolrFeature.java
@@ -83,6 +83,7 @@ public class TestNoMatchSolrFeature extends TestRerankBase {
aftertest();
}
+ @SuppressWarnings("unchecked")
@Test
public void test2NoMatch1YesMatchFeatureReturnsFvWith1FeatureAndDocScoreScaledByModel() throws Exception {
// Tests model with all no matching features but 1
@@ -149,6 +150,7 @@ public class TestNoMatchSolrFeature extends TestRerankBase {
assertJQ("/query" + query.toQueryString(), "/response/docs/[3]/fv=='"+docs3fv_default_csv+"'");
}
+ @SuppressWarnings("unchecked")
@Test
public void test1NoMatchFeatureReturnsFvWith1MatchingFeatureFromStoreAndDocWith0Score() throws Exception {
// Tests model with all no matching features, but 1 feature store feature matching for extraction
diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java
index 8ff56842605..b3e005a196e 100644
--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java
+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestOriginalScoreFeature.java
@@ -75,6 +75,7 @@ public class TestOriginalScoreFeature extends TestRerankBase {
implTestOriginalScoreResponseDocsCheck("origScore", "origScore", "c2", "2.0");
}
+ @SuppressWarnings("unchecked")
public static void implTestOriginalScoreResponseDocsCheck(String modelName,
String origScoreFeatureName,
String nonScoringFeatureName, String nonScoringFeatureValue) throws Exception {
diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestNeuralNetworkModel.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestNeuralNetworkModel.java
index 045c625a218..9b0bbe861e3 100644
--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestNeuralNetworkModel.java
+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/model/TestNeuralNetworkModel.java
@@ -314,6 +314,7 @@ public class TestNeuralNetworkModel extends TestRerankBase {
}
}
+ @SuppressWarnings("unchecked")
@Override
protected Layer createLayer(Object o) {
final DefaultLayer layer = new DefaultLayer();
diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/store/rest/TestModelManagerPersistence.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/store/rest/TestModelManagerPersistence.java
index 0e829e68d95..ad33b0a0eae 100644
--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/store/rest/TestModelManagerPersistence.java
+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/store/rest/TestModelManagerPersistence.java
@@ -51,6 +51,7 @@ public class TestModelManagerPersistence extends TestRerankBase {
}
// executed first
+ @SuppressWarnings("unchecked")
@Test
public void testFeaturePersistence() throws Exception {
diff --git a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQuery.java b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQuery.java
index 9e79f7db1e4..621ef5cb61b 100644
--- a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQuery.java
+++ b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQuery.java
@@ -88,6 +88,7 @@ public class MetricsQuery {
return jsonQueries;
}
+ @SuppressWarnings({"rawtypes", "unchecked"})
public static List<MetricsQuery> from(Node node) throws JsonQueryException {
List<MetricsQuery> metricsQueries = new ArrayList<>();
diff --git a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/PrometheusExporterSettings.java b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/PrometheusExporterSettings.java
index 85f0ec8362f..12214c91f03 100644
--- a/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/PrometheusExporterSettings.java
+++ b/solr/contrib/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/PrometheusExporterSettings.java
@@ -56,11 +56,13 @@ public class PrometheusExporterSettings {
}
+ @SuppressWarnings("rawtypes")
public static PrometheusExporterSettings from(Node settings) {
NamedList config = DOMUtil.childNodesToNamedList(settings);
Builder builder = builder();
+ @SuppressWarnings("unchecked")
List<NamedList> httpClientSettings = config.getAll("httpClients");
for (NamedList entry : httpClientSettings) {
diff --git a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterTestBase.java b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterTestBase.java
index a390be1f62f..6d6954f118c 100644
--- a/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterTestBase.java
+++ b/solr/contrib/prometheus-exporter/src/test/org/apache/solr/prometheus/exporter/SolrExporterTestBase.java
@@ -47,6 +47,7 @@ public class SolrExporterTestBase extends PrometheusExporterTestBase {
private CloseableHttpClient httpClient;
private int promtheusExporterPort;
+ @SuppressWarnings("deprecation")
@Override
@After
public void tearDown() throws Exception {
diff --git a/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java b/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
index 6279ee3dd11..92aec88d566 100644
--- a/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
+++ b/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
@@ -18,7 +18,6 @@ package org.apache.solr.response;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringWriter;
import java.io.Writer;
@@ -58,6 +57,7 @@ import org.slf4j.LoggerFactory;
import static org.apache.solr.common.params.CommonParams.SORT;
+@SuppressWarnings("rawtypes")
public class VelocityResponseWriter implements QueryResponseWriter, SolrCoreAware {
// init param names, these are _only_ loaded at init time (no per-request control of these)
// - multiple different named writers could be created with different init params
@@ -128,7 +128,6 @@ public class VelocityResponseWriter implements QueryResponseWriter, SolrCoreAwar
public void inform(SolrCore core) {
// need to leverage SolrResourceLoader, so load init.properties.file here instead of init()
if (initPropertiesFileName != null) {
- InputStream is = null;
try {
velocityInitProps.load(new InputStreamReader(core.getResourceLoader().openResource(initPropertiesFileName), StandardCharsets.UTF_8));
} catch (IOException e) {
@@ -195,6 +194,7 @@ public class VelocityResponseWriter implements QueryResponseWriter, SolrCoreAwar
}
}
+ @SuppressWarnings("unchecked")
private VelocityContext createContext(SolrQueryRequest request, SolrQueryResponse response) {
VelocityContext context = new VelocityContext();
diff --git a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
index 456daeead3f..2e2c6d05753 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
@@ -19,13 +19,13 @@ package org.apache.solr.cloud;
import java.io.Closeable;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
-import org.apache.hadoop.fs.Path;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.solr.cloud.overseer.OverseerAction;
import org.apache.solr.common.SolrException;
@@ -137,7 +137,7 @@ class ShardLeaderElectionContextBase extends ElectionContext {
this.shardId = shardId;
this.collection = collection;
- String parent = new Path(leaderPath).getParent().toString();
+ String parent = Paths.get(leaderPath).getParent().toString();
ZkCmdExecutor zcmd = new ZkCmdExecutor(30000);
// only if /collections/{collection} exists already do we succeed in creating this path
log.info("make sure parent is created {}", parent);
@@ -163,7 +163,7 @@ class ShardLeaderElectionContextBase extends ElectionContext {
// version whenever a leader registers.
log.debug("Removing leader registration node on cancel: {} {}", leaderPath, leaderZkNodeParentVersion);
List<Op> ops = new ArrayList<>(2);
- ops.add(Op.check(new Path(leaderPath).getParent().toString(), leaderZkNodeParentVersion));
+ ops.add(Op.check(Paths.get(leaderPath).getParent().toString(), leaderZkNodeParentVersion));
ops.add(Op.delete(leaderPath, -1));
zkClient.multi(ops, true);
} catch (KeeperException.NoNodeException nne) {
@@ -189,7 +189,7 @@ class ShardLeaderElectionContextBase extends ElectionContext {
throws KeeperException, InterruptedException, IOException {
// register as leader - if an ephemeral is already there, wait to see if it goes away
- String parent = new Path(leaderPath).getParent().toString();
+ String parent = Paths.get(leaderPath).getParent().toString();
try {
RetryUtil.retryOnThrowable(NodeExistsException.class, 60000, 5000, () -> {
synchronized (lock) {
diff --git a/solr/core/src/java/org/apache/solr/legacy/BBoxValueSource.java b/solr/core/src/java/org/apache/solr/legacy/BBoxValueSource.java
index 516f20714db..31064117c74 100644
--- a/solr/core/src/java/org/apache/solr/legacy/BBoxValueSource.java
+++ b/solr/core/src/java/org/apache/solr/legacy/BBoxValueSource.java
@@ -46,6 +46,7 @@ class BBoxValueSource extends ShapeValuesSource {
return "bboxShape(" + strategy.getFieldName() + ")";
}
+ @SuppressWarnings("deprecation")
@Override
public ShapeValues getValues(LeafReaderContext readerContext) throws IOException {
diff --git a/solr/core/src/java/org/apache/solr/parser/CharStream.java b/solr/core/src/java/org/apache/solr/parser/CharStream.java
index 9bec5a6e9d5..0400af47e05 100644
--- a/solr/core/src/java/org/apache/solr/parser/CharStream.java
+++ b/solr/core/src/java/org/apache/solr/parser/CharStream.java
@@ -27,6 +27,22 @@ interface CharStream {
*/
char readChar() throws java.io.IOException;
+ @Deprecated
+ /**
+ * Returns the column position of the character last read.
+ * @deprecated
+ * @see #getEndColumn
+ */
+ int getColumn();
+
+ @Deprecated
+ /**
+ * Returns the line number of the character last read.
+ * @deprecated
+ * @see #getEndLine
+ */
+ int getLine();
+
/**
* Returns the column number of the last character for current token (being
* matched after the last call to BeginTOken).
diff --git a/solr/core/src/java/org/apache/solr/parser/FastCharStream.java b/solr/core/src/java/org/apache/solr/parser/FastCharStream.java
index b9cb27abd9d..bc5d815d2ec 100644
--- a/solr/core/src/java/org/apache/solr/parser/FastCharStream.java
+++ b/solr/core/src/java/org/apache/solr/parser/FastCharStream.java
@@ -126,4 +126,26 @@ public final class FastCharStream implements CharStream {
public final int getBeginLine() {
return 1;
}
+
+ @Override
+ @Deprecated
+ /**
+ * Returns the column position of the character last read.
+ * @deprecated
+ * @see #getEndColumn
+ */
+ public int getColumn() {
+ return 1;
+ }
+
+ @Override
+ @Deprecated
+ /**
+ * Returns the line number of the character last read.
+ * @deprecated
+ * @see #getEndLine
+ */
+ public int getLine() {
+ return 1;
+ }
}
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java b/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java
index 16676431a1f..b98a45d2969 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParserTokenManager.java
@@ -2,10 +2,12 @@
package org.apache.solr.parser;
/** Token Manager. */
+@SuppressWarnings("cast")
public class QueryParserTokenManager implements QueryParserConstants
{
int commentNestingDepth ;
+
private final int jjStopStringLiteralDfa_3(int pos, long active0)
{
switch (pos)
@@ -1328,9 +1330,9 @@ private int jjMoveNfa_1(int startState, int curPos)
}
}
static final int[] jjnextStates = {
- 32, 34, 35, 31, 36, 17, 18, 20, 56, 59, 25, 60, 57, 59, 25, 60,
- 22, 23, 38, 39, 46, 38, 39, 40, 46, 38, 39, 41, 49, 54, 46, 42,
- 43, 45, 50, 51, 53, 38, 39, 54, 46, 58, 61, 29, 2, 4, 5,
+ 32, 34, 35, 31, 36, 17, 18, 20, 56, 59, 25, 60, 57, 59, 25, 60,
+ 22, 23, 38, 39, 46, 38, 39, 40, 46, 38, 39, 41, 49, 54, 46, 42,
+ 43, 45, 50, 51, 53, 38, 39, 54, 46, 58, 61, 29, 2, 4, 5,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
@@ -1371,9 +1373,9 @@ private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, lo
/** Token literal values. */
public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, null, null, null, null,
-null, null, null, "\53", "\55", null, "\50", "\51", "\72", "\52", "\136", null, null,
-null, null, null, null, "\133", "\173", null, "\146\151\154\164\145\162\50", null,
+"", null, null, null, null, null, null, null, null, null, null, null, null,
+null, null, null, "\53", "\55", null, "\50", "\51", "\72", "\52", "\136", null, null,
+null, null, null, null, "\133", "\173", null, "\146\151\154\164\145\162\50", null,
"\124\117", "\135", "\175", null, null, };
/** Lexer state names. */
@@ -1386,14 +1388,14 @@ public static final String[] lexStateNames = {
/** Lex State array. */
public static final int[] jjnewLexState = {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
- -1, -1, -1, -1, -1, 1, 1, -1, -1, 3, -1, 3, 3, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
+ -1, -1, -1, -1, -1, 1, 1, -1, -1, 3, -1, 3, 3, -1, -1,
};
static final long[] jjtoToken = {
- 0xffffffe001L,
+ 0xffffffe001L,
};
static final long[] jjtoSkip = {
- 0x1f00L,
+ 0x1f00L,
};
protected CharStream input_stream;
private final int[] jjrounds = new int[63];
@@ -1478,7 +1480,7 @@ int jjmatchedPos;
int jjmatchedKind;
/** Get the next Token. */
-public Token getNextToken()
+public Token getNextToken()
{
Token matchedToken;
int curPos = 0;
diff --git a/solr/core/src/java/org/apache/solr/update/processor/AbstractDefaultValueUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/AbstractDefaultValueUpdateProcessorFactory.java
index 2186e2d9ed2..2862d4dae06 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/AbstractDefaultValueUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/AbstractDefaultValueUpdateProcessorFactory.java
@@ -44,7 +44,6 @@ public abstract class AbstractDefaultValueUpdateProcessorFactory
protected String fieldName = null;
- @SuppressWarnings("unchecked")
@Override
public void init(NamedList args) {
diff --git a/solr/core/src/test/org/apache/hadoop/http/HttpServer2.java b/solr/core/src/test/org/apache/hadoop/http/HttpServer2.java
index 5962bebe58d..5e66ff54d35 100644
--- a/solr/core/src/test/org/apache/hadoop/http/HttpServer2.java
+++ b/solr/core/src/test/org/apache/hadoop/http/HttpServer2.java
@@ -1459,7 +1459,6 @@ public final class HttpServer2 implements FilterContainer {
response.getOutputStream(), false, "UTF-8")) {
ReflectionUtils.printThreadInfo(out, "");
}
- ReflectionUtils.logThreadInfo(LOG, "jsp requested", 1);
}
}
diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java
index f66029b34e9..9fc8198af78 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSFailoverTest.java
@@ -22,6 +22,8 @@ import java.io.IOException;
import com.carrotsearch.randomizedtesting.annotations.Nightly;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
@@ -40,6 +42,8 @@ import org.junit.BeforeClass;
import org.junit.Test;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@Nightly // test is too long for non nightly
diff --git a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java
index 3d893101dff..726a8060be6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MoveReplicaHDFSTest.java
@@ -22,7 +22,9 @@ import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TimeUnits;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -32,6 +34,8 @@ import org.junit.Test;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@TimeoutSuite(millis = TimeUnits.HOUR)
diff --git a/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java b/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java
index 4e3d62e30e2..ad4fa8ad2fc 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SaslZkACLProviderTest.java
@@ -23,6 +23,8 @@ import java.nio.charset.Charset;
import java.nio.file.Path;
import org.apache.lucene.util.Constants;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.cloud.DefaultZkACLProvider;
import org.apache.solr.common.cloud.SaslZkACLProvider;
@@ -40,6 +42,8 @@ import org.slf4j.LoggerFactory;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadZookeeperThreadsFilter.class
})
public class SaslZkACLProviderTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
index 735cc2080d7..1e0a7befa37 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
@@ -34,8 +34,11 @@ import java.util.stream.Collectors;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
import com.carrotsearch.randomizedtesting.annotations.Nightly;
+
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
@@ -75,6 +78,8 @@ import org.slf4j.LoggerFactory;
@Slow
@SuppressSSL
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@LogLevel("org.apache.solr.cloud.autoscaling=DEBUG;org.apache.solr.cloud.*=DEBUG")
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
index 9ceb826de9e..9d03331b645 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
@@ -25,6 +25,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakLingering;
import org.apache.commons.io.FileUtils;
import org.apache.lucene.util.LuceneTestCase;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
@@ -39,6 +41,8 @@ import org.slf4j.LoggerFactory;
* Test 5 nodes Solr cluster with Kerberos plugin enabled.
*/
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadZookeeperThreadsFilter.class // Zookeeper login leaks TGT renewal threads
})
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java
index 94b3102f0c8..614fd8b7b1c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/HdfsCollectionsAPIDistributedZkTest.java
@@ -21,7 +21,9 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TimeUnits;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -30,6 +32,8 @@ import org.junit.BeforeClass;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@TimeoutSuite(millis = TimeUnits.HOUR)
diff --git a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java
index 27a187e02e6..b646e71cbce 100644
--- a/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java
+++ b/solr/core/src/test/org/apache/solr/cloud/api/collections/TestHdfsCloudBackupRestore.java
@@ -26,6 +26,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
@@ -34,6 +36,7 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
@@ -61,6 +64,8 @@ import static org.apache.solr.core.backup.BackupManager.ZK_STATE_DIR;
* This class implements the tests for HDFS integration for Solr backup/restore capability.
*/
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class TestHdfsCloudBackupRestore extends AbstractCloudBackupRestoreTestCase {
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java
index 8d8ef9c76c5..7600bf46cc7 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/HdfsAutoAddReplicasIntegrationTest.java
@@ -21,7 +21,9 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TimeUnits;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -30,6 +32,8 @@ import org.junit.BeforeClass;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@TimeoutSuite(millis = TimeUnits.HOUR)
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java
index 6a93042e960..cf43b6aaa32 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HDFSCollectionsAPITest.java
@@ -19,6 +19,8 @@ package org.apache.solr.cloud.hdfs;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
@@ -32,6 +34,8 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HDFSCollectionsAPITest extends SolrCloudTestCase {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
index 0c7081b3f39..599ecbbe418 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZk2Test.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.BasicDistributedZk2Test;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// commented 20-July-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 26-Mar-2018
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
index 192e7ee13d0..bc172b3150c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsBasicDistributedZkTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.BasicDistributedZkTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsBasicDistributedZkTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java
index 3bdf77a114e..94ace06c786 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeyNothingIsSafeTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.ChaosMonkeyNothingIsSafeTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsChaosMonkeyNothingIsSafeTest extends ChaosMonkeyNothingIsSafeTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
index ab5eb33c97a..402d5cf07c6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsChaosMonkeySafeLeaderTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.ChaosMonkeySafeLeaderTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsChaosMonkeySafeLeaderTest extends ChaosMonkeySafeLeaderTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java
index d793852aab1..b76e69a6410 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsNNFailoverTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.BasicDistributedZkTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -30,6 +32,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsNNFailoverTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java
index ad8556cf0ca..84aee374588 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoverLeaseTest.java
@@ -26,6 +26,8 @@ import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.apache.solr.util.FSHDFSUtils;
@@ -39,6 +41,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsRecoverLeaseTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
index a797abd769f..d040faec89a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRecoveryZkTest.java
@@ -18,8 +18,10 @@ package org.apache.solr.cloud.hdfs;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Nightly;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.RecoveryZkTest;
import org.apache.solr.common.cloud.ZkConfigManager;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -29,6 +31,8 @@ import org.junit.BeforeClass;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsRecoveryZkTest extends RecoveryZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java
index 64af1091996..ebc6068d502 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsRestartWhileUpdatingTest.java
@@ -17,7 +17,9 @@
package org.apache.solr.cloud.hdfs;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.RestartWhileUpdatingTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -29,6 +31,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsRestartWhileUpdatingTest extends RestartWhileUpdatingTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
index 49998472f46..785ae6f9c6c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsSyncSliceTest.java
@@ -19,7 +19,9 @@ package org.apache.solr.cloud.hdfs;
import java.io.IOException;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.SyncSliceTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -31,6 +33,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java
index f250d53f46a..2e04ee04dc0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsThreadLeakTest.java
@@ -23,6 +23,8 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -32,6 +34,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsThreadLeakTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java
index ff19b090d16..42cfcaa255a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsTlogReplayBufferedWhileIndexingTest.java
@@ -17,7 +17,9 @@
package org.apache.solr.cloud.hdfs;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.TlogReplayBufferedWhileIndexingTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -29,6 +31,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsTlogReplayBufferedWhileIndexingTest extends TlogReplayBufferedWhileIndexingTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
index 0d3d23ea646..59440976280 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsUnloadDistributedZkTest.java
@@ -17,7 +17,9 @@
package org.apache.solr.cloud.hdfs;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.cloud.UnloadDistributedZkTest;
import org.apache.solr.util.BadHdfsThreadsFilter;
import org.junit.AfterClass;
@@ -29,6 +31,8 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsUnloadDistributedZkTest extends UnloadDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
index 1f316033785..6086c59c27a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/HdfsWriteToMultipleCollectionsTest.java
@@ -31,8 +31,10 @@ import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.NRTCachingDirectory;
import org.apache.lucene.util.IOUtils;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Nightly;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
@@ -55,6 +57,8 @@ import org.junit.Test;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsWriteToMultipleCollectionsTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java b/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
index 04f93875f9b..a12d4b911c5 100644
--- a/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/hdfs/StressHdfsTest.java
@@ -24,7 +24,9 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.LuceneTestCase.Slow;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
@@ -56,6 +58,8 @@ import java.util.concurrent.TimeUnit;
@Slow
@Nightly
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class StressHdfsTest extends BasicDistributedZkTest {
diff --git a/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java b/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java
index 632fcb68b82..3f1e41c150b 100644
--- a/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/core/HdfsDirectoryFactoryTest.java
@@ -34,7 +34,9 @@ import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.store.NoLockFactory;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TestUtil;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.common.util.NamedList;
@@ -53,6 +55,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsDirectoryFactoryTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java
index fc7a58e436c..010cc8b859b 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java
@@ -33,7 +33,9 @@ import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.hdfs.DistributedFileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
import org.apache.lucene.util.TestUtil;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
@@ -57,6 +59,8 @@ import org.slf4j.LoggerFactory;
import static org.apache.solr.common.cloud.ZkStateReader.BASE_URL_PROP;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@SolrTestCaseJ4.SuppressSSL // Currently unknown why SSL does not work with this test
diff --git a/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java b/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java
index 8eefd9a3662..bd54cf17f46 100644
--- a/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java
+++ b/solr/core/src/test/org/apache/solr/index/hdfs/CheckHdfsIndexTest.java
@@ -24,6 +24,8 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.index.BaseTestCheckIndex;
import org.apache.lucene.store.Directory;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
@@ -41,6 +43,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 12-Jun-2018
diff --git a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
index 956275db665..2fc63070fba 100644
--- a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
+++ b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
@@ -20,7 +20,6 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import junit.framework.AssertionFailedError;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryUtils;
import org.apache.solr.SolrTestCaseJ4;
@@ -1225,7 +1224,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
public void testPayloadScoreQuery() throws Exception {
// There was a bug with PayloadScoreQuery's .equals() method that said two queries were equal with different includeSpanScore settings
- expectThrows(AssertionFailedError.class, "queries should not have been equal",
+ expectThrows(AssertionError.class, "queries should not have been equal",
() -> assertQueryEquals
("payload_score"
, "{!payload_score f=foo_dpf v=query func=min includeSpanScore=false}"
@@ -1235,7 +1234,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
}
public void testPayloadCheckQuery() throws Exception {
- expectThrows(AssertionFailedError.class, "queries should not have been equal",
+ expectThrows(AssertionError.class, "queries should not have been equal",
() -> assertQueryEquals
("payload_check"
, "{!payload_check f=foo_dpf payloads=2}one"
@@ -1266,7 +1265,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
"{!bool must='{!lucene}foo_s:c' filter='{!lucene}foo_s:d' " +
"must_not='{!lucene}foo_s:a' should='{!lucene}foo_s:b' filter='{!lucene}foo_s:e'}");
- expectThrows(AssertionFailedError.class, "queries should not have been equal",
+ expectThrows(AssertionError.class, "queries should not have been equal",
() -> assertQueryEquals
("bool"
, "{!bool must='{!lucene}foo_s:a'}"
diff --git a/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java b/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
index e19895e9e53..d0bd2710eb5 100644
--- a/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
+++ b/solr/core/src/test/org/apache/solr/search/TestRecoveryHdfs.java
@@ -39,6 +39,8 @@ import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.common.util.IOUtils;
@@ -60,6 +62,8 @@ import org.junit.Test;
import static org.apache.solr.update.processor.DistributingUpdateProcessorFactory.DISTRIB_UPDATE_PARAM;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
// TODO: longer term this should be combined with TestRecovery somehow ??
diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
index 5e72b522204..c41c056d391 100644
--- a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
+++ b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsDirectoryTest.java
@@ -29,6 +29,8 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.store.IndexOutput;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -41,6 +43,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class HdfsDirectoryTest extends SolrTestCaseJ4 {
diff --git a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
index 7a232408891..3d8f91eb24d 100644
--- a/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
+++ b/solr/core/src/test/org/apache/solr/store/hdfs/HdfsLockFactoryTest.java
@@ -23,6 +23,8 @@ import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.lucene.store.Lock;
import org.apache.lucene.store.LockObtainFailedException;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.util.BadHdfsThreadsFilter;
@@ -34,6 +36,8 @@ import com.carrotsearch.randomizedtesting.annotations.Nightly;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
@Nightly
diff --git a/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java b/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java
index 5ba7f58ec14..c2c06375be9 100644
--- a/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java
+++ b/solr/core/src/test/org/apache/solr/update/TestHdfsUpdateLog.java
@@ -23,6 +23,8 @@ import java.net.URISyntaxException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.apache.lucene.util.QuickPatchThreadsFilter;
+import org.apache.solr.SolrIgnoredThreadsFilter;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.cloud.hdfs.HdfsTestUtil;
import org.apache.solr.common.util.IOUtils;
@@ -35,6 +37,8 @@ import org.junit.Test;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakFilters(defaultFilters = true, filters = {
+ SolrIgnoredThreadsFilter.class,
+ QuickPatchThreadsFilter.class,
BadHdfsThreadsFilter.class // hdfs currently leaks thread(s)
})
public class TestHdfsUpdateLog extends SolrTestCaseJ4 {
diff --git a/solr/licenses/http2-client-NOTICE.txt b/solr/licenses/http2-client-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/solr/licenses/http2-client-NOTICE.txt
+++ b/solr/licenses/http2-client-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/solr/licenses/http2-common-NOTICE.txt b/solr/licenses/http2-common-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/solr/licenses/http2-common-NOTICE.txt
+++ b/solr/licenses/http2-common-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/solr/licenses/http2-hpack-NOTICE.txt b/solr/licenses/http2-hpack-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/solr/licenses/http2-hpack-NOTICE.txt
+++ b/solr/licenses/http2-hpack-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/solr/licenses/http2-http-client-transport-NOTICE.txt b/solr/licenses/http2-http-client-transport-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/solr/licenses/http2-http-client-transport-NOTICE.txt
+++ b/solr/licenses/http2-http-client-transport-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/solr/licenses/http2-server-NOTICE.txt b/solr/licenses/http2-server-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/solr/licenses/http2-server-NOTICE.txt
+++ b/solr/licenses/http2-server-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/solr/licenses/jetty-NOTICE.txt b/solr/licenses/jetty-NOTICE.txt
index e9461a8e86e..b6817e12bc3 100644
--- a/solr/licenses/jetty-NOTICE.txt
+++ b/solr/licenses/jetty-NOTICE.txt
@@ -31,18 +31,18 @@ repository ("Repository") in CVS modules ("Modules") and made available
as downloadable archives ("Downloads").</p>
<ul>
- <li>Content may be structured and packaged into modules to
+ <li>Content may be structured and packaged into modules to
facilitate delivering, extending, and upgrading the Content. Typical
modules may include plug-ins ("Plug-ins"), plug-in fragments
("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
- <li>A
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&#8482; ARchive) in a directory named "plugins".</li>
+ <li>A
Feature is a bundle of one or more Plug-ins and/or Fragments and
associated material. Each Feature may be packaged as a sub-directory in
a directory named "features". Within a Feature, files named
"feature.xml" may contain a list of the names and version numbers of
the Plug-ins and/or Fragments associated with that Feature.</li>
- <li>Features
+ <li>Features
may also include other Features ("Included Features"). Within a
Feature, files named "feature.xml" may contain a list of the names and
version numbers of Included Features.</li>
@@ -57,13 +57,13 @@ directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
</ul>
-
+
<p>Note: if a Feature made available by the Eclipse Foundation is
installed using the Eclipse Update Manager, you must agree to a license
("Feature Update License") during the
@@ -84,12 +84,12 @@ CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
diff --git a/solr/licenses/junit-LICENSE-CPL.txt b/solr/licenses/junit-LICENSE-CPL.txt
index 4efdc7b204b..e3f47c46371 100644
--- a/solr/licenses/junit-LICENSE-CPL.txt
+++ b/solr/licenses/junit-LICENSE-CPL.txt
@@ -10,8 +10,8 @@ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICEN
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
+i) changes to the Program, and
+ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
@@ -28,24 +28,24 @@ where such changes and/or additions to the Program originate from and are distri
2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement; and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+a) it complies with the terms and conditions of this Agreement; and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
-iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of the Program.
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
diff --git a/solr/licenses/poi-LICENSE-ASL.txt b/solr/licenses/poi-LICENSE-ASL.txt
index 09d38da72d2..d179489f478 100644
--- a/solr/licenses/poi-LICENSE-ASL.txt
+++ b/solr/licenses/poi-LICENSE-ASL.txt
@@ -514,24 +514,24 @@ SLF4J library (slf4j-api-*.jar)
inbot-utils (https://github.com/Inbot/inbot-utils)
- The MIT License (MIT)
-
- Copyright (c) 2015 Inbot
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
+ The MIT License (MIT)
+
+ Copyright (c) 2015 Inbot
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/solr/licenses/poi-ooxml-LICENSE-ASL.txt b/solr/licenses/poi-ooxml-LICENSE-ASL.txt
index 09d38da72d2..d179489f478 100644
--- a/solr/licenses/poi-ooxml-LICENSE-ASL.txt
+++ b/solr/licenses/poi-ooxml-LICENSE-ASL.txt
@@ -514,24 +514,24 @@ SLF4J library (slf4j-api-*.jar)
inbot-utils (https://github.com/Inbot/inbot-utils)
- The MIT License (MIT)
-
- Copyright (c) 2015 Inbot
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
+ The MIT License (MIT)
+
+ Copyright (c) 2015 Inbot
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/solr/licenses/poi-ooxml-schemas-LICENSE-ASL.txt b/solr/licenses/poi-ooxml-schemas-LICENSE-ASL.txt
index 09d38da72d2..d179489f478 100644
--- a/solr/licenses/poi-ooxml-schemas-LICENSE-ASL.txt
+++ b/solr/licenses/poi-ooxml-schemas-LICENSE-ASL.txt
@@ -514,24 +514,24 @@ SLF4J library (slf4j-api-*.jar)
inbot-utils (https://github.com/Inbot/inbot-utils)
- The MIT License (MIT)
-
- Copyright (c) 2015 Inbot
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
+ The MIT License (MIT)
+
+ Copyright (c) 2015 Inbot
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/solr/licenses/poi-scratchpad-LICENSE-ASL.txt b/solr/licenses/poi-scratchpad-LICENSE-ASL.txt
index 09d38da72d2..d179489f478 100644
--- a/solr/licenses/poi-scratchpad-LICENSE-ASL.txt
+++ b/solr/licenses/poi-scratchpad-LICENSE-ASL.txt
@@ -514,24 +514,24 @@ SLF4J library (slf4j-api-*.jar)
inbot-utils (https://github.com/Inbot/inbot-utils)
- The MIT License (MIT)
-
- Copyright (c) 2015 Inbot
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
+ The MIT License (MIT)
+
+ Copyright (c) 2015 Inbot
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/solr/server/etc/jetty.xml b/solr/server/etc/jetty.xml
index 1f6de775a49..34940b535fa 100644
--- a/solr/server/etc/jetty.xml
+++ b/solr/server/etc/jetty.xml
@@ -136,12 +136,12 @@
</New>
</Set>
</New>
-
- <!-- =========================================================== -->
- <!-- Set handler Collection Structure -->
- <!-- =========================================================== -->
- <Set name="handler">
- <Ref id="RewriteHandler"/>
+
+ <!-- =========================================================== -->
+ <!-- Set handler Collection Structure -->
+ <!-- =========================================================== -->
+ <Set name="handler">
+ <Ref id="RewriteHandler"/>
</Set>
<!-- =========================================================== -->
diff --git a/solr/solr-ref-guide/tools/CustomizedAsciidoctorAntTask.java b/solr/solr-ref-guide/tools/CustomizedAsciidoctorAntTask.java
index 5c1d700676d..346d8ab0aa2 100644
--- a/solr/solr-ref-guide/tools/CustomizedAsciidoctorAntTask.java
+++ b/solr/solr-ref-guide/tools/CustomizedAsciidoctorAntTask.java
@@ -22,7 +22,6 @@ import org.asciidoctor.ant.AsciidoctorAntTask;
* in order to be able to wrap in a macro with defaults
*/
public class CustomizedAsciidoctorAntTask extends AsciidoctorAntTask {
- @SuppressWarnings("UnusedDeclaration")
public void setSourceDocumentName(String sourceDocumentName) {
if ("".equals(sourceDocumentName)) {
sourceDocumentName = null;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
index 366b891e1b3..b298a8362a6 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/AutoScalingConfig.java
@@ -42,6 +42,7 @@ import static java.util.stream.Collectors.toList;
* Bean representation of <code>autoscaling.json</code>, which parses data
* lazily.
*/
+@SuppressWarnings("unchecked")
public class AutoScalingConfig implements MapWriter {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -569,6 +570,7 @@ public class AutoScalingConfig implements MapWriter {
return getList(key, properties, null);
}
+ @SuppressWarnings("rawtypes")
private static List<Object> getList(String key, Map<String, Object> properties, List<Object> defaultList) {
if (defaultList == null) {
defaultList = Collections.emptyList();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
index f12ecce6a8c..290661f26cb 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
@@ -56,6 +56,7 @@ import static org.apache.solr.common.util.Utils.toJSONString;
/**
* Represents a set of conditions in the policy
*/
+@SuppressWarnings({"rawtypes", "unchecked"})
public class Clause implements MapWriter, Comparable<Clause> {
public static final String NODESET = "nodeset";
static final Set<String> IGNORE_TAGS = new HashSet<>(Arrays.asList(REPLICA, COLLECTION, SHARD, "strict", "type", "put", NODESET));
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java
index afe04b51ba7..e9b814855cd 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Policy.java
@@ -79,6 +79,7 @@ public class Policy implements MapWriter {
public static final String CLUSTER_POLICY = "cluster-policy";
public static final String CLUSTER_PREFERENCES = "cluster-preferences";
public static final Set<String> GLOBAL_ONLY_TAGS = Set.of("cores", CollectionAdminParams.WITH_COLLECTION);
+ @SuppressWarnings("unchecked")
public static final List<Preference> DEFAULT_PREFERENCES = Collections.unmodifiableList(
Arrays.asList(
// NOTE - if you change this, make sure to update the solrcloud-autoscaling-overview.adoc which
@@ -277,6 +278,7 @@ public class Policy implements MapWriter {
return newPolicies;
}
+ @SuppressWarnings("rawtypes")
static void setApproxValuesAndSortNodes(List<Preference> clusterPreferences, List<Row> matrix) {
List<Row> matrixCopy = new ArrayList<>(matrix);
List<Row> deadNodes = null;
@@ -528,6 +530,7 @@ public class Policy implements MapWriter {
}
+ @SuppressWarnings("unchecked")
Session(SolrCloudManager cloudManager, Transaction transaction) {
this.transaction = transaction;
ClusterState state = null;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java
index 22fd7a55ef0..84d5d656aea 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java
@@ -237,6 +237,7 @@ public interface Variable {
DISKTYPE;
public final String tagName;
+ @SuppressWarnings("rawtypes")
public final Class type;
public Meta meta;
@@ -252,6 +253,7 @@ public interface Variable {
final Variable impl;
+ @SuppressWarnings({"unchecked", "rawtypes"})
Type() {
try {
meta = Type.class.getField(name()).getAnnotation(Meta.class);
@@ -375,6 +377,7 @@ public interface Variable {
@interface Meta {
String name();
+ @SuppressWarnings("rawtypes")
Class type();
String[] associatedPerNodeValue() default NULL;
@@ -399,6 +402,7 @@ public interface Variable {
String metricsKey() default NULL;
+ @SuppressWarnings("rawtypes")
Class implementation() default void.class;
ComputedType[] computedValues() default ComputedType.NULL;
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
index 0461e67f4fa..e0ca122ba32 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
@@ -89,6 +89,7 @@ import org.slf4j.MDC;
import static org.apache.solr.common.params.CommonParams.ADMIN_PATHS;
import static org.apache.solr.common.params.CommonParams.ID;
+@SuppressWarnings({"rawtypes", "unchecked"})
public abstract class BaseCloudSolrClient extends SolrClient {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -1222,7 +1223,6 @@ public abstract class BaseCloudSolrClient extends SolrClient {
* all shards involved in processing an update request, typically useful
* for gauging the replication factor of a batch.
*/
- @SuppressWarnings("rawtypes")
public int getMinAchievedReplicationFactor(String collection, NamedList resp) {
// it's probably already on the top-level header set by condense
NamedList header = (NamedList)resp.get("responseHeader");
@@ -1245,7 +1245,6 @@ public abstract class BaseCloudSolrClient extends SolrClient {
* the replication factor that was achieved in each shard involved in the request.
* For single doc updates, there will be only one shard in the return value.
*/
- @SuppressWarnings("rawtypes")
public Map<String,Integer> getShardReplicationFactor(String collection, NamedList resp) {
connect();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java
index 6c6eb250505..9b088f57591 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpClusterStateProvider.java
@@ -254,6 +254,7 @@ public abstract class BaseHttpClusterStateProvider implements ClusterStateProvid
}
@Override
+ @SuppressWarnings("deprecation")
public ClusterState getClusterState() throws IOException {
for (String nodeName: liveNodes) {
String baseUrl = Utils.getBaseUrlForNodeName(nodeName, urlScheme);
@@ -275,6 +276,7 @@ public abstract class BaseHttpClusterStateProvider implements ClusterStateProvid
}
@Override
+ @SuppressWarnings("deprecation")
public Map<String, Object> getClusterProperties() {
for (String nodeName : liveNodes) {
String baseUrl = Utils.getBaseUrlForNodeName(nodeName, urlScheme);
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java
index dceb13c20e5..b0c645b3d1e 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseHttpSolrClient.java
@@ -48,6 +48,7 @@ public abstract class BaseHttpSolrClient extends SolrClient {
* This should be thrown when a server has an error in executing the request and
* it sends a proper payload back to the client
*/
+ @SuppressWarnings("serial")
public static class RemoteExecutionException extends HttpSolrClient.RemoteSolrException {
private NamedList meta;
@@ -57,6 +58,7 @@ public abstract class BaseHttpSolrClient extends SolrClient {
}
+ @SuppressWarnings("deprecation")
public static HttpSolrClient.RemoteExecutionException create(String host, NamedList errResponse) {
Object errObj = errResponse.get("error");
if (errObj != null) {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
index e19d2783e0e..6af0d33d0b1 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
@@ -218,6 +218,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
// Pull from the queue multiple times and streams over a single connection.
// Exits on exception, interruption, or an empty queue to pull from.
//
+ @SuppressWarnings({"deprecation", "unchecked"})
void sendUpdateStream() throws Exception {
while (!queue.isEmpty()) {
@@ -356,7 +357,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
msg.append(response.getStatusLine().getReasonPhrase());
msg.append("\n\n\n\n");
msg.append("request: ").append(method.getURI());
-
+
SolrException solrExc;
NamedList<String> metadata = null;
// parse out the metadata from the SolrException
@@ -473,6 +474,7 @@ public class ConcurrentUpdateSolrClient extends SolrClient {
}
}
+ @SuppressWarnings("rawtypes")
@Override
public NamedList<Object> request(final SolrRequest request, String collection)
throws SolrServerException, IOException {
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
index c5273278d9f..136e0c36993 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
@@ -93,6 +93,7 @@ import static org.apache.solr.common.util.Utils.getObjectByPath;
/**
* A SolrClient implementation that talks directly to a Solr server via HTTP
*/
+@SuppressWarnings("unchecked")
public class HttpSolrClient extends BaseHttpSolrClient {
private static final String UTF_8 = StandardCharsets.UTF_8.name();
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
index 902223e30d1..982dff48d3b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/UpdateRequest.java
@@ -60,6 +60,7 @@ public class UpdateRequest extends AbstractUpdateRequest {
* @deprecated Solr now always includes in the response the {@link #REPFACT}, this parameter
* doesn't need to be explicitly set
*/
+ @Deprecated
public static final String MIN_REPFACT = "min_rf";
public static final String VER = "ver";
public static final String OVERWRITE = "ow";
diff --git a/solr/solrj/src/java/org/apache/solr/common/IteratorWriter.java b/solr/solrj/src/java/org/apache/solr/common/IteratorWriter.java
index ec11c786d02..1a8fc1ca275 100644
--- a/solr/solrj/src/java/org/apache/solr/common/IteratorWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/IteratorWriter.java
@@ -78,6 +78,7 @@ public interface IteratorWriter {
try {
writeIter(new ItemWriter() {
@Override
+ @SuppressWarnings("unchecked")
public ItemWriter add(Object o) throws IOException {
if (o instanceof MapWriter) o = ((MapWriter) o).toMap(new LinkedHashMap<>());
if (o instanceof IteratorWriter) o = ((IteratorWriter) o).toList(new ArrayList<>());
diff --git a/solr/solrj/src/java/org/apache/solr/common/MapWriter.java b/solr/solrj/src/java/org/apache/solr/common/MapWriter.java
index 926cf4c360d..07b215e9500 100644
--- a/solr/solrj/src/java/org/apache/solr/common/MapWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/MapWriter.java
@@ -40,6 +40,7 @@ public interface MapWriter extends MapSerializable , NavigableObject {
}
@Override
+ @SuppressWarnings("unchecked")
default Map toMap(Map<String, Object> map) {
try {
writeMap(new EntryWriter() {
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java b/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java
index fd56d9dc985..4720f796311 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java
@@ -408,6 +408,8 @@ public class SolrDocument extends SolrDocumentBase<Object, SolrDocument> impleme
}
@Override
+
+ @Deprecated
public int getChildDocumentCount() {
if (_childDocuments == null) return 0;
return _childDocuments.size();
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrException.java b/solr/solrj/src/java/org/apache/solr/common/SolrException.java
index 673bae7212a..f5c8423484b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrException.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrException.java
@@ -29,6 +29,7 @@ import org.slf4j.MDC;
/**
*
*/
+@SuppressWarnings("unchecked")
public class SolrException extends RuntimeException {
public static final String ROOT_ERROR_CLASS = "root-error-class";
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java b/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java
index 860f3d5fea2..fa8858436aa 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java
@@ -289,6 +289,7 @@ public class SolrInputDocument extends SolrDocumentBase<SolrInputField, SolrInpu
}
@Override
+ @Deprecated
public int getChildDocumentCount() {
return hasChildDocuments() ? _childDocuments.size(): 0;
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrInputField.java b/solr/solrj/src/java/org/apache/solr/common/SolrInputField.java
index 8b4add6523b..4eb30f17c17 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrInputField.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrInputField.java
@@ -27,6 +27,7 @@ import static org.apache.solr.common.util.ByteArrayUtf8CharSequence.convertCharS
*
* @since solr 1.3
*/
+@SuppressWarnings({"unchecked", "rawtypes"})
public class SolrInputField implements Iterable<Object>, Serializable
{
String name;
@@ -63,7 +64,6 @@ public class SolrInputField implements Iterable<Object>, Serializable
* Add values to a field. If the added value is a collection, each value
* will be added individually.
*/
- @SuppressWarnings("unchecked")
public void addValue(Object v) {
if( value == null ) {
if ( v instanceof Collection ) {
@@ -108,7 +108,6 @@ public class SolrInputField implements Iterable<Object>, Serializable
//---------------------------------------------------------------
//---------------------------------------------------------------
- @SuppressWarnings("unchecked")
public Object getFirstValue() {
if( value instanceof Collection ) {
Collection c = (Collection<Object>)value;
@@ -154,7 +153,6 @@ public class SolrInputField implements Iterable<Object>, Serializable
* @return the values for this field. This will return a collection even
* if the field is not multi-valued
*/
- @SuppressWarnings("unchecked")
public Collection<Object> getValues() {
if (value instanceof Collection) {
return convertCharSeq((Collection<Object>) value);
@@ -214,7 +212,7 @@ public class SolrInputField implements Iterable<Object>, Serializable
};
}
- @SuppressWarnings("unchecked")
+
public Iterator<Object> getRawIterator() {
if( value instanceof Collection ) {
return ((Collection)value).iterator();
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
index 559203f6137..7dcc1814b06 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
@@ -233,6 +233,7 @@ public class ClusterState implements JSONWriter.Writable {
* @param liveNodes list of live nodes
* @return the ClusterState
*/
+ @SuppressWarnings("unchecked")
public static ClusterState load(Integer version, byte[] bytes, Set<String> liveNodes, String znode) {
// System.out.println("######## ClusterState.load:" + (bytes==null ? null : new String(bytes)));
if (bytes == null || bytes.length == 0) {
@@ -242,6 +243,7 @@ public class ClusterState implements JSONWriter.Writable {
return load(version, stateMap, liveNodes, znode);
}
+ @SuppressWarnings("unchecked")
public static ClusterState load(Integer version, Map<String, Object> stateMap, Set<String> liveNodes, String znode) {
Map<String,CollectionRef> collections = new LinkedHashMap<>(stateMap.size());
for (Entry<String, Object> entry : stateMap.entrySet()) {
@@ -254,6 +256,7 @@ public class ClusterState implements JSONWriter.Writable {
}
// TODO move to static DocCollection.loadFromMap
+ @SuppressWarnings("unchecked")
private static DocCollection collectionFromObjects(String name, Map<String, Object> objs, Integer version, String znode) {
Map<String,Object> props;
Map<String,Slice> slices;
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java b/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java
index d700464c690..c52fd61b90e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/CompositeIdRouter.java
@@ -149,7 +149,7 @@ public class CompositeIdRouter extends HashBasedRouter {
int max = range.max;
assert max >= min;
- if (partitions == 0) return Collections.EMPTY_LIST;
+ if (partitions == 0) return Collections.emptyList();
long rangeSize = (long) max - (long) min;
long rangeStep = Math.max(1, rangeSize / partitions);
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
index 2acbd00b15e..9870c0fd06f 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
@@ -36,6 +36,7 @@ import static org.apache.solr.common.util.Utils.toJSONString;
/**
* A Slice contains immutable information about a logical shard (all replicas that share the same shard id).
*/
+@SuppressWarnings("unchecked")
public class Slice extends ZkNodeProps implements Iterable<Replica> {
/** Loads multiple slices into a Map from a generic Map that probably came from deserialized JSON. */
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 7185f4e7c7d..cac90705fc4 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -243,6 +243,7 @@ public class ZkStateReader implements SolrCloseable {
* @return current configuration from <code>autoscaling.json</code>. NOTE:
* this data is retrieved from ZK on each call.
*/
+ @SuppressWarnings("unchecked")
public AutoScalingConfig getAutoScalingConfig(Watcher watcher) throws KeeperException, InterruptedException {
Stat stat = new Stat();
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index ca01ce4e4a9..ecfcee557bd 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -273,6 +273,7 @@ public interface CommonParams {
* When querying a node, prefer local node's cores for distributed queries.
* @deprecated Use {@code ShardParams.SHARDS_PREFERENCE}
*/
+ @Deprecated
String PREFER_LOCAL_SHARDS = "preferLocalShards";
String JAVABIN = "javabin";
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java b/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java
index 7a4abe2c303..d0c9f98a41a 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ByteArrayUtf8CharSequence.java
@@ -180,6 +180,7 @@ public class ByteArrayUtf8CharSequence implements Utf8CharSequence {
return new ByteArrayUtf8CharSequence(bytes, 0, length, utf16, hashCode);
}
+ @SuppressWarnings("unchecked")
public static Map.Entry convertCharSeq(Map.Entry e) {
if (e.getKey() instanceof Utf8CharSequence || e.getValue() instanceof Utf8CharSequence) {
return new AbstractMap.SimpleEntry(convertCharSeq(e.getKey()), convertCharSeq(e.getValue()));
@@ -188,6 +189,7 @@ public class ByteArrayUtf8CharSequence implements Utf8CharSequence {
}
+ @SuppressWarnings("unchecked")
public static Collection convertCharSeq(Collection vals) {
if (vals == null) return vals;
boolean needsCopy = false;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
index 1096f67553a..28e088ad806 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
@@ -72,6 +72,7 @@ import static org.apache.solr.common.util.ByteArrayUtf8CharSequence.convertCharS
* <p>
* NOTE -- {@link JavaBinCodec} instances cannot be reused for more than one marshall or unmarshall operation.
*/
+@SuppressWarnings("unchecked")
public class JavaBinCodec implements PushWriter {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java
index f66c88e4118..efbb0bd9e1b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonRecordReader.java
@@ -28,7 +28,7 @@ import static org.noggit.JSONParser.*;
/**
* A Streaming parser for json to emit one record at a time.
*/
-
+@SuppressWarnings({"unchecked", "rawtypes"})
public class JsonRecordReader {
public static final String DELIM = ".";
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
index b1fcc914342..1952bcad0f5 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
@@ -34,6 +34,7 @@ import java.util.function.Function;
* It validates most aspects of json schema but it is NOT A FULLY COMPLIANT JSON schema parser or validator.
* This validator borrow some design's idea from https://github.com/networknt/json-schema-validator
*/
+@SuppressWarnings("unchecked")
public class JsonSchemaValidator {
private List<Validator> validators;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java
index ed8c79776f0..f9d1476c9aa 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/JsonTextWriter.java
@@ -232,7 +232,7 @@ public interface JsonTextWriter extends TextWriter {
writeStr(name, val, false);
}
-
+ @SuppressWarnings("unchecked")
default void writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException {
if (!excludeOuter) {
writeMapOpener(val.size());
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java b/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java
index 3113ef95337..4e2f54dc5e9 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/NamedList.java
@@ -61,6 +61,7 @@ import org.apache.solr.common.params.SolrParams;
* </p>
*
*/
+@SuppressWarnings("unchecked")
public class NamedList<T> implements Cloneable, Serializable, Iterable<Map.Entry<String,T>> , MapWriter {
private static final long serialVersionUID = 1957981902839867821L;
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Pair.java b/solr/solrj/src/java/org/apache/solr/common/util/Pair.java
index 74f5b2d6ff7..1a25eb291fd 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/Pair.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/Pair.java
@@ -66,6 +66,7 @@ public class Pair<T1, T2> implements Serializable, MapWriter {
ew.put("second", second);
}
+ @SuppressWarnings("unchecked")
public static Pair parse(Map m) {
return new Pair(m.get("first"), m.get("second"));
}
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
index 7fcba6448cf..ff0079d31be 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
@@ -88,6 +88,7 @@ import static java.util.Collections.unmodifiableList;
import static java.util.Collections.unmodifiableSet;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
+@SuppressWarnings("unchecked")
public class Utils {
public static final Function NEW_HASHMAP_FUN = o -> new HashMap<>();
public static final Function NEW_LINKED_HASHMAP_FUN = o -> new LinkedHashMap<>();
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java b/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
index b5375365fea..0a96332388e 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
@@ -40,6 +40,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Collections.unmodifiableList;
import static java.util.Collections.unmodifiableSet;
+@SuppressWarnings("unchecked")
public class ValidatingJsonMap implements Map<String, Object>, NavigableObject {
private static final String INCLUDE = "#include";
diff --git a/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/JsonRequestApiTest.java b/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/JsonRequestApiTest.java
index 5d78d069a31..86a0d8ffc99 100644
--- a/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/JsonRequestApiTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/JsonRequestApiTest.java
@@ -284,7 +284,7 @@ public class JsonRequestApiTest extends SolrCloudTestCase {
//tag::solrj-ipod-query-boosted-dsl-2[]
final Map<String, Object> queryTopLevel = new HashMap<>();
final Map<String, Object> boostProperties = new HashMap<>();
- final Map<String, Object> luceneTopLevel = new HashMap();
+ final Map<String, Object> luceneTopLevel = new HashMap<>();
final Map<String, Object> luceneProperties = new HashMap<>();
queryTopLevel.put("boost", boostProperties);
boostProperties.put("b", "log(popularity)");
diff --git a/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java b/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java
index c87bb87bdf6..01910d05894 100644
--- a/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java
@@ -58,7 +58,7 @@ public class UsingSolrJRefGuideExamplesTest extends SolrCloudTestCase {
private static final int NUM_INDEXED_DOCUMENTS = 3;
private static final int NUM_LIVE_NODES = 1;
- private Queue<String> expectedLines = new ArrayDeque();
+ private Queue<String> expectedLines = new ArrayDeque<>();
@BeforeClass
public static void setUpCluster() throws Exception {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
index 27fd172c385..aee735feef5 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
@@ -610,6 +610,7 @@ public class CloudHttp2SolrClientTest extends SolrCloudTestCase {
}
@Test
+ @SuppressWarnings("deprecation")
public void stateVersionParamTest() throws Exception {
CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1).process(cluster.getSolrClient());
cluster.waitForActiveCollection(COLLECTION, 2, 2);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java
index 92c5c629b04..230beb70bbc 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientCacheTest.java
@@ -104,7 +104,7 @@ public class CloudSolrClientCacheTest extends SolrTestCaseJ4 {
}
-
+ @SuppressWarnings("deprecation")
private LBHttpSolrClient getMockLbHttpSolrClient(Map<String, Function> responses) throws Exception {
LBHttpSolrClient mockLbclient = mock(LBHttpSolrClient.class);
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRetryTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRetryTest.java
index 900ae7160f6..315337c5eb7 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRetryTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRetryTest.java
@@ -40,6 +40,7 @@ public class CloudSolrClientRetryTest extends SolrCloudTestCase {
}
@Test
+ @SuppressWarnings("deprecation")
public void testRetry() throws Exception {
String collectionName = "testRetry";
CloudSolrClient solrClient = cluster.getSolrClient();
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
index a505799c6e3..355ca985773 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
@@ -824,7 +824,7 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
}
}
-
+ @SuppressWarnings("deprecation")
private static void checkSingleServer(NamedList<Object> response) {
final CloudSolrClient.RouteResponse rr = (CloudSolrClient.RouteResponse) response;
final Map<String,LBHttpSolrClient.Req> routes = rr.getRoutes();
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java
index c35ed293e0d..2389c26e248 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AbsoluteValueEvaluatorTest.java
@@ -29,7 +29,7 @@ import org.apache.solr.client.solrj.io.stream.StreamContext;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class AbsoluteValueEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
index ca094d59711..f819f56f585 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AddEvaluatorTest.java
@@ -26,7 +26,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class AddEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java
index b28b4b6ed76..a766d2e7903 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AndEvaluatorTest.java
@@ -26,7 +26,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class AndEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java
index f85ed3c9430..119e4118f0c 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AppendEvaluatorTest.java
@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class AppendEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java
index 66aa9f8f4c9..0379491c71c 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcCosineEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class ArcCosineEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java
index e6b30908085..da52efa7492 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcSineEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class ArcSineEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java
index 15cdc0f6a64..02e653f7974 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArcTangentEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class ArcTangentEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java
index 7d14d56df78..5cc65f33cbd 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ArrayEvaluatorTest.java
@@ -29,7 +29,7 @@ import org.apache.solr.client.solrj.io.stream.StreamContext;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class ArrayEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java
index 8029712a4b1..554b67a6797 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/AscEvaluatorTest.java
@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class AscEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java
index 50e8b8ea26c..28300c9b800 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/CeilingEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class CeilingEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
index 2194b8f2a94..19f7c5ba3c4 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
@@ -30,8 +30,8 @@ import org.apache.solr.client.solrj.io.stream.StreamContext;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* Test ConversionEvaluators
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
index 4ef136ce7d6..a17dd688114 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class DivideEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java
index 6cdbfcfd769..ff6339fffcc 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/EqualToEvaluatorTest.java
@@ -28,7 +28,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class EqualToEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java
index d63ca6a4646..0d862170443 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/ExclusiveOrEvaluatorTest.java
@@ -26,7 +26,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class ExclusiveOrEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
index f87c7f9b057..de31faef576 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.Tuple;
import org.apache.solr.client.solrj.io.eval.FieldValueEvaluator;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class FieldValueEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java
index 3ac678cfdc9..e0aa3e24aa3 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/FloorEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class FloorEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java
index 09d0c0d616f..50e8cad8e7b 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/eval/GreaterThanEqualToEvaluatorTest.java
@@ -27,7 +27,7 @@ import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
-import junit.framework.Assert;
+import org.junit.Assert;
public class GreaterThanEqualToEvaluatorTest extends SolrTestCase {
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
index bbc6755ccaa..ef523dfe5a6 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
@@ -18,7 +18,7 @@ package org.apache.solr.client.solrj.io.stream.ops;
import java.util.Map;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.apache.commons.collections.map.HashedMap;
import org.apache.solr.SolrTestCase;
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java b/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java
index 8c062667479..0d8cdec8c0a 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/JsonValidatorTest.java
@@ -179,6 +179,7 @@ public class JsonValidatorTest extends SolrTestCaseJ4 {
assertNull(object);
}
+ @SuppressWarnings("rawtypes")
private void checkSchema(String name) {
ValidatingJsonMap spec = Utils.getSpec(name).getSpec();
Map commands = (Map) spec.get("commands");
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java b/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java
index 48c14828047..3fce31db253 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrIgnoredThreadsFilter.java
@@ -59,6 +59,11 @@ public class SolrIgnoredThreadsFilter implements ThreadFilter {
if (threadName.startsWith("Image Fetcher")) {
return true;
}
+
+ if (threadName.startsWith("Log4j2-TF-2-AsyncLoggerConfig")) {
+ return true;
+ }
+
return false;
}
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index c4c40e74b2b..235b31d224e 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -28,6 +28,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.carrotsearch.randomizedtesting.RandomizedTest.systemPropertyAsBoolean;
+import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
/**
* All Solr test cases should derive from this class eventually. This is originally a result of async logging, see:
@@ -40,7 +41,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.systemPropertyAs
* Other changes that should affect every Solr test case may go here if they don't require the added capabilities in
* SolrTestCaseJ4.
*/
-
+@ThreadLeakFilters(defaultFilters = true, filters = { SolrIgnoredThreadsFilter.class })
public class SolrTestCase extends LuceneTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());