You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2019/08/15 18:02:07 UTC

[lucene-solr] 01/05: SOLR-13452: Work on test run output improvements and removing basic compiler warnings (so they don't clutter up the build output and we don't just hide them)

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch jira/SOLR-13452_gradle_5
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 47124b63b02cb7a1f4ce14064b68d098ad9a74b9
Author: markrmiller <ma...@apache.org>
AuthorDate: Thu Aug 15 09:41:58 2019 -0500

    SOLR-13452: Work on test run output improvements and removing basic compiler warnings (so they don't clutter up the build output and we don't just hide them)
---
 build.gradle                                       | 19 +++++-
 buildSrc/common/configure-ext.gradle               | 74 +++++++++++++++++++++-
 buildSrc/common/configure-test.gradle              | 63 +++++++++++++++---
 .../org/apache/lucene/gradle/TestResultObj.groovy  | 43 ++++++-------
 gradle.properties                                  |  2 +
 .../FixBrokenOffsetsFilterFactory.java             |  1 +
 .../miscellaneous/WordDelimiterFilterFactory.java  | 32 +++++-----
 .../apache/lucene/analysis/synonym/SynonymMap.java |  1 +
 .../TestRemoveDuplicatesTokenFilter.java           |  1 +
 .../miscellaneous/TestWordDelimiterFilter.java     |  1 +
 .../analysis/synonym/TestSynonymFilterFactory.java |  2 +
 .../analysis/synonym/TestSynonymMapFilter.java     |  1 +
 .../analysis/synonym/TestWordnetSynonymParser.java |  1 +
 .../lucene/analysis/icu/ICUTransformFilter.java    |  1 +
 .../benchmark/byTask/feeds/SpatialDocMaker.java    |  2 +
 .../byTask/tasks/AnalyzerFactoryTask.java          |  2 +-
 .../codecs/memory/DirectDocValuesConsumer.java     |  5 ++
 .../codecs/memory/DirectDocValuesProducer.java     |  2 +-
 .../apache/lucene/util/fst/PositiveIntOutputs.java |  1 +
 .../apache/lucene/analysis/TestCharArraySet.java   |  2 +-
 .../org/apache/lucene/document/TestDocument.java   |  1 +
 .../lucene/index/TestFieldUpdatesBuffer.java       |  1 +
 .../lucene/search/TestMultiTermConstantScore.java  |  5 +-
 .../org/apache/lucene/search/TestSearchAfter.java  |  1 +
 .../test/org/apache/lucene/util/TestCharsRef.java  |  1 +
 .../test/org/apache/lucene/util/TestVersion.java   |  1 +
 .../test/org/apache/lucene/util/fst/Test2BFST.java |  1 +
 .../test/org/apache/lucene/util/fst/TestFSTs.java  |  3 +-
 .../org/apache/lucene/facet/DrillSideways.java     |  1 +
 .../lucene/search/grouping/TestGrouping.java       |  9 +--
 .../lucene/search/highlight/HighlighterTest.java   |  1 +
 .../search/join/ToParentBlockJoinSortField.java    |  5 ++
 .../lucene/search/join/TestBlockJoinSelector.java  |  2 +
 .../memory/TestMemoryIndexAgainstDirectory.java    |  3 +
 .../lucene/util/fst/UpToTwoPositiveIntOutputs.java |  1 +
 .../similarity/TestLegacyBM25Similarity.java       |  1 +
 .../lucene/queries/function/ValueSource.java       |  1 +
 .../function/valuesource/DocFreqValueSource.java   |  2 +
 .../function/valuesource/MaxDocValueSource.java    |  2 +
 .../function/valuesource/NormValueSource.java      |  2 +
 .../function/valuesource/QueryValueSource.java     |  1 +
 .../function/valuesource/ScaleFloatFunction.java   |  3 +
 .../valuesource/SumTotalTermFreqValueSource.java   |  2 +
 .../valuesource/TotalTermFreqValueSource.java      |  2 +
 .../queries/payloads/TestPayloadCheckQuery.java    |  1 +
 .../lucene/queryparser/classic/FastCharStream.java |  6 ++
 .../queryparser/classic/QueryParserBase.java       |  2 +
 .../standard/builders/FuzzyQueryNodeBuilder.java   |  1 +
 .../flexible/standard/config/FuzzyConfig.java      |  1 +
 .../flexible/standard/parser/FastCharStream.java   | 11 ++++
 .../surround/parser/FastCharStream.java            | 11 ++++
 .../xml/builders/FuzzyLikeThisQueryBuilder.java    |  1 +
 .../core/builders/TestQueryTreeBuilder.java        |  3 +-
 .../lucene/replicator/ReplicatorTestCase.java      |  1 +
 .../apache/lucene/geo/SimpleWKTShapeParser.java    | 16 +++--
 .../org/apache/lucene/spatial/SpatialStrategy.java |  1 +
 .../lucene/spatial/bbox/BBoxValueSource.java       |  1 +
 .../lucene/spatial/prefix/HeatmapFacetCounter.java |  1 +
 .../spatial/prefix/WithinPrefixTreeQuery.java      |  1 +
 .../spatial/prefix/tree/PackedQuadPrefixTree.java  |  2 +
 .../lucene/spatial/prefix/tree/QuadPrefixTree.java |  3 +
 .../lucene/spatial/query/SpatialArgsParser.java    |  1 +
 .../spatial/spatial4j/Geo3dShapeFactory.java       |  4 +-
 .../search/suggest/jaspell/JaspellLookup.java      | 34 +++++-----
 .../search/spell/TestWordBreakSpellChecker.java    |  1 +
 .../lucene/search/suggest/LookupBenchmarkTest.java |  5 +-
 .../lucene/search/suggest/PersistenceTest.java     |  1 +
 .../java/org/apache/lucene/search/CheckHits.java   | 11 ++--
 .../java/org/apache/lucene/search/QueryUtils.java  |  8 +--
 .../java/org/apache/lucene/util/fst/FSTTester.java |  1 +
 lucene/tools/junit4/solr-tests.policy              |  5 +-
 lucene/tools/junit4/tests.policy                   |  5 +-
 .../org/apache/solr/schema/ICUCollationField.java  |  2 +
 .../org/apache/solr/legacy/BBoxValueSource.java    |  1 +
 .../org/apache/solr/parser/FastCharStream.java     | 12 ++++
 ...AbstractDefaultValueUpdateProcessorFactory.java |  1 -
 .../org/apache/solr/search/QueryEqualityTest.java  |  6 +-
 .../solrj/cloud/autoscaling/AutoScalingConfig.java |  2 +
 .../client/solrj/cloud/autoscaling/Clause.java     |  1 +
 .../client/solrj/cloud/autoscaling/Policy.java     |  3 +
 .../client/solrj/cloud/autoscaling/Variable.java   |  4 ++
 .../client/solrj/impl/BaseCloudSolrClient.java     |  3 +-
 .../solrj/impl/BaseHttpClusterStateProvider.java   |  2 +
 .../solr/client/solrj/impl/BaseHttpSolrClient.java |  2 +
 .../solrj/impl/ConcurrentUpdateSolrClient.java     |  4 +-
 .../solr/client/solrj/impl/HttpSolrClient.java     |  1 +
 .../solr/client/solrj/request/UpdateRequest.java   |  1 +
 .../org/apache/solr/common/IteratorWriter.java     |  1 +
 .../src/java/org/apache/solr/common/MapWriter.java |  1 +
 .../java/org/apache/solr/common/SolrDocument.java  |  2 +
 .../java/org/apache/solr/common/SolrException.java |  1 +
 .../org/apache/solr/common/SolrInputDocument.java  |  1 +
 .../org/apache/solr/common/SolrInputField.java     |  6 +-
 .../org/apache/solr/common/cloud/ClusterState.java |  3 +
 .../solr/common/cloud/CompositeIdRouter.java       |  2 +-
 .../java/org/apache/solr/common/cloud/Slice.java   |  1 +
 .../apache/solr/common/cloud/ZkStateReader.java    |  2 +
 .../apache/solr/common/params/CommonParams.java    |  1 +
 .../common/util/ByteArrayUtf8CharSequence.java     |  2 +
 .../org/apache/solr/common/util/JavaBinCodec.java  |  1 +
 .../solr/common/util/JsonSchemaValidator.java      |  1 +
 .../apache/solr/common/util/JsonTextWriter.java    |  2 +-
 .../org/apache/solr/common/util/NamedList.java     |  1 +
 .../src/java/org/apache/solr/common/util/Pair.java |  1 +
 .../java/org/apache/solr/common/util/Utils.java    |  1 +
 .../apache/solr/common/util/ValidatingJsonMap.java |  1 +
 .../ref_guide_examples/JsonRequestApiTest.java     |  2 +-
 .../UsingSolrJRefGuideExamplesTest.java            |  2 +-
 .../solrj/impl/CloudHttp2SolrClientTest.java       |  1 +
 .../solrj/impl/CloudSolrClientCacheTest.java       |  2 +-
 .../solrj/impl/CloudSolrClientRetryTest.java       |  1 +
 .../client/solrj/impl/CloudSolrClientTest.java     |  2 +-
 .../io/stream/eval/AbsoluteValueEvaluatorTest.java |  2 +-
 .../solrj/io/stream/eval/AddEvaluatorTest.java     |  2 +-
 .../solrj/io/stream/eval/AndEvaluatorTest.java     |  2 +-
 .../solrj/io/stream/eval/AppendEvaluatorTest.java  |  2 +-
 .../io/stream/eval/ArcCosineEvaluatorTest.java     |  2 +-
 .../solrj/io/stream/eval/ArcSineEvaluatorTest.java |  2 +-
 .../io/stream/eval/ArcTangentEvaluatorTest.java    |  2 +-
 .../solrj/io/stream/eval/ArrayEvaluatorTest.java   |  2 +-
 .../solrj/io/stream/eval/AscEvaluatorTest.java     |  2 +-
 .../solrj/io/stream/eval/CeilingEvaluatorTest.java |  2 +-
 .../io/stream/eval/ConversionEvaluatorsTest.java   |  4 +-
 .../solrj/io/stream/eval/DivideEvaluatorTest.java  |  2 +-
 .../solrj/io/stream/eval/EqualToEvaluatorTest.java |  2 +-
 .../io/stream/eval/ExclusiveOrEvaluatorTest.java   |  2 +-
 .../io/stream/eval/FieldValueEvaluatorTest.java    |  2 +-
 .../solrj/io/stream/eval/FloorEvaluatorTest.java   |  2 +-
 .../eval/GreaterThanEqualToEvaluatorTest.java      |  2 +-
 .../solrj/io/stream/ops/ConcatOperationTest.java   |  2 +-
 .../apache/solr/common/util/ContentStreamTest.java | 13 ++--
 .../apache/solr/common/util/JsonValidatorTest.java |  1 +
 132 files changed, 440 insertions(+), 145 deletions(-)

diff --git a/build.gradle b/build.gradle
index 87ce6e3..f00bfab 100644
--- a/build.gradle
+++ b/build.gradle
@@ -108,6 +108,14 @@ configure(luceneSolrSubProjects) {
     project.compileJava.options.encoding = "UTF-8"
     project.compileTestJava.options.encoding = "UTF-8"
     
+    // project.compileJava.options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
+    // project.compileTestJava.options.compilerArgs << '-Xlint:deprecation' << '-Xlint:unchecked'
+    
+    // fail on basic compiler warnings
+    project.compileJava.options.compilerArgs << "-Werror"
+    project.compileTestJava.options.compilerArgs << "-Werror"
+    
+    
     project.sourceSets {
       main.java.srcDirs = ['src/java']
       main.resources.srcDirs = ['src/resources']
@@ -167,7 +175,16 @@ configure(rootProject) {
   }
   
   task pristineClean(type: org.apache.lucene.gradle.PristineClean) {}
-
+  
+  ext.testsResults = [] // We'll hold the summaries here
+  
+  gradle.buildFinished {
+      def allResults = ext.testsResults
+  
+      if (!allResults.isEmpty()) {
+          printResults allResults
+      }
+  }
 }
 
 // *** all projects config
diff --git a/buildSrc/common/configure-ext.gradle b/buildSrc/common/configure-ext.gradle
index 7be8b1e..b8aa7d1 100644
--- a/buildSrc/common/configure-ext.gradle
+++ b/buildSrc/common/configure-ext.gradle
@@ -1,3 +1,25 @@
+/*
+ * 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.
+ */
+
+import org.gradle.internal.logging.text.StyledTextOutput;
+import org.gradle.internal.logging.text.StyledTextOutputFactory;
+import static org.gradle.internal.logging.text.StyledTextOutput.Style;
+
+
 public static String formatSeed(long seed) {
   char [] HEX = "0123456789ABCDEF".toCharArray();
   StringBuilder b = new StringBuilder();
@@ -34,11 +56,59 @@ allprojects {
     if (project.hasProperty(propertyName))  seedValue = project.getProperty(propertyName)
     if (seedValue == null) {
       seedValue = formatSeed(new Random().nextLong());
-      println("Picking master seed for property '" + propertyName + "': " + seedValue);
+      // println("Picking master seed for property '" + propertyName + "': " + seedValue);
       return seedValue
     } else {
-      println("Seed property '" + propertyName + "' already defined: " + seedValue);
+      // println("Seed property '" + propertyName + "' already defined: " + seedValue);
       return seedValue
     }
   }
+
+  ext.printResults = {results ->
+    
+    def allResults = new ArrayList()
+    results.collect { allResults.add(it.getProjectAndTask() + ' ' + it.getSummary()) }
+    
+    // max line length 
+    def maxLength = allResults*.readLines().flatten().collect { it.length() }.max()
+    
+    def out = services.get(StyledTextOutputFactory).create("out")
+    def borderStyle
+    def headerStyle
+    def topBorderStyle
+    
+    for (def i = 0; i < results.size(); i++) {
+      def result = results.get(i)
+      if (result.getSuccess()) {
+        borderStyle = Style.Normal
+        headerStyle = Style.SuccessHeader
+        topBorderStyle = Style.Identifier
+      } else {
+        borderStyle = Style.Failure
+        headerStyle = Style.FailureHeader
+        topBorderStyle = Style.Failure
+      }
+      
+      out.style(topBorderStyle).println("┌${"${"─" * maxLength}"}┐")
+
+      result.collect {
+        String projectAndTask = it.getProjectAndTask()
+        String summary = it.getSummary()
+        boolean success = it.getSuccess()
+        int line = 0
+        summary.readLines().collect {
+          line++
+          if (line == 1) {
+            out.style(borderStyle).text('│').style(headerStyle).text(projectAndTask).style(Style.Normal).text(' ' + it + ' ' * (maxLength - (projectAndTask.length() + 1 + it.length()))).style(borderStyle).println('│')
+          } else {
+            out.style(borderStyle).text('│').style(Style.Normal).text(it + ' ' * (maxLength - it.length())).style(borderStyle).println('│')
+          }
+        }.join("\n")
+      }.join("\n├${"${"─" * maxLength}"}┤\n") // Add separator between entries
+      println "└${"${"─" * maxLength}"}┘" // bottom border
+    }
+
+  
+  }
+  
 }
\ No newline at end of file
diff --git a/buildSrc/common/configure-test.gradle b/buildSrc/common/configure-test.gradle
index ef324dd..e1a2eb0 100644
--- a/buildSrc/common/configure-test.gradle
+++ b/buildSrc/common/configure-test.gradle
@@ -15,8 +15,10 @@
  * limitations under the License.
  */
 
-// we create new *Tran configurations that are transitive
-// and can be used between modules
+ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
+ import org.gradle.api.tasks.testing.logging.TestLogEvent
+ import groovy.time.TimeCategory
+ import org.apache.lucene.gradle.TestResultObj
 
 test {
   group = 'Tests'
@@ -29,16 +31,52 @@ test {
   filter {
     includeTestsMatching "*.Test*"
     includeTestsMatching "*.*Test"
-    // so we can run with --tests wildcards
+    // so we can run with --tests wildcards from higher lvl dirs
     setFailOnNoMatchingTests(false)
   }
   
+  testLogging {
+    events TestLogEvent.FAILED
+    exceptionFormat TestExceptionFormat.FULL
+    showExceptions true
+    showCauses true
+    showStackTraces true
+  }
+
+  afterSuite { desc, result ->
+    if (desc.parent) return // Only summarize results for whole modules
+      String summary = "results: ${result.resultType} " +
+          "(" +
+          "${result.testCount} tests, " +
+          "${result.successfulTestCount} successes, " +
+          "${result.failedTestCount} failures, " +
+          "${result.skippedTestCount} skipped" +
+          ") " +
+          "in ${TimeCategory.minus(new Date(result.endTime), new Date(result.startTime))}" +
+          "\n" +
+          "Report file: ${project.tasks.test.reports.html.entryPoint}"
+    
+    TestResultObj testResult = new TestResultObj("${project.name}:${project.tasks.test.name}", summary, result.resultType == TestResult.ResultType.SUCCESS)
+    
+    // Add reports in `testsResults`, keep failed suites at the end
+    if (result.resultType == TestResult.ResultType.SUCCESS) {
+      rootProject.testsResults.add(0, testResult)
+    } else {
+      rootProject.testsResults += testResult
+    }
+  }
+  
+  minHeapSize = "256m"
   maxHeapSize = "512m"
   // Enable assertions
   jvmArgs += "-ea"
   // Enable assertions in system classes
   jvmArgs += "-esa"
   
+  jvmArgs +=  "-XX:+UseG1GC"
+  jvmArgs += "-Xss2m"
+  jvmArgs +=  "-XX:+UseStringDeduplication"
+  
   def commonDir
   if (project.ext.getTopLvlProject(project).equals(rootProject.project(":lucene"))) {
     commonDir = rootProject.project(":lucene").projectDir
@@ -46,9 +84,17 @@ test {
     commonDir = rootProject.project(":solr").projectDir
   }
   
-  def tmpDir = file('build/tests-temp')
-
+  workingDir = project.mfile(project.projectDir, 'build/tests')
+  
+  def tmpDir = project.mfile(workingDir, 'temp')
+  
+  doFirst {
+    def success = workingDir.mkdirs()
+    tmpDir.mkdirs()
+  }
+  
   systemProperty 'common.dir', "${commonDir}"
+  systemProperty 'build.dir', project.buildDir
   systemProperty 'tests.multiplier', '1'
   systemProperty 'tests.codec', 'random'
   systemProperty 'tests.postingsformat', 'random'
@@ -72,6 +118,8 @@ test {
   systemProperty 'jetty.insecurerandom', '1'
   systemProperty 'jdk.map.althashing.threshold', '0'
   systemProperty 'tests.src.home', System.getenv('user.dir')
+  systemProperty 'solr.directoryFactory', 'org.apache.solr.core.MockDirectoryFactory'
+  
   systemProperty 'tests.seed', project.ext.pickRandomSeed()
 
   // replaces default random source to the nonblocking variant 
@@ -79,8 +127,8 @@ test {
   systemProperty 'java.security.manager', 'org.apache.lucene.util.TestSecurityManager'
   systemProperty 'java.security.policy', "${mfile(rootProjectDir, project.ext.testsPolicy)}"
   
-  def testsJvms = project.ext.properties.tests_jvms
-  if (testsJvms) {
+  if (project.ext.properties.containsKey('tests_jvms')) {
+    def testsJvms = project.ext.properties.tests_jvms
     maxParallelForks = Integer.parseInt(testsJvms)
   } else {
     maxParallelForks = Runtime.runtime.availableProcessors() / 2
@@ -93,7 +141,6 @@ test {
 
 }
 
-
 // Some test resources and files are stored along the test sources
 // and are expected to exist next to classes during tests
 task copyTestResources(type: Copy) {
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java b/buildSrc/src/main/groovy/org/apache/lucene/gradle/TestResultObj.groovy
similarity index 55%
copy from lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java
copy to buildSrc/src/main/groovy/org/apache/lucene/gradle/TestResultObj.groovy
index b0ca671..a41b9c7 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/FuzzyConfig.java
+++ b/buildSrc/src/main/groovy/org/apache/lucene/gradle/TestResultObj.groovy
@@ -1,3 +1,4 @@
+package org.apache.lucene.gradle
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,35 +15,29 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.lucene.queryparser.flexible.standard.config;
 
-import org.apache.lucene.search.FuzzyQuery;
-
-/**
- * Configuration parameters for {@link FuzzyQuery}s
- */
-public class FuzzyConfig {
+class TestResultObj {
   
-  private int prefixLength = FuzzyQuery.defaultPrefixLength;
-
-  private float minSimilarity = FuzzyQuery.defaultMinSimilarity;
+  private String summary
+  private boolean success
+  private String projectAndTask
   
-  public FuzzyConfig() {}
-
-  public int getPrefixLength() {
-    return prefixLength;
-  }
-
-  public void setPrefixLength(int prefixLength) {
-    this.prefixLength = prefixLength;
+  public TestResultObj(String projectAndTask, String summary, boolean success) {
+    this.summary = summary
+    this.success = success
+    this.projectAndTask = projectAndTask
   }
-
-  public float getMinSimilarity() {
-    return minSimilarity;
+  
+  public String getSummary() {
+    return summary
   }
-
-  public void setMinSimilarity(float minSimilarity) {
-    this.minSimilarity = minSimilarity;
+  
+  public boolean getSuccess() {
+    return success
   }
   
+  public String getProjectAndTask() {
+    return projectAndTask
+  }
 }
+
diff --git a/gradle.properties b/gradle.properties
index 43fa4bf..5f36b4c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -14,6 +14,8 @@ org.gradle.parallel=true
 # The number of tests run in parallel must fit within the max workers setting. Defaults to number of CPU cores / 2.
 # tests_jvms=5
 
+# NOTE: gradle does not try to balance tests across jvms yet: https://github.com/gradle/gradle/issues/2669
+
 org.gradle.caching=false
 
 # experimental gradle feature - does not currently work with our version constraints plugin
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 04503e4..3ef9ebd 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 3cd13e4..71ad6f9 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 97db1de..c7df323 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/miscellaneous/TestRemoveDuplicatesTokenFilter.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestRemoveDuplicatesTokenFilter.java
index d1e2e2e..84b7d10 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 790e758..2267f0c 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/synonym/TestSynonymFilterFactory.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/synonym/TestSynonymFilterFactory.java
index e3bb00a..ae3b475 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 0fbbd2e..0b4a08c 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 675c829..e33973c 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/icu/src/java/org/apache/lucene/analysis/icu/ICUTransformFilter.java b/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUTransformFilter.java
index bfe7c12..35f1410 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 b466e96..274bd42 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 051a8fc..518ede4 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/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesConsumer.java b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesConsumer.java
index 54ec424..bca8198 100644
--- a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesConsumer.java
+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesConsumer.java
@@ -65,6 +65,7 @@ class DirectDocValuesConsumer extends DocValuesConsumer {
     }
   }
 
+  @SuppressWarnings("deprecation")
   @Override
   public void addNumericField(FieldInfo field, DocValuesProducer valuesProducer) throws IOException {
     meta.writeVInt(field.number);
@@ -162,6 +163,7 @@ class DirectDocValuesConsumer extends DocValuesConsumer {
     }
   }
 
+  @SuppressWarnings("deprecation")
   @Override
   public void addBinaryField(FieldInfo field, final DocValuesProducer valuesProducer) throws IOException {
     meta.writeVInt(field.number);
@@ -231,6 +233,7 @@ class DirectDocValuesConsumer extends DocValuesConsumer {
     }
   }
 
+  @SuppressWarnings("deprecation")
   @Override
   public void addSortedField(FieldInfo field, DocValuesProducer valuesProducer) throws IOException {
     meta.writeVInt(field.number);
@@ -242,6 +245,7 @@ class DirectDocValuesConsumer extends DocValuesConsumer {
     addBinaryFieldValues(field, LegacyDocValuesIterables.valuesIterable(valuesProducer.getSorted(field)));
   }
   
+  @SuppressWarnings("deprecation")
   @Override
   public void addSortedNumericField(FieldInfo field, final DocValuesProducer valuesProducer) throws IOException {
 
@@ -267,6 +271,7 @@ class DirectDocValuesConsumer extends DocValuesConsumer {
   }
 
   // note: this might not be the most efficient... but it's fairly simple
+  @SuppressWarnings("deprecation")
   @Override
   public void addSortedSetField(FieldInfo field, DocValuesProducer valuesProducer) throws IOException {
     Iterable<BytesRef> values = LegacyDocValuesIterables.valuesIterable(valuesProducer.getSortedSet(field));
diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesProducer.java b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesProducer.java
index baef4db..d82e080 100644
--- a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesProducer.java
+++ b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/DirectDocValuesProducer.java
@@ -42,7 +42,7 @@ import org.apache.lucene.util.RamUsageEstimator;
 /**
  * Reader for {@link DirectDocValuesFormat}
  */
-
+@SuppressWarnings("deprecation")
 class DirectDocValuesProducer extends DocValuesProducer {
   // metadata maps (just file pointers and minimal stuff)
   private final Map<String,NumericEntry> numerics = 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 bc9806d..c6ea6f2 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 e51f207..a28de92 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 50c1ed0..1d02685 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 0ca3af8..cb387fd 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 69e1e10..9453721 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 2ce677c..90a2572 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 079b3b7..8ed9352 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 e19c615..02d566e 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/fst/Test2BFST.java b/lucene/core/src/test/org/apache/lucene/util/fst/Test2BFST.java
index cc093b3..7948ef1 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 8f598f6..f071983 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 15df7e3..e9a38e5 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 87a1d97..dc19f6d 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 c555297..dfdff00 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 fef167e..dce1416 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 838826f..d88a87d 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/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstDirectory.java b/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstDirectory.java
index a9d83b0..6262862 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 327de1f..42ae747 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 b3a0cd2..f3ab546 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 1ba3580..7bbe82d 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 e03e316..c915293 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 ccd7326..2270978 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 ffbb0c5..30bdc31 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 e535b55..b142c37 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 38bd86a..161d142 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 716d304..3f25d34 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 5a69e42..5e57121 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 6869177..5b99e70 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 d528111..f468111 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
@@ -23,6 +23,7 @@ import java.io.*;
  * character position of the token in the input, as required by Lucene's {@link
  * org.apache.lucene.analysis.tokenattributes.OffsetAttribute} API.
  * */
+@SuppressWarnings("deprecation")
 public final class FastCharStream implements CharStream {
   char[] buffer = null;
 
@@ -109,7 +110,12 @@ public final class FastCharStream implements CharStream {
   public final int getColumn() {
     return bufferStart + bufferPosition;
   }
+  /**
+   * @deprecated
+   * @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 7a03a3c..0ea7b37 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 2575e80..81fe0d8 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 b0ca671..1856e73 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 ee0f9af..86b205a 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 3a033f5..1f24368 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 daf7354..a1e02af 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 be1eb24..2e13244 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 c482ec2..08ae407 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 17b595f..c6dc6c2 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 215fa1d..79eb98a 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 1a2525e..e31c5c1 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 6c5253e..174e569 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 f595f0e..3958a67 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 6046ed2..688e724 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
@@ -81,6 +81,7 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
     return new PackedQuadCell(0x0L);
   }
 
+  @SuppressWarnings("deprecation")
   @Override
   public Cell getCell(Point p, int level) {
     List<Cell> cells = new ArrayList<>(1);
@@ -100,6 +101,7 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
     checkBattenberg(QUAD[3], x + w, y - h, level, matches, term, shape, maxLevel);
   }
 
+  @SuppressWarnings("deprecation")
   protected void checkBattenberg(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 9bc947f..c0bd15e 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
@@ -144,6 +144,7 @@ public class QuadPrefixTree extends LegacyPrefixTree {
     return maxLevels;
   }
 
+  @SuppressWarnings("deprecation")
   @Override
   public Cell getCell(Point p, int level) {
     List<Cell> cells = new ArrayList<>(1);
@@ -176,6 +177,7 @@ public class QuadPrefixTree extends LegacyPrefixTree {
     // if we actually use the range property in the query, this could be useful
   }
 
+  @SuppressWarnings("deprecation")
   protected void checkBattenberg(
       char c,
       double cx,
@@ -269,6 +271,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 79ad7a9..c3bd350 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 071c775..dbb557f 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/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 948ebeb..b816773 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 35e8245..cc2dbad 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 9f9190a..a38a333 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 fd5b558..c060a1c 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/CheckHits.java b/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
index 36a77fb..3861eb4 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
@@ -23,19 +23,20 @@ import java.util.Set;
 import java.util.TreeSet;
 import java.util.regex.Pattern;
 
-import junit.framework.Assert;
+import org.junit.Assert;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.util.LuceneTestCase;
 
-import static junit.framework.Assert.assertNotNull;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 /**
  * Utility class for asserting expected hits in tests.
  */
+@SuppressWarnings("deprecation")
 public class CheckHits {
     
   /**
@@ -58,7 +59,7 @@ public class CheckHits {
       if (ignore.contains(Integer.valueOf(doc))) continue;
 
       Explanation exp = searcher.explain(q, doc);
-      assertNotNull("Explanation of [["+d+"]] for #"+doc+" is null",
+      junit.framework.Assert.assertNotNull("Explanation of [["+d+"]] for #"+doc+" is null",
                              exp);
       Assert.assertFalse("Explanation of [["+d+"]] for #"+doc+
                          " doesn't indicate non-match: " + exp.toString(),
@@ -632,7 +633,7 @@ public class CheckHits {
         if (twoPhase2 == null || twoPhase2.matches()) {
           Assert.assertTrue(twoPhase1 == null || twoPhase1.matches());
           float score = s2.score();
-          Assert.assertEquals(s1.score(), score);
+          Assert.assertEquals(s1.score(), score, .01);
           Assert.assertTrue(score + " > " + maxScore + " up to " + upTo, score <= maxScore);
 
           if (score >= minScore && random.nextInt(10) == 0) {
@@ -702,7 +703,7 @@ public class CheckHits {
         if (twoPhase2 == null || twoPhase2.matches()) {
           Assert.assertTrue(twoPhase1 == null || twoPhase1.matches());
           float score = s2.score();
-          Assert.assertEquals(s1.score(), score);
+          Assert.assertEquals(s1.score(), score, .01);
 
           if (doc2 > upTo) {
             upTo = s2.advanceShallow(doc2);
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 cdbac77..d4ec009 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 590841d..cc0faae 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/tools/junit4/solr-tests.policy b/lucene/tools/junit4/solr-tests.policy
index a70e253..201add9 100644
--- a/lucene/tools/junit4/solr-tests.policy
+++ b/lucene/tools/junit4/solr-tests.policy
@@ -48,7 +48,10 @@ grant {
   permission java.nio.file.LinkPermission "hard";
   
   // gradle build dir
-  permission java.io.FilePermission "build${/}-", "read,write,delete,execute";
+  permission java.io.FilePermission "${build.dir}${/}-", "execute";
+  permission java.io.FilePermission "${build.dir}${/}tests", "execute";
+  permission java.io.FilePermission "${tempDir}", "read,write,delete,execute";
+  permission java.io.FilePermission "${tempDir}${/}-", "read,write,delete,execute";
   
   // all possibilities of accepting/binding connections on localhost with ports >=1024:
   permission java.net.SocketPermission "localhost:1024-", "accept,listen";
diff --git a/lucene/tools/junit4/tests.policy b/lucene/tools/junit4/tests.policy
index afa9857..84c67f4 100644
--- a/lucene/tools/junit4/tests.policy
+++ b/lucene/tools/junit4/tests.policy
@@ -48,7 +48,10 @@ grant {
   permission java.io.FilePermission "${tests.linedocsfile}", "read";
   
   // gradle build dir
-  permission java.io.FilePermission "build${/}-", "read,write,delete,execute";
+  permission java.io.FilePermission "${build.dir}${/}-", "execute";
+  permission java.io.FilePermission "${build.dir}${/}tests", "execute";
+  permission java.io.FilePermission "${tempDir}", "read,write,delete,execute";
+  permission java.io.FilePermission "${tempDir}${/}-", "read,write,delete,execute";
 
   // misc HardlinkCopyDirectoryWrapper needs this to test if hardlinks can be created
   permission java.nio.file.LinkPermission "hard";
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 f723a25..41d6a79 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/core/src/java/org/apache/solr/legacy/BBoxValueSource.java b/solr/core/src/java/org/apache/solr/legacy/BBoxValueSource.java
index 516f207..3106411 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/FastCharStream.java b/solr/core/src/java/org/apache/solr/parser/FastCharStream.java
index 767ffff..bc5d815 100644
--- a/solr/core/src/java/org/apache/solr/parser/FastCharStream.java
+++ b/solr/core/src/java/org/apache/solr/parser/FastCharStream.java
@@ -128,11 +128,23 @@ public final class FastCharStream implements CharStream {
   }
 
   @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/update/processor/AbstractDefaultValueUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/AbstractDefaultValueUpdateProcessorFactory.java
index 2186e2d..2862d4d 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/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
index a27ad2da..697981e 100644
--- a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
+++ b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
@@ -1219,7 +1219,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}"
@@ -1229,7 +1229,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"
@@ -1260,7 +1260,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/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 366b891..b298a83 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 f12ecce..290661f 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 7b5c6c4..f7eab53 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 = Collections.unmodifiableSet(new HashSet<>(Arrays.asList("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 0f494e3..1e1943a 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
@@ -239,6 +239,7 @@ public interface Variable {
     DISKTYPE;
 
     public final String tagName;
+    @SuppressWarnings("rawtypes")
     public final Class type;
     public Meta meta;
 
@@ -254,6 +255,7 @@ public interface Variable {
     final Variable impl;
 
 
+    @SuppressWarnings({"unchecked", "rawtypes"})
     Type() {
       try {
         meta = Type.class.getField(name()).getAnnotation(Meta.class);
@@ -377,6 +379,7 @@ public interface Variable {
   @interface Meta {
     String name();
 
+    @SuppressWarnings("rawtypes")
     Class type();
 
     String[] associatedPerNodeValue() default NULL;
@@ -401,6 +404,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 82645fd..01d0429 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());
@@ -1223,7 +1224,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");
@@ -1246,7 +1246,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 6c6eb25..9b088f5 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 dceb13c..b0c645b 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 e19d278..6af0d33 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 75db5a1..fee898e 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
@@ -91,6 +91,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 902223e..982dff4 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 ec11c78..1a8fc1c 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 926cf4c..07b215e 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 fd56d9d..4720f79 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 673bae7..f5c8423 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 0c86817..3821a6b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java
@@ -284,6 +284,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 8b4add6..4eb30f1 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 559203f..7dcc181 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 d700464..c52fd61 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 2acbd00..9870c0f 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 5a5fcdb..5990deb 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
@@ -245,6 +245,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();
 
@@ -1085,6 +1086,7 @@ public class ZkStateReader implements SolrCloseable {
     return Collections.unmodifiableMap(clusterProperties);
   }
 
+  @SuppressWarnings("unchecked")
   public synchronized void createClusterStateWatchersAndUpdate() throws KeeperException,
       InterruptedException {
     // We need to fetch the current cluster state and the set of live nodes
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 39a0242..0028922 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
@@ -276,6 +276,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 7a4abe2..d0c9f98 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 7d6f2e4..ed88476 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
@@ -70,6 +70,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/JsonSchemaValidator.java b/solr/solrj/src/java/org/apache/solr/common/util/JsonSchemaValidator.java
index b1fcc91..1952bca 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 ed8c797..f9d1476 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 ec40f97..57f2087 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 74f5b2d..1a25eb2 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 4eb3a3c..8da809f 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
@@ -83,6 +83,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 28c0019..eee37e1 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
@@ -39,6 +39,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> {
 
   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 5a64c3f..679de8a 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
@@ -283,7 +283,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 c87bb87..01910d0 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 27fd172..aee735f 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 92c5c62..230beb7 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 900ae71..315337c 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 1c9ba04..8fcd6da 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
@@ -823,7 +823,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 7ce58ad..3ecdbe4 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 3251fd7..699d632 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 b28b4b6..a766d2e 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 a34d5cc..9fc7376 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 66aa9f8..0379491 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 e6b3090..da52efa 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 15cdc0f..02e653f 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 8b2b35f..d708803 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 bb64248..a8320c8 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 a4cf9d2..0e05399 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 2194b8f..19f7c5b 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 60d93ac..4bec38b 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 6cdbfcf..ff6339f 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 d63ca6a..0d86217 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 f87c7f9..de31fae 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 b1d83ab..6fd63e4 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 09d0c0d..50e8cad 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 bbc6755..ef523df 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/ContentStreamTest.java b/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
index 2fc4f9a..fb73423 100644
--- a/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
@@ -123,13 +123,14 @@ public class ContentStreamTest extends SolrTestCaseJ4 {
 
   public void testURLStreamGZIP() throws IOException {
     File file = new File(createTempDir().toFile(), "README.gz");
-
-    try (InputStream is = new SolrResourceLoader().openResource("solrj/README");
-         FileOutputStream os = new FileOutputStream(file);
-         GZIPOutputStream zos = new GZIPOutputStream(os)) {
-      IOUtils.copy(is, zos);
+    try (SolrResourceLoader rl = new SolrResourceLoader()) {
+      try (InputStream is = rl.openResource("solrj/README");
+          FileOutputStream os = new FileOutputStream(file);
+          GZIPOutputStream zos = new GZIPOutputStream(os)) {
+        IOUtils.copy(is, zos);
+      }
     }
-
+    
     ContentStreamBase stream = new ContentStreamBase.URLStream(new URL(file.toURI().toASCIIString()));
     try (InputStream s = stream.getStream();
          FileInputStream fis = new FileInputStream(file);
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 8c06266..0d8cdec 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");