From 8696f549d449449cb2ba39e5bfe95a584f18ec01 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sun, 26 Dec 2010 19:16:42 +0000 Subject: [PATCH] LUCENE-2020: Remove unused imports git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1052926 13f79535-47bb-0310-9956-ffa450edef68 --- .../byTask/feeds/DemoHTMLParser.java | 1 - .../byTask/tasks/SearchWithCollectorTask.java | 2 -- .../byTask/tasks/CreateIndexTaskTest.java | 5 --- .../org/apache/lucene/demo/FileDocument.java | 1 - .../org/apache/lucene/demo/SearchFiles.java | 1 - .../InstantiatedDocsAndPositionsEnum.java | 1 - .../instantiated/InstantiatedIndexWriter.java | 1 - .../store/instantiated/TestEmptyIndex.java | 2 -- .../apache/lucene/misc/TestHighFreqTerms.java | 2 -- .../apache/lucene/search/TermsFilterTest.java | 2 -- ...ercaseExpandedTermsQueryNodeProcessor.java | 1 - .../TestRemoteCachingWrapperFilter.java | 2 -- .../lucene/search/TestRemoteSearchable.java | 2 -- .../apache/lucene/search/TestRemoteSort.java | 3 -- .../spatial/geohash/TestGeoHashUtils.java | 2 -- .../spatial/geometry/TestDistanceUnits.java | 2 -- .../lucene/search/spell/SuggestWord.java | 2 -- .../wordnet/TestSynonymTokenFilter.java | 4 --- .../lucene/analysis/NumericTokenStream.java | 1 - .../lucene/queryParser/QueryParser.java | 35 ++++--------------- .../apache/lucene/queryParser/QueryParser.jj | 23 ------------ .../lucene/queryParser/QueryParserBase.java | 2 +- .../queryParser/QueryParserTokenManager.java | 23 ------------ .../lucene/search/BoostAttributeImpl.java | 1 - .../lucene/search/ExactPhraseScorer.java | 1 - .../MaxNonCompetitiveBoostAttributeImpl.java | 1 - .../apache/lucene/search/PhraseScorer.java | 2 -- .../apache/lucene/search/QueryTermVector.java | 1 - .../apache/lucene/search/ScoringRewrite.java | 9 ----- .../lucene/search/TermCollectingRewrite.java | 1 - .../org/apache/lucene/search/TermScorer.java | 1 - .../payloads/AveragePayloadFunction.java | 1 - .../spans/SpanNearPayloadCheckQuery.java | 1 - .../org/apache/lucene/store/DataInput.java | 3 -- .../org/apache/lucene/store/FSDirectory.java | 1 - .../lucene/store/FileSwitchDirectory.java | 1 - .../apache/lucene/analysis/MockTokenizer.java | 1 - .../TestCharTermAttributeImpl.java | 1 - .../apache/lucene/index/TestByteSlices.java | 2 -- .../apache/lucene/index/TestIndexCommit.java | 2 -- .../lucene/index/TestIndexWriterConfig.java | 3 -- .../apache/lucene/index/TestIsCurrent.java | 2 -- .../apache/lucene/index/TestNRTThreads.java | 3 -- .../lucene/index/TestNoDeletionPolicy.java | 5 --- .../lucene/index/TestNoMergePolicy.java | 2 -- .../lucene/index/TestNoMergeScheduler.java | 2 -- .../index/TestParallelReaderEmptyIndex.java | 1 - .../lucene/index/TestParallelTermEnum.java | 1 - .../TestPersistentSnapshotDeletionPolicy.java | 2 -- .../org/apache/lucene/index/TestRollback.java | 1 - .../index/TestSnapshotDeletionPolicy.java | 5 --- .../lucene/index/TestStressIndexing.java | 2 -- .../lucene/index/TestThreadedOptimize.java | 3 -- .../index/codecs/preflex/TestSurrogates.java | 1 - .../lucene/search/BaseTestRangeFilter.java | 2 -- .../lucene/search/MultiCollectorTest.java | 2 -- .../apache/lucene/search/TestBoolean2.java | 2 -- .../lucene/search/TestCachingSpanFilter.java | 1 - .../search/TestCachingWrapperFilter.java | 1 - .../apache/lucene/search/TestDocIdSet.java | 1 - .../search/TestFieldCacheRangeFilter.java | 2 -- .../lucene/search/TestMultiSearcher.java | 1 - .../search/TestMultiTermConstantScore.java | 2 -- .../search/TestNumericRangeQuery32.java | 1 - .../search/TestNumericRangeQuery64.java | 1 - .../lucene/search/TestQueryWrapperFilter.java | 1 - .../org/apache/lucene/search/TestSort.java | 2 -- .../lucene/search/TestSubScorerFreqs.java | 2 -- .../lucene/search/TestTermRangeFilter.java | 2 -- .../search/function/TestCustomScoreQuery.java | 3 -- .../lucene/search/function/TestDocValues.java | 2 -- .../search/function/TestFieldScoreQuery.java | 1 - .../lucene/search/function/TestOrdValues.java | 1 - .../lucene/search/spans/TestBasics.java | 2 -- .../lucene/store/TestBufferedIndexInput.java | 1 - .../apache/lucene/store/TestCopyBytes.java | 1 - .../lucene/store/TestFileSwitchDirectory.java | 1 - .../lucene/util/TestCharacterUtils.java | 3 -- .../util/TestRecyclingByteBlockAllocator.java | 3 -- .../org/apache/lucene/util/TestSetOnce.java | 2 -- .../lucene/analysis/ar/ArabicAnalyzer.java | 3 -- .../commongrams/CommonGramsFilter.java | 1 - .../compound/hyphenation/PatternParser.java | 1 - .../lucene/analysis/core/StopAnalyzer.java | 2 -- .../lucene/analysis/cz/CzechAnalyzer.java | 2 -- .../lucene/analysis/fr/FrenchAnalyzer.java | 4 --- .../lucene/analysis/fr/FrenchStemFilter.java | 3 -- .../lucene/analysis/nl/DutchAnalyzer.java | 1 - .../standard/ClassicTokenizerImpl.java | 1 - .../commongrams/CommonGramsFilterTest.java | 2 -- .../compound/TestCompoundWordTokenFilter.java | 1 - .../lucene/analysis/cz/TestCzechAnalyzer.java | 4 --- .../TestLimitTokenCountAnalyzer.java | 1 - .../cn/smart/TestSmartChineseAnalyzer.java | 7 ---- .../lucene/analysis/pl/PolishAnalyzer.java | 1 - .../clustering/ClusteringComponent.java | 4 --- .../clustering/DocumentClusteringEngine.java | 3 -- .../clustering/carrot2/CarrotParams.java | 1 - .../AbstractClusteringTestCase.java | 2 -- .../clustering/ClusteringComponentTest.java | 2 -- .../carrot2/CarrotClusteringEngineTest.java | 2 -- .../handler/dataimport/HttpDataSource.java | 11 ------ .../solr/handler/dataimport/SolrWriter.java | 2 -- .../extraction/ExtractingRequestHandler.java | 1 - .../extraction/SolrContentHandler.java | 1 - .../handler/ExtractingRequestHandlerTest.java | 3 -- .../org/apache/solr/common/util/DateUtil.java | 1 - .../analysis/ClassicTokenizerFactory.java | 2 -- .../solr/analysis/PhoneticFilterFactory.java | 1 - .../src/java/org/apache/solr/core/Config.java | 3 -- .../apache/solr/core/RefCntRamDirectory.java | 1 - .../java/org/apache/solr/core/SolrCore.java | 2 -- .../apache/solr/core/SolrEventListener.java | 1 - .../solr/core/StandardIndexReaderFactory.java | 1 - .../solr/handler/MoreLikeThisHandler.java | 2 -- .../solr/handler/RequestHandlerBase.java | 2 -- .../solr/handler/StandardRequestHandler.java | 1 - .../solr/handler/XmlUpdateRequestHandler.java | 3 -- .../solr/handler/admin/CoreAdminHandler.java | 2 -- .../solr/handler/admin/PluginInfoHandler.java | 1 - .../handler/admin/ShowFileRequestHandler.java | 1 - .../handler/admin/SolrInfoMBeanHandler.java | 2 -- .../solr/handler/admin/SystemInfoHandler.java | 2 -- .../solr/handler/admin/ThreadDumpHandler.java | 1 - .../handler/component/PivotFacetHelper.java | 3 -- .../component/QueryElevationComponent.java | 1 - .../handler/component/SearchComponent.java | 3 -- .../solr/handler/component/SearchHandler.java | 1 - .../component/SpellCheckComponent.java | 2 -- .../component/TermVectorComponent.java | 4 --- .../handler/component/TermsComponent.java | 1 - .../highlight/DefaultSolrHighlighter.java | 2 -- .../solr/highlight/SolrHighlighter.java | 1 - .../org/apache/solr/request/SimpleFacets.java | 1 - .../apache/solr/request/SolrQueryRequest.java | 1 - .../solr/request/SolrQueryRequestBase.java | 2 -- .../response/BinaryQueryResponseWriter.java | 1 - .../solr/response/TextResponseWriter.java | 1 - .../org/apache/solr/response/XMLWriter.java | 1 - .../org/apache/solr/schema/BCDLongField.java | 2 -- .../org/apache/solr/schema/BCDStrField.java | 2 -- .../solr/schema/CoordinateFieldType.java | 15 -------- .../apache/solr/schema/SpatialQueryable.java | 1 - .../search/ExtendedDismaxQParserPlugin.java | 1 - .../solr/search/FieldQParserPlugin.java | 10 ------ .../search/FunctionRangeQParserPlugin.java | 2 -- .../solr/search/LuceneQParserPlugin.java | 1 - .../solr/search/LuceneQueryOptimizer.java | 1 - .../solr/search/NestedQParserPlugin.java | 3 -- .../org/apache/solr/search/QueryParsing.java | 4 --- .../apache/solr/search/QueryResultKey.java | 4 --- .../org/apache/solr/search/SolrCacheBase.java | 10 ------ .../apache/solr/search/SolrIndexSearcher.java | 1 - .../solr/search/SpatialFilterQParser.java | 1 - .../solr/search/function/ByteFieldSource.java | 6 +--- .../search/function/ConstNumberSource.java | 5 --- .../search/function/DoubleFieldSource.java | 3 -- .../solr/search/function/FileFloatSource.java | 1 - .../solr/search/function/IDFValueSource.java | 3 -- .../solr/search/function/IntFieldSource.java | 4 --- .../solr/search/function/NormValueSource.java | 2 -- .../solr/search/function/OrdFieldSource.java | 1 - .../search/function/PowFloatFunction.java | 4 --- .../search/function/ShortFieldSource.java | 4 --- .../search/function/SumFloatFunction.java | 7 ---- .../search/function/TermFreqValueSource.java | 2 -- .../solr/search/function/ValueSource.java | 1 - .../function/ValueSourceRangeFilter.java | 1 - .../spelling/AbstractLuceneSpellChecker.java | 1 - .../solr/spelling/SolrSpellChecker.java | 3 -- .../solr/spelling/SpellCheckCollator.java | 3 -- .../solr/update/DirectUpdateHandler2.java | 1 - .../update/processor/Lookup3Signature.java | 6 ---- .../SignatureUpdateProcessorFactory.java | 4 --- .../org/apache/solr/util/DateMathParser.java | 1 - .../org/apache/solr/util/SolrPluginUtils.java | 3 -- .../org/apache/solr/util/TestHarness.java | 4 --- .../util/plugin/AbstractPluginLoader.java | 1 - .../client/solrj/impl/LBHttpSolrServer.java | 2 -- .../request/ContentStreamUpdateRequest.java | 6 ---- .../client/solrj/request/UpdateRequest.java | 4 --- .../client/solrj/response/PivotField.java | 1 - .../solrj/response/SolrPingResponse.java | 2 -- .../client/solrj/response/UpdateResponse.java | 2 -- .../apache/solr/BasicFunctionalityTest.java | 4 --- .../org/apache/solr/ConvertedLegacyTest.java | 1 - .../apache/solr/DisMaxRequestHandlerTest.java | 2 -- .../test/org/apache/solr/JSONTestUtil.java | 4 --- .../org/apache/solr/MinimalSchemaTest.java | 2 -- .../org/apache/solr/OutputWriterTest.java | 2 -- solr/src/test/org/apache/solr/SampleTest.java | 2 -- .../org/apache/solr/SolrInfoMBeanTest.java | 3 -- .../test/org/apache/solr/SolrTestCaseJ4.java | 3 -- .../apache/solr/TestDistributedSearch.java | 3 -- .../org/apache/solr/TestGroupingSearch.java | 1 - solr/src/test/org/apache/solr/TestTrie.java | 3 -- .../solr/analysis/TestRussianFilters.java | 1 - .../solr/analysis/TestTrimFilterFactory.java | 9 ----- .../client/solrj/LargeVolumeTestBase.java | 2 -- .../client/solrj/SolrExampleBinaryTest.java | 1 - .../solr/client/solrj/SolrExampleTests.java | 2 -- .../solr/client/solrj/SolrExceptionTest.java | 4 --- .../solr/client/solrj/TestBatchUpdate.java | 2 -- .../solrj/beans/TestDocumentObjectBinder.java | 1 - .../embedded/LargeVolumeBinaryJettyTest.java | 3 -- .../embedded/LargeVolumeEmbeddedTest.java | 1 - .../solrj/embedded/LargeVolumeJettyTest.java | 2 -- .../embedded/SolrExampleEmbeddedTest.java | 1 - .../solrj/embedded/SolrExampleJettyTest.java | 3 -- .../response/AnlysisResponseBaseTest.java | 1 - .../DocumentAnalysisResponseTest.java | 2 -- .../response/FieldAnalysisResponseTest.java | 1 - .../solrj/response/QueryResponseTest.java | 3 -- .../solrj/response/TermsResponseTest.java | 3 -- .../response/TestSpellCheckResponse.java | 14 -------- .../apache/solr/cloud/ZkControllerTest.java | 1 - .../solr/common/util/TestFastInputStream.java | 2 -- .../solr/core/AlternateDirectoryTest.java | 1 - .../solr/core/IndexReaderFactoryTest.java | 4 --- .../solr/core/RAMDirectoryFactoryTest.java | 4 --- .../org/apache/solr/core/SOLR749Test.java | 1 - .../org/apache/solr/core/SolrCoreTest.java | 1 - .../solr/core/TestArbitraryIndexDir.java | 1 - .../test/org/apache/solr/core/TestConfig.java | 5 --- .../apache/solr/core/TestJmxMonitoredMap.java | 2 -- .../solr/core/TestQuerySenderListener.java | 1 - .../solr/core/TestSolrDeletionPolicy1.java | 2 -- .../solr/core/TestSolrDeletionPolicy2.java | 1 - .../AnalysisRequestHandlerTestBase.java | 2 -- .../DocumentAnalysisRequestHandlerTest.java | 2 -- .../FieldAnalysisRequestHandlerTest.java | 2 -- .../solr/handler/MoreLikeThisHandlerTest.java | 4 --- .../apache/solr/handler/TestCSVLoader.java | 1 - .../solr/handler/TestReplicationHandler.java | 3 -- .../DistributedSpellCheckComponentTest.java | 3 -- .../DistributedTermsComponentTest.java | 1 - .../QueryElevationComponentTest.java | 2 -- .../component/SpellCheckComponentTest.java | 3 -- .../handler/component/StatsComponentTest.java | 10 ------ .../component/TermVectorComponentTest.java | 5 --- .../handler/component/TermsComponentTest.java | 3 -- .../highlight/FastVectorHighlighterTest.java | 3 -- .../solr/highlight/HighlighterTest.java | 5 --- .../apache/solr/request/JSONWriterTest.java | 3 -- .../apache/solr/request/SimpleFacetsTest.java | 1 - .../org/apache/solr/request/TestFaceting.java | 2 -- .../solr/response/TestCSVResponseWriter.java | 4 --- .../solr/schema/BadIndexSchemaTest.java | 4 --- .../org/apache/solr/schema/CopyFieldTest.java | 2 -- .../org/apache/solr/schema/DateFieldTest.java | 5 --- .../apache/solr/schema/IndexSchemaTest.java | 2 -- .../solr/schema/NotRequiredUniqueKeyTest.java | 1 - .../org/apache/solr/schema/PolyFieldTest.java | 8 ----- .../solr/schema/RequiredFieldsTest.java | 2 -- .../apache/solr/schema/TestBinaryField.java | 3 -- .../apache/solr/search/QueryParsingTest.java | 2 -- .../apache/solr/search/SpatialFilterTest.java | 1 - .../apache/solr/search/TestRangeQuery.java | 4 --- .../apache/solr/search/TestSearchPerf.java | 1 - .../solr/search/TestSolrQueryParser.java | 1 - .../search/function/TestFunctionQuery.java | 4 --- .../distance/DistanceFunctionTest.java | 2 -- .../apache/solr/servlet/CacheHeaderTest.java | 2 -- .../solr/servlet/CacheHeaderTestBase.java | 6 ---- .../solr/servlet/NoCacheHeaderTest.java | 2 -- .../solr/servlet/SolrRequestParserTest.java | 2 -- .../spelling/FileBasedSpellCheckerTest.java | 2 -- .../spelling/IndexBasedSpellCheckerTest.java | 4 --- .../solr/spelling/SpellCheckCollatorTest.java | 4 --- .../SpellPossibilityIteratorTest.java | 2 -- .../solr/update/DirectUpdateHandlerTest.java | 2 -- .../solr/update/DocumentBuilderTest.java | 2 -- .../SignatureUpdateProcessorFactoryTest.java | 2 -- .../apache/solr/util/SolrPluginUtilsTest.java | 6 ---- .../solrj/embedded/JettySolrRunner.java | 1 - .../servlet/cache/HttpCacheHeaderUtil.java | 1 - 276 files changed, 8 insertions(+), 735 deletions(-) diff --git a/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java b/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java index 85824f9de55..d57777a0036 100755 --- a/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java +++ b/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java @@ -19,7 +19,6 @@ package org.apache.lucene.benchmark.byTask.feeds; import java.io.IOException; import java.io.Reader; -import java.io.StringReader; import java.text.DateFormat; import java.text.ParseException; import java.util.Date; diff --git a/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java b/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java index 90725e5cde8..b6545406aa9 100644 --- a/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java +++ b/lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/SearchWithCollectorTask.java @@ -22,8 +22,6 @@ import org.apache.lucene.benchmark.byTask.utils.Config; import org.apache.lucene.search.Collector; import org.apache.lucene.search.TopScoreDocCollector; -import java.io.IOException; - /** * Does search w/ a custom collector */ diff --git a/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java b/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java index 2abc00e8a8b..6bab78840b2 100644 --- a/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java +++ b/lucene/contrib/benchmark/src/test/org/apache/lucene/benchmark/byTask/tasks/CreateIndexTaskTest.java @@ -19,20 +19,15 @@ package org.apache.lucene.benchmark.byTask.tasks; import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.IOException; import java.io.PrintStream; import java.util.Properties; import org.apache.lucene.benchmark.BenchmarkTestCase; import org.apache.lucene.benchmark.byTask.PerfRunData; import org.apache.lucene.benchmark.byTask.utils.Config; -import org.apache.lucene.index.CorruptIndexException; -import org.apache.lucene.index.IndexWriter; -import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.index.NoDeletionPolicy; import org.apache.lucene.index.NoMergePolicy; import org.apache.lucene.index.NoMergeScheduler; -import org.apache.lucene.store.LockObtainFailedException; import org.apache.lucene.util.Version; diff --git a/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java index b81cdbb8cd8..d635e6e07e7 100644 --- a/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java +++ b/lucene/contrib/demo/src/java/org/apache/lucene/demo/FileDocument.java @@ -19,7 +19,6 @@ package org.apache.lucene.demo; import java.io.File; import java.io.FileInputStream; -import java.io.FileReader; import java.io.InputStreamReader; import org.apache.lucene.document.DateTools; diff --git a/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java b/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java index 0d76e4c316d..c8767710420 100644 --- a/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java +++ b/lucene/contrib/demo/src/java/org/apache/lucene/demo/SearchFiles.java @@ -20,7 +20,6 @@ package org.apache.lucene.demo; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; -import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Date; diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java index 0ef160dac6e..816e454673e 100644 --- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java +++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedDocsAndPositionsEnum.java @@ -19,7 +19,6 @@ package org.apache.lucene.store.instantiated; import org.apache.lucene.index.DocsAndPositionsEnum; import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; -import java.util.Arrays; public class InstantiatedDocsAndPositionsEnum extends DocsAndPositionsEnum { private int upto; diff --git a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java index 59a3b45746a..093b907193b 100644 --- a/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java +++ b/lucene/contrib/instantiated/src/java/org/apache/lucene/store/instantiated/InstantiatedIndexWriter.java @@ -39,7 +39,6 @@ import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.document.Document; import org.apache.lucene.document.Fieldable; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermVectorOffsetInfo; import org.apache.lucene.search.Similarity; diff --git a/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java b/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java index 61dd6644860..f8dad95f6f6 100644 --- a/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java +++ b/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestEmptyIndex.java @@ -18,8 +18,6 @@ package org.apache.lucene.store.instantiated; import java.io.IOException; import java.util.Arrays; -import java.util.Random; - import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; diff --git a/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java b/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java index dd2403dd9c6..4f164e72b7b 100644 --- a/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java +++ b/lucene/contrib/misc/src/test/org/apache/lucene/misc/TestHighFreqTerms.java @@ -17,8 +17,6 @@ package org.apache.lucene.misc; * limitations under the License. */ -import java.util.Random; - import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.util.BytesRef; diff --git a/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java b/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java index 1eb7dd442c6..454b6de9165 100644 --- a/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java +++ b/lucene/contrib/queries/src/test/org/apache/lucene/search/TermsFilterTest.java @@ -18,8 +18,6 @@ package org.apache.lucene.search; */ import java.util.HashSet; -import java.util.Random; - import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; diff --git a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java index 14f5f5d32ea..c9527651e62 100644 --- a/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java +++ b/lucene/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/processors/LowercaseExpandedTermsQueryNodeProcessor.java @@ -21,7 +21,6 @@ import java.util.List; import org.apache.lucene.queryParser.core.QueryNodeException; import org.apache.lucene.queryParser.core.config.QueryConfigHandler; -import org.apache.lucene.queryParser.core.nodes.FieldQueryNode; import org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode; import org.apache.lucene.queryParser.core.nodes.ParametricQueryNode; import org.apache.lucene.queryParser.core.nodes.QueryNode; diff --git a/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java b/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java index 1249263cc80..868a3fc1394 100644 --- a/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java +++ b/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteCachingWrapperFilter.java @@ -31,8 +31,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * Tests that the index is cached on the searcher side of things. */ diff --git a/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java b/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java index dc1c8156d1f..29c324d6f6c 100644 --- a/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java +++ b/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSearchable.java @@ -26,8 +26,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.Collections; import java.util.Set; import java.util.HashSet; diff --git a/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java b/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java index 88bf2bceb86..1f0ad581f9f 100644 --- a/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java +++ b/lucene/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java @@ -17,8 +17,6 @@ package org.apache.lucene.search; * limitations under the License. */ -import static org.junit.Assert.assertEquals; - import java.io.IOException; import java.util.HashMap; import java.util.Iterator; @@ -30,7 +28,6 @@ import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; -import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.Term; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; diff --git a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java index 112ae1421d9..42b56fbbb28 100644 --- a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java +++ b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geohash/TestGeoHashUtils.java @@ -17,8 +17,6 @@ package org.apache.lucene.spatial.geohash; -import static junit.framework.Assert.*; - import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; diff --git a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java index bc1df218b1c..509e7009799 100644 --- a/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java +++ b/lucene/contrib/spatial/src/test/org/apache/lucene/spatial/geometry/TestDistanceUnits.java @@ -1,7 +1,5 @@ package org.apache.lucene.spatial.geometry; -import static junit.framework.Assert.*; - import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; diff --git a/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java b/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java index 6a88818110a..3e436d7ea77 100755 --- a/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java +++ b/lucene/contrib/spellchecker/src/java/org/apache/lucene/search/spell/SuggestWord.java @@ -1,7 +1,5 @@ package org.apache.lucene.search.spell; -import java.util.Comparator; - /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java b/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java index 847c952d2a3..89faf4b83af 100644 --- a/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java +++ b/lucene/contrib/wordnet/src/test/org/apache/lucene/wordnet/TestSynonymTokenFilter.java @@ -17,8 +17,6 @@ package org.apache.lucene.wordnet; * limitations under the License. */ -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.Reader; @@ -27,8 +25,6 @@ import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; -import org.apache.lucene.analysis.core.LowerCaseFilter; -import org.apache.lucene.analysis.core.WhitespaceTokenizer; public class TestSynonymTokenFilter extends BaseTokenStreamTestCase { final String testFile = "testSynonyms.txt"; diff --git a/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java b/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java index 1a0c11c2d55..bed4c06c1a6 100644 --- a/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java +++ b/lucene/src/java/org/apache/lucene/analysis/NumericTokenStream.java @@ -19,7 +19,6 @@ package org.apache.lucene.analysis; import org.apache.lucene.util.Attribute; import org.apache.lucene.util.AttributeImpl; -import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.NumericUtils; import org.apache.lucene.document.NumericField; // for javadocs diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java index 1ac58a20b05..f3ed3488d18 100644 --- a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java +++ b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.java @@ -1,41 +1,18 @@ /* Generated By:JavaCC: Do not edit this line. QueryParser.java */ package org.apache.lucene.queryParser; -import java.io.IOException; import java.io.StringReader; -import java.text.Collator; -import java.text.DateFormat; import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Locale; -import java.util.Map; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.CachingTokenFilter; -import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; -import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; import org.apache.lucene.document.DateTools; -import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; -import org.apache.lucene.search.BooleanQuery; -import org.apache.lucene.search.FuzzyQuery; -import org.apache.lucene.search.MultiTermQuery; -import org.apache.lucene.search.MatchAllDocsQuery; -import org.apache.lucene.search.MultiPhraseQuery; -import org.apache.lucene.search.PhraseQuery; -import org.apache.lucene.search.PrefixQuery; -import org.apache.lucene.search.RegexpQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermRangeQuery; import org.apache.lucene.search.TermQuery; -import org.apache.lucene.search.WildcardQuery; -import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Version; -import org.apache.lucene.util.VirtualMethod; /** * This class is generated by JavaCC. The most important method is @@ -500,12 +477,6 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants finally { jj_save(0, xla); } } - private boolean jj_3R_3() { - if (jj_scan_token(STAR)) return true; - if (jj_scan_token(COLON)) return true; - return false; - } - private boolean jj_3R_2() { if (jj_scan_token(TERM)) return true; if (jj_scan_token(COLON)) return true; @@ -522,6 +493,12 @@ public class QueryParser extends QueryParserBase implements QueryParserConstants return false; } + private boolean jj_3R_3() { + if (jj_scan_token(STAR)) return true; + if (jj_scan_token(COLON)) return true; + return false; + } + /** Generated Token Manager. */ public QueryParserTokenManager token_source; /** Current token. */ diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj index dfc4ebf5afd..21087bdc1d7 100644 --- a/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj +++ b/lucene/src/java/org/apache/lucene/queryParser/QueryParser.jj @@ -25,41 +25,18 @@ PARSER_BEGIN(QueryParser) package org.apache.lucene.queryParser; -import java.io.IOException; import java.io.StringReader; -import java.text.Collator; -import java.text.DateFormat; import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Locale; -import java.util.Map; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.CachingTokenFilter; -import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; -import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; import org.apache.lucene.document.DateTools; -import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; -import org.apache.lucene.search.BooleanQuery; -import org.apache.lucene.search.FuzzyQuery; -import org.apache.lucene.search.MultiTermQuery; -import org.apache.lucene.search.MatchAllDocsQuery; -import org.apache.lucene.search.MultiPhraseQuery; -import org.apache.lucene.search.PhraseQuery; -import org.apache.lucene.search.PrefixQuery; -import org.apache.lucene.search.RegexpQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermRangeQuery; import org.apache.lucene.search.TermQuery; -import org.apache.lucene.search.WildcardQuery; -import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Version; -import org.apache.lucene.util.VirtualMethod; /** * This class is generated by JavaCC. The most important method is diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java b/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java index c9e0a34ad35..078e2adfb63 100644 --- a/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java +++ b/lucene/src/java/org/apache/lucene/queryParser/QueryParserBase.java @@ -36,7 +36,7 @@ import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Version; /** This class is overridden by QueryParser in QueryParser.jj - * and acts to eparate the majority of the Java code from the .jj grammar file. + * and acts to separate the majority of the Java code from the .jj grammar file. */ public abstract class QueryParserBase { diff --git a/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java b/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java index 8fedc1fbbde..fc5fe57156a 100644 --- a/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java +++ b/lucene/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java @@ -1,39 +1,16 @@ /* Generated By:JavaCC: Do not edit this line. QueryParserTokenManager.java */ package org.apache.lucene.queryParser; -import java.io.IOException; import java.io.StringReader; -import java.text.Collator; -import java.text.DateFormat; import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; import java.util.List; import java.util.Locale; -import java.util.Map; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.CachingTokenFilter; -import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; -import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; import org.apache.lucene.document.DateTools; -import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; -import org.apache.lucene.search.BooleanQuery; -import org.apache.lucene.search.FuzzyQuery; -import org.apache.lucene.search.MultiTermQuery; -import org.apache.lucene.search.MatchAllDocsQuery; -import org.apache.lucene.search.MultiPhraseQuery; -import org.apache.lucene.search.PhraseQuery; -import org.apache.lucene.search.PrefixQuery; -import org.apache.lucene.search.RegexpQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermRangeQuery; import org.apache.lucene.search.TermQuery; -import org.apache.lucene.search.WildcardQuery; -import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.Version; -import org.apache.lucene.util.VirtualMethod; /** Token Manager. */ public class QueryParserTokenManager implements QueryParserConstants diff --git a/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java b/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java index ad59d92c204..28ce30ee023 100644 --- a/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java +++ b/lucene/src/java/org/apache/lucene/search/BoostAttributeImpl.java @@ -17,7 +17,6 @@ package org.apache.lucene.search; * limitations under the License. */ -import org.apache.lucene.util.Attribute; import org.apache.lucene.util.AttributeImpl; /** Implementation class for {@link BoostAttribute}. diff --git a/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java b/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java index aa8014a552a..f2c94a7ae6f 100644 --- a/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java +++ b/lucene/src/java/org/apache/lucene/search/ExactPhraseScorer.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.Arrays; import org.apache.lucene.index.*; -import org.apache.lucene.search.BooleanClause.Occur; final class ExactPhraseScorer extends Scorer { private final byte[] norms; diff --git a/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java b/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java index d7b7e951f3b..e4ffe304084 100644 --- a/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java +++ b/lucene/src/java/org/apache/lucene/search/MaxNonCompetitiveBoostAttributeImpl.java @@ -17,7 +17,6 @@ package org.apache.lucene.search; * limitations under the License. */ -import org.apache.lucene.util.Attribute; import org.apache.lucene.util.AttributeImpl; import org.apache.lucene.util.BytesRef; diff --git a/lucene/src/java/org/apache/lucene/search/PhraseScorer.java b/lucene/src/java/org/apache/lucene/search/PhraseScorer.java index a82df03d027..1f9dc6375c6 100644 --- a/lucene/src/java/org/apache/lucene/search/PhraseScorer.java +++ b/lucene/src/java/org/apache/lucene/search/PhraseScorer.java @@ -19,8 +19,6 @@ package org.apache.lucene.search; import java.io.IOException; -import org.apache.lucene.search.BooleanClause.Occur; - /** Expert: Scoring functionality for phrase queries. *
A document is considered matching if it contains the phrase-query terms * at "valid" positions. What "valid positions" are diff --git a/lucene/src/java/org/apache/lucene/search/QueryTermVector.java b/lucene/src/java/org/apache/lucene/search/QueryTermVector.java index 0914920b6f1..70922b1b3d7 100644 --- a/lucene/src/java/org/apache/lucene/search/QueryTermVector.java +++ b/lucene/src/java/org/apache/lucene/search/QueryTermVector.java @@ -28,7 +28,6 @@ import java.util.Map; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute; import org.apache.lucene.index.TermFreqVector; import org.apache.lucene.util.ArrayUtil; diff --git a/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java b/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java index 03c3958dee0..545960150d2 100644 --- a/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java +++ b/lucene/src/java/org/apache/lucene/search/ScoringRewrite.java @@ -18,21 +18,12 @@ package org.apache.lucene.search; */ import java.io.IOException; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.PriorityQueue; -import java.util.Comparator; - import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.search.MultiTermQuery.RewriteMethod; import org.apache.lucene.util.ArrayUtil; -import org.apache.lucene.util.AttributeSource; import org.apache.lucene.util.ByteBlockPool; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.BytesRefHash; diff --git a/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java b/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java index 12a63f8b7f0..e710b96c145 100644 --- a/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java +++ b/lucene/src/java/org/apache/lucene/search/TermCollectingRewrite.java @@ -18,7 +18,6 @@ package org.apache.lucene.search; */ import java.io.IOException; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Comparator; diff --git a/lucene/src/java/org/apache/lucene/search/TermScorer.java b/lucene/src/java/org/apache/lucene/search/TermScorer.java index 13329ca910a..48ddd3e05cd 100644 --- a/lucene/src/java/org/apache/lucene/search/TermScorer.java +++ b/lucene/src/java/org/apache/lucene/search/TermScorer.java @@ -20,7 +20,6 @@ package org.apache.lucene.search; import java.io.IOException; import org.apache.lucene.index.DocsEnum; -import org.apache.lucene.search.BooleanClause.Occur; /** Expert: A Scorer for documents matching a Term. */ diff --git a/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java b/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java index 7c62e36bf68..31bbc88dd3c 100644 --- a/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java +++ b/lucene/src/java/org/apache/lucene/search/payloads/AveragePayloadFunction.java @@ -1,6 +1,5 @@ package org.apache.lucene.search.payloads; -import java.io.IOException; import org.apache.lucene.search.Explanation; /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java b/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java index 3618adc6390..5fce135941b 100644 --- a/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java +++ b/lucene/src/java/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.java @@ -21,7 +21,6 @@ import org.apache.lucene.util.ToStringUtils; import java.io.IOException; import java.util.Arrays; import java.util.Collection; -import java.util.Iterator; /** diff --git a/lucene/src/java/org/apache/lucene/store/DataInput.java b/lucene/src/java/org/apache/lucene/store/DataInput.java index 38eea6b5fe7..d6242b58b0a 100644 --- a/lucene/src/java/org/apache/lucene/store/DataInput.java +++ b/lucene/src/java/org/apache/lucene/store/DataInput.java @@ -21,9 +21,6 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.util.ArrayUtil; -import org.apache.lucene.util.RamUsageEstimator; - /** * Abstract base class for performing read operations of Lucene's low-level * data types. diff --git a/lucene/src/java/org/apache/lucene/store/FSDirectory.java b/lucene/src/java/org/apache/lucene/store/FSDirectory.java index 43c119d7272..d2eb3b6c7e6 100644 --- a/lucene/src/java/org/apache/lucene/store/FSDirectory.java +++ b/lucene/src/java/org/apache/lucene/store/FSDirectory.java @@ -26,7 +26,6 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Collection; -import java.util.Collections; import static java.util.Collections.synchronizedSet; import java.util.HashSet; import java.util.Set; diff --git a/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java b/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java index 2e473beb73b..55236b471b7 100644 --- a/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java +++ b/lucene/src/java/org/apache/lucene/store/FileSwitchDirectory.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.List; import java.util.Set; import java.util.HashSet; diff --git a/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java b/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java index 539692021b8..017f828931f 100644 --- a/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java +++ b/lucene/src/test/org/apache/lucene/analysis/MockTokenizer.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.Reader; import org.apache.lucene.util.Version; -import org.apache.lucene.util.AttributeSource.AttributeFactory; import org.apache.lucene.util.automaton.CharacterRunAutomaton; import org.apache.lucene.util.automaton.RegExp; diff --git a/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java b/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java index e7255db91bf..622f83d6e68 100644 --- a/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java +++ b/lucene/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java @@ -23,7 +23,6 @@ import java.nio.CharBuffer; import java.util.Formatter; import java.util.Locale; import java.util.regex.Pattern; -import java.util.Random; public class TestCharTermAttributeImpl extends LuceneTestCase { diff --git a/lucene/src/test/org/apache/lucene/index/TestByteSlices.java b/lucene/src/test/org/apache/lucene/index/TestByteSlices.java index 5e3a795990f..0da34c97666 100644 --- a/lucene/src/test/org/apache/lucene/index/TestByteSlices.java +++ b/lucene/src/test/org/apache/lucene/index/TestByteSlices.java @@ -14,8 +14,6 @@ package org.apache.lucene.index; * limitations under the License. */ -import java.util.concurrent.locks.ReentrantLock; - import org.apache.lucene.util.ByteBlockPool; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.RecyclingByteBlockAllocator; diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java b/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java index 4760c1eb256..d6482b1d35e 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexCommit.java @@ -17,8 +17,6 @@ package org.apache.lucene.index; * limitations under the License. */ -import static org.junit.Assert.*; - import java.io.IOException; import java.util.Collection; import java.util.Map; diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriterConfig.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriterConfig.java index 29ea32d42fa..ce80ec38557 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriterConfig.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriterConfig.java @@ -17,8 +17,6 @@ package org.apache.lucene.index; * limitations under the License. */ -import static org.junit.Assert.*; - import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -32,7 +30,6 @@ import org.apache.lucene.index.IndexWriter.IndexReaderWarmer; import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.search.DefaultSimilarity; import org.apache.lucene.search.Similarity; -import org.apache.lucene.store.Directory; import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; diff --git a/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java b/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java index f389ececb0c..8e41d522607 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java +++ b/lucene/src/test/org/apache/lucene/index/TestIsCurrent.java @@ -18,13 +18,11 @@ package org.apache.lucene.index; */ import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.util.*; import org.apache.lucene.store.*; -import static org.junit.Assert.*; import org.junit.Test; import java.io.IOException; diff --git a/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java b/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java index 39ae987f383..3024d470553 100644 --- a/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java +++ b/lucene/src/test/org/apache/lucene/index/TestNRTThreads.java @@ -45,9 +45,6 @@ import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; import org.junit.Test; -import static org.junit.Assert.*; -import static org.junit.Assume.*; - // TODO // - mix in optimize, addIndexes // - randomoly mix in non-congruent docs diff --git a/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java b/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java index 0ff9d09e9d2..194afdf5f9b 100644 --- a/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java +++ b/lucene/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java @@ -17,17 +17,12 @@ package org.apache.lucene.index; * limitations under the License. */ -import static org.junit.Assert.*; - import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Arrays; -import java.util.Random; - import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.store.Directory; diff --git a/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java b/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java index 6dbbecb146b..e73b0b3c0e0 100644 --- a/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java +++ b/lucene/src/test/org/apache/lucene/index/TestNoMergePolicy.java @@ -17,8 +17,6 @@ package org.apache.lucene.index; * limitations under the License. */ -import static org.junit.Assert.*; - import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; diff --git a/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java b/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java index baff63e9e96..78fb4dc4e94 100644 --- a/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java +++ b/lucene/src/test/org/apache/lucene/index/TestNoMergeScheduler.java @@ -17,8 +17,6 @@ package org.apache.lucene.index; * limitations under the License. */ -import static org.junit.Assert.*; - import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; diff --git a/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java b/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java index 9161b60b5b0..08c7bc3b757 100644 --- a/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java +++ b/lucene/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java @@ -25,7 +25,6 @@ import org.apache.lucene.util._TestUtil; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.document.Field.TermVector; diff --git a/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java b/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java index 632a7a7fcc4..51be9791a7c 100755 --- a/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java +++ b/lucene/src/test/org/apache/lucene/index/TestParallelTermEnum.java @@ -22,7 +22,6 @@ import java.io.IOException; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.store.Directory; diff --git a/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java b/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java index 2ee907eb0df..fb80fdae884 100644 --- a/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java +++ b/lucene/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java @@ -17,8 +17,6 @@ package org.apache.lucene.index; * the License. */ -import static org.junit.Assert.*; - import java.io.IOException; import java.util.Map; import java.util.Map.Entry; diff --git a/lucene/src/test/org/apache/lucene/index/TestRollback.java b/lucene/src/test/org/apache/lucene/index/TestRollback.java index 2224554ea02..c1a0d1fb4f2 100644 --- a/lucene/src/test/org/apache/lucene/index/TestRollback.java +++ b/lucene/src/test/org/apache/lucene/index/TestRollback.java @@ -19,7 +19,6 @@ package org.apache.lucene.index; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.store.Directory; diff --git a/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java b/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java index b7cf02ee99a..e2899a66393 100644 --- a/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java +++ b/lucene/src/test/org/apache/lucene/index/TestSnapshotDeletionPolicy.java @@ -1,17 +1,13 @@ package org.apache.lucene.index; -import static org.junit.Assert.*; - import java.util.Collection; import java.util.Map; import java.util.Random; -import java.io.File; import java.io.IOException; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.store.Directory; -import org.apache.lucene.store.FSDirectory; import org.apache.lucene.store.IndexInput; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.index.IndexCommit; @@ -21,7 +17,6 @@ import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.SnapshotDeletionPolicy; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.ThreadInterruptedException; -import org.apache.lucene.util._TestUtil; import org.junit.Test; // diff --git a/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java b/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java index fd7d3ca1f59..00f5448f9e3 100644 --- a/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java +++ b/lucene/src/test/org/apache/lucene/index/TestStressIndexing.java @@ -23,8 +23,6 @@ import org.apache.lucene.document.*; import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.search.*; -import java.io.File; - public class TestStressIndexing extends LuceneTestCase { private static abstract class TimedThread extends Thread { volatile boolean failed; diff --git a/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java b/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java index 7cabe7c258a..c2f988422d3 100644 --- a/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java +++ b/lucene/src/test/org/apache/lucene/index/TestThreadedOptimize.java @@ -21,16 +21,13 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.store.Directory; -import org.apache.lucene.store.FSDirectory; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexWriterConfig.OpenMode; -import org.apache.lucene.util._TestUtil; import org.apache.lucene.util.English; import org.apache.lucene.util.LuceneTestCase; -import java.io.File; import java.util.Random; public class TestThreadedOptimize extends LuceneTestCase { diff --git a/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java b/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java index 720fa5059af..97c5908d509 100644 --- a/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java +++ b/lucene/src/test/org/apache/lucene/index/codecs/preflex/TestSurrogates.java @@ -27,7 +27,6 @@ import org.apache.lucene.util.*; import java.util.*; import java.io.IOException; -import static org.junit.Assert.*; import org.junit.Test; public class TestSurrogates extends LuceneTestCase { diff --git a/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java b/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java index 0ac5192350b..332ba958698 100644 --- a/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java +++ b/lucene/src/test/org/apache/lucene/search/BaseTestRangeFilter.java @@ -33,8 +33,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - public class BaseTestRangeFilter extends LuceneTestCase { public static final boolean F = false; diff --git a/lucene/src/test/org/apache/lucene/search/MultiCollectorTest.java b/lucene/src/test/org/apache/lucene/search/MultiCollectorTest.java index f995a2ad5e4..ae988c04ad2 100644 --- a/lucene/src/test/org/apache/lucene/search/MultiCollectorTest.java +++ b/lucene/src/test/org/apache/lucene/search/MultiCollectorTest.java @@ -17,8 +17,6 @@ package org.apache.lucene.search; * limitations under the License. */ -import static org.junit.Assert.*; - import java.io.IOException; import org.apache.lucene.index.IndexReader; diff --git a/lucene/src/test/org/apache/lucene/search/TestBoolean2.java b/lucene/src/test/org/apache/lucene/search/TestBoolean2.java index 0cfa103c1a2..f1cb84a51e5 100644 --- a/lucene/src/test/org/apache/lucene/search/TestBoolean2.java +++ b/lucene/src/test/org/apache/lucene/search/TestBoolean2.java @@ -37,8 +37,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** Test BooleanQuery2 against BooleanQuery by overriding the standard query parser. * This also tests the scoring order of BooleanQuery. */ diff --git a/lucene/src/test/org/apache/lucene/search/TestCachingSpanFilter.java b/lucene/src/test/org/apache/lucene/search/TestCachingSpanFilter.java index 68f97c1ce48..ab58370934f 100644 --- a/lucene/src/test/org/apache/lucene/search/TestCachingSpanFilter.java +++ b/lucene/src/test/org/apache/lucene/search/TestCachingSpanFilter.java @@ -23,7 +23,6 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.SerialMergeScheduler; import org.apache.lucene.index.Term; diff --git a/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java b/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java index 3c0fe9393e0..f56e440b0cd 100644 --- a/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java +++ b/lucene/src/test/org/apache/lucene/search/TestCachingWrapperFilter.java @@ -23,7 +23,6 @@ import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.SerialMergeScheduler; import org.apache.lucene.index.SlowMultiReaderWrapper; diff --git a/lucene/src/test/org/apache/lucene/search/TestDocIdSet.java b/lucene/src/test/org/apache/lucene/search/TestDocIdSet.java index e31363dcc93..78f517c67c7 100644 --- a/lucene/src/test/org/apache/lucene/search/TestDocIdSet.java +++ b/lucene/src/test/org/apache/lucene/search/TestDocIdSet.java @@ -25,7 +25,6 @@ import java.util.Iterator; import junit.framework.Assert; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.index.IndexReader; diff --git a/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java b/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java index c93ad38aadc..5b77e632e43 100644 --- a/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java +++ b/lucene/src/test/org/apache/lucene/search/TestFieldCacheRangeFilter.java @@ -29,8 +29,6 @@ import org.apache.lucene.document.Field; import org.apache.lucene.store.Directory; import org.junit.Test; -import static org.junit.Assert.*; - /** * A basic 'positive' Unit test class for the FieldCacheRangeFilter class. * diff --git a/lucene/src/test/org/apache/lucene/search/TestMultiSearcher.java b/lucene/src/test/org/apache/lucene/search/TestMultiSearcher.java index 5b07c5a72f3..91a06896648 100644 --- a/lucene/src/test/org/apache/lucene/search/TestMultiSearcher.java +++ b/lucene/src/test/org/apache/lucene/search/TestMultiSearcher.java @@ -17,7 +17,6 @@ package org.apache.lucene.search; * limitations under the License. */ -import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.document.Document; diff --git a/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java b/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java index 2c99fb27a80..7fc8ea6a799 100644 --- a/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java +++ b/lucene/src/test/org/apache/lucene/search/TestMultiTermConstantScore.java @@ -29,8 +29,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.io.IOException; import java.text.Collator; import java.util.Locale; diff --git a/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java b/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java index 6a38eb86b8e..cc91da3d614 100644 --- a/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java +++ b/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery32.java @@ -36,7 +36,6 @@ import org.apache.lucene.util._TestUtil; import org.junit.Test; import org.junit.AfterClass; import org.junit.BeforeClass; -import static org.junit.Assert.*; public class TestNumericRangeQuery32 extends LuceneTestCase { // distance of entries diff --git a/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java b/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java index cc654f85c7b..e0a566afff9 100644 --- a/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java +++ b/lucene/src/test/org/apache/lucene/search/TestNumericRangeQuery64.java @@ -33,7 +33,6 @@ import org.apache.lucene.util._TestUtil; import org.junit.Test; import org.junit.AfterClass; import org.junit.BeforeClass; -import static org.junit.Assert.*; public class TestNumericRangeQuery64 extends LuceneTestCase { // distance of entries diff --git a/lucene/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java b/lucene/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java index 7cc09d18222..a41e33fbf7f 100644 --- a/lucene/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java +++ b/lucene/src/test/org/apache/lucene/search/TestQueryWrapperFilter.java @@ -18,7 +18,6 @@ package org.apache.lucene.search; */ import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Field.Index; import org.apache.lucene.document.Field.Store; import org.apache.lucene.index.IndexReader; diff --git a/lucene/src/test/org/apache/lucene/search/TestSort.java b/lucene/src/test/org/apache/lucene/search/TestSort.java index 53a5696c8f3..62a164c8e6b 100644 --- a/lucene/src/test/org/apache/lucene/search/TestSort.java +++ b/lucene/src/test/org/apache/lucene/search/TestSort.java @@ -25,7 +25,6 @@ import java.util.BitSet; import java.util.HashMap; import java.util.Iterator; import java.util.Locale; -import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; @@ -37,7 +36,6 @@ import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; -import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.index.Term; import org.apache.lucene.util.BytesRef; diff --git a/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java b/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java index 99ca35fcf80..4c2b05cb8fa 100644 --- a/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java +++ b/lucene/src/test/org/apache/lucene/search/TestSubScorerFreqs.java @@ -31,8 +31,6 @@ import org.junit.Test; import org.junit.AfterClass; import org.junit.BeforeClass; -import static org.junit.Assert.*; - public class TestSubScorerFreqs extends LuceneTestCase { private static Directory dir; diff --git a/lucene/src/test/org/apache/lucene/search/TestTermRangeFilter.java b/lucene/src/test/org/apache/lucene/search/TestTermRangeFilter.java index eb6b0eebd57..1bcd546fd49 100644 --- a/lucene/src/test/org/apache/lucene/search/TestTermRangeFilter.java +++ b/lucene/src/test/org/apache/lucene/search/TestTermRangeFilter.java @@ -29,8 +29,6 @@ import org.apache.lucene.document.Field; import org.apache.lucene.store.Directory; import org.junit.Test; -import static org.junit.Assert.*; - /** * A basic 'positive' Unit test class for the TermRangeFilter class. * diff --git a/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java b/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java index fed64916d21..33fc59d5d7d 100755 --- a/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java +++ b/lucene/src/test/org/apache/lucene/search/function/TestCustomScoreQuery.java @@ -21,9 +21,6 @@ import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.search.*; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.io.IOException; import java.util.HashMap; import java.util.Map; diff --git a/lucene/src/test/org/apache/lucene/search/function/TestDocValues.java b/lucene/src/test/org/apache/lucene/search/function/TestDocValues.java index c9eaf5e0f22..e20626b4dfc 100644 --- a/lucene/src/test/org/apache/lucene/search/function/TestDocValues.java +++ b/lucene/src/test/org/apache/lucene/search/function/TestDocValues.java @@ -19,8 +19,6 @@ package org.apache.lucene.search.function; import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; /** * DocValues TestCase diff --git a/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java b/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java index eb605e24ce4..8ff2af949d9 100755 --- a/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java +++ b/lucene/src/test/org/apache/lucene/search/function/TestFieldScoreQuery.java @@ -26,7 +26,6 @@ import org.apache.lucene.search.QueryUtils; import org.apache.lucene.search.ScoreDoc; import org.apache.lucene.search.TopDocs; import org.junit.Test; -import static org.junit.Assert.*; /** * Test FieldScoreQuery search. diff --git a/lucene/src/test/org/apache/lucene/search/function/TestOrdValues.java b/lucene/src/test/org/apache/lucene/search/function/TestOrdValues.java index a2ac309bb3f..8fb7eda1484 100644 --- a/lucene/src/test/org/apache/lucene/search/function/TestOrdValues.java +++ b/lucene/src/test/org/apache/lucene/search/function/TestOrdValues.java @@ -20,7 +20,6 @@ package org.apache.lucene.search.function; import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.*; -import static org.junit.Assert.*; import org.junit.Test; /** diff --git a/lucene/src/test/org/apache/lucene/search/spans/TestBasics.java b/lucene/src/test/org/apache/lucene/search/spans/TestBasics.java index 74b878de69d..40f792fb26a 100644 --- a/lucene/src/test/org/apache/lucene/search/spans/TestBasics.java +++ b/lucene/src/test/org/apache/lucene/search/spans/TestBasics.java @@ -48,8 +48,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * Tests basic search capabilities. * diff --git a/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java b/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java index 73e4e0a448d..b91f5938d0c 100755 --- a/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java +++ b/lucene/src/test/org/apache/lucene/store/TestBufferedIndexInput.java @@ -32,7 +32,6 @@ import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; -import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.Term; import org.apache.lucene.index.IndexWriterConfig.OpenMode; import org.apache.lucene.search.IndexSearcher; diff --git a/lucene/src/test/org/apache/lucene/store/TestCopyBytes.java b/lucene/src/test/org/apache/lucene/store/TestCopyBytes.java index 4d1654a1a41..89c056007db 100644 --- a/lucene/src/test/org/apache/lucene/store/TestCopyBytes.java +++ b/lucene/src/test/org/apache/lucene/store/TestCopyBytes.java @@ -22,7 +22,6 @@ import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util._TestUtil; import org.junit.Test; -import static org.junit.Assert.*; public class TestCopyBytes extends LuceneTestCase { diff --git a/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java b/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java index e9cf2b6a879..a5ab76eb65c 100644 --- a/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java +++ b/lucene/src/test/org/apache/lucene/store/TestFileSwitchDirectory.java @@ -26,7 +26,6 @@ import org.apache.lucene.index.IndexFileNames; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; -import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.TestIndexWriterReader; import org.apache.lucene.util.LuceneTestCase; diff --git a/lucene/src/test/org/apache/lucene/util/TestCharacterUtils.java b/lucene/src/test/org/apache/lucene/util/TestCharacterUtils.java index 2dbc89604cd..69393bca871 100644 --- a/lucene/src/test/org/apache/lucene/util/TestCharacterUtils.java +++ b/lucene/src/test/org/apache/lucene/util/TestCharacterUtils.java @@ -17,9 +17,6 @@ package org.apache.lucene.util; * limitations under the License. */ -import static org.junit.Assert.*; -import static org.apache.lucene.util.LuceneTestCase.TEST_VERSION_CURRENT; - import java.io.IOException; import java.io.Reader; import java.io.StringReader; diff --git a/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java b/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java index 97bec0d4211..beac79df7c9 100644 --- a/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java +++ b/lucene/src/test/org/apache/lucene/util/TestRecyclingByteBlockAllocator.java @@ -2,11 +2,8 @@ package org.apache.lucene.util; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.locks.ReentrantLock; - import org.junit.Before; import org.junit.Test; diff --git a/lucene/src/test/org/apache/lucene/util/TestSetOnce.java b/lucene/src/test/org/apache/lucene/util/TestSetOnce.java index 3575f2afd97..fad8e19c95e 100644 --- a/lucene/src/test/org/apache/lucene/util/TestSetOnce.java +++ b/lucene/src/test/org/apache/lucene/util/TestSetOnce.java @@ -17,8 +17,6 @@ package org.apache.lucene.util; * limitations under the License. */ -import static org.junit.Assert.*; - import java.util.Random; import org.apache.lucene.util.SetOnce.AlreadySetException; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java index 2c2bcd44b48..a3d82b8505a 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java @@ -17,10 +17,8 @@ package org.apache.lucene.analysis.ar; * limitations under the License. */ -import java.io.File; import java.io.IOException; import java.io.Reader; -import java.util.Hashtable; import java.util.Set; import org.apache.lucene.analysis.Analyzer; @@ -30,7 +28,6 @@ import org.apache.lucene.analysis.miscellaneous.KeywordMarkerFilter; import org.apache.lucene.analysis.standard.StandardTokenizer; import org.apache.lucene.analysis.util.CharArraySet; import org.apache.lucene.analysis.util.StopwordAnalyzerBase; -import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.util.Version; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java index a9bbfa8a780..966baf69c86 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/commongrams/CommonGramsFilter.java @@ -10,7 +10,6 @@ package org.apache.lucene.analysis.commongrams; import java.io.IOException; -import java.util.Arrays; import java.util.Set; import org.apache.lucene.analysis.TokenFilter; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java index c11a96745b8..eececf2e78d 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/PatternParser.java @@ -29,7 +29,6 @@ import org.xml.sax.Attributes; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; -import java.io.StringReader; import java.net.MalformedURLException; import java.util.ArrayList; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java index 85920f1d711..a735fd4d2be 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/core/StopAnalyzer.java @@ -26,10 +26,8 @@ import java.util.List; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.util.CharArraySet; -import org.apache.lucene.analysis.util.ReusableAnalyzerBase; import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.analysis.util.WordlistLoader; -import org.apache.lucene.analysis.util.ReusableAnalyzerBase.TokenStreamComponents; import org.apache.lucene.util.Version; /** Filters {@link LetterTokenizer} with {@link LowerCaseFilter} and {@link StopFilter}. diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java index 7d906f077d8..89e58f4cf87 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java @@ -32,8 +32,6 @@ import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; import java.io.*; -import java.util.Collections; -import java.util.HashSet; import java.util.Set; /** diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java index 836b5cd2cd5..26ef69466f2 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java @@ -32,13 +32,9 @@ import org.apache.lucene.analysis.util.StopwordAnalyzerBase; import org.apache.lucene.analysis.util.WordlistLoader; import org.apache.lucene.util.Version; -import java.io.File; import java.io.IOException; import java.io.Reader; import java.util.Arrays; -import java.util.HashSet; -import java.util.Collections; -import java.util.Map; import java.util.Set; /** diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchStemFilter.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchStemFilter.java index 4110dbe75b0..c7cfd6ba85e 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchStemFilter.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/fr/FrenchStemFilter.java @@ -25,9 +25,6 @@ import org.apache.lucene.analysis.tokenattributes.KeywordAttribute; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import java.io.IOException; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; /** * A {@link TokenFilter} that stems french words. diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java index 1bce986ab7e..f7a295a93ff 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java @@ -38,7 +38,6 @@ import java.io.IOException; import java.io.Reader; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.Set; import java.util.Map; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java index 5996e4f6a91..8116d197179 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java @@ -26,7 +26,6 @@ WARNING: if you change ClassicTokenizerImpl.jflex and need to regenerate */ -import java.io.Reader; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java index 9a814362cf8..bb22ed93930 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/commongrams/CommonGramsFilterTest.java @@ -19,8 +19,6 @@ package org.apache.lucene.analysis.commongrams; import java.io.Reader; import java.io.StringReader; import java.util.Arrays; -import java.util.Set; - import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.TokenFilter; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java index 8500b551dd1..090a3db31e3 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/compound/TestCompoundWordTokenFilter.java @@ -17,7 +17,6 @@ package org.apache.lucene.analysis.compound; * limitations under the License. */ -import java.io.Reader; import java.io.StringReader; import org.xml.sax.InputSource; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java index eb6beb0f506..f9c72663a36 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java @@ -17,11 +17,7 @@ package org.apache.lucene.analysis.cz; * limitations under the License. */ -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; - import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.util.CharArraySet; diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java index 361994c4cdf..9a9ac0e8dda 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/TestLimitTokenCountAnalyzer.java @@ -24,7 +24,6 @@ import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.analysis.standard.StandardAnalyzer; -import org.apache.lucene.util.Version; public class TestLimitTokenCountAnalyzer extends BaseTokenStreamTestCase { diff --git a/modules/analysis/smartcn/src/test/org/apache/lucene/analysis/cn/smart/TestSmartChineseAnalyzer.java b/modules/analysis/smartcn/src/test/org/apache/lucene/analysis/cn/smart/TestSmartChineseAnalyzer.java index 88e03e5473b..01b2d94c894 100644 --- a/modules/analysis/smartcn/src/test/org/apache/lucene/analysis/cn/smart/TestSmartChineseAnalyzer.java +++ b/modules/analysis/smartcn/src/test/org/apache/lucene/analysis/cn/smart/TestSmartChineseAnalyzer.java @@ -17,15 +17,8 @@ package org.apache.lucene.analysis.cn.smart; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.Reader; -import java.io.UnsupportedEncodingException; -import java.util.Date; - import org.apache.lucene.analysis.BaseTokenStreamTestCase; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.util.Version; public class TestSmartChineseAnalyzer extends BaseTokenStreamTestCase { diff --git a/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java b/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java index 80d9d6d3a11..9593355fc0b 100644 --- a/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java +++ b/modules/analysis/stempel/src/java/org/apache/lucene/analysis/pl/PolishAnalyzer.java @@ -18,7 +18,6 @@ package org.apache.lucene.analysis.pl; */ import java.io.IOException; -import java.io.InputStream; import java.io.Reader; import java.util.Set; diff --git a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java index 41bb17ca4d0..5996b60c73f 100644 --- a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java +++ b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/ClusteringComponent.java @@ -24,14 +24,10 @@ import org.apache.solr.common.util.NamedList; import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrResourceLoader; import org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine; -import org.apache.solr.handler.clustering.carrot2.CarrotParams; import org.apache.solr.handler.component.ResponseBuilder; import org.apache.solr.handler.component.SearchComponent; import org.apache.solr.handler.component.ShardRequest; -import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.search.DocListAndSet; -import org.apache.solr.search.SolrIndexSearcher; -import org.apache.solr.util.SolrPluginUtils; import org.apache.solr.util.plugin.SolrCoreAware; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/DocumentClusteringEngine.java b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/DocumentClusteringEngine.java index 2b1ef9b5f0b..44f5de0ffdf 100644 --- a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/DocumentClusteringEngine.java +++ b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/DocumentClusteringEngine.java @@ -18,10 +18,7 @@ package org.apache.solr.handler.clustering; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.params.SolrParams; -import org.apache.solr.core.SolrCore; -import org.apache.solr.search.DocList; import org.apache.solr.search.DocSet; -import org.apache.lucene.search.Query; /** diff --git a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java index 6809566e384..7dda78d25f4 100644 --- a/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java +++ b/solr/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotParams.java @@ -3,7 +3,6 @@ package org.apache.solr.handler.clustering.carrot2; import java.util.Set; import com.google.common.collect.ImmutableSet; -import org.apache.solr.common.params.HighlightParams; /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java index 19d75707254..cb6bb1ff8bd 100644 --- a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java +++ b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/AbstractClusteringTestCase.java @@ -19,8 +19,6 @@ package org.apache.solr.handler.clustering; import org.apache.solr.SolrTestCaseJ4; import org.junit.BeforeClass; -import static org.junit.Assert.*; - /** * diff --git a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/ClusteringComponentTest.java b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/ClusteringComponentTest.java index 9a16daf1495..b7524cde420 100644 --- a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/ClusteringComponentTest.java +++ b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/ClusteringComponentTest.java @@ -29,8 +29,6 @@ import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.request.SolrRequestHandler; import org.junit.Test; -import static org.junit.Assert.*; - /** * * diff --git a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java index 6119dd944d7..5789256a3ee 100644 --- a/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java +++ b/solr/contrib/clustering/src/test/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java @@ -42,8 +42,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.junit.Assert.*; - /** * */ diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/HttpDataSource.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/HttpDataSource.java index d69828683e8..82646534119 100644 --- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/HttpDataSource.java +++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/HttpDataSource.java @@ -16,17 +16,6 @@ */ package org.apache.solr.handler.dataimport; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.net.URL; -import java.net.URLConnection; -import java.util.Properties; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - /** *

* A data source implementation which can be used to read character files using diff --git a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java index f31c6f24513..f2d378c4909 100644 --- a/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java +++ b/solr/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/SolrWriter.java @@ -26,8 +26,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; -import java.text.ParseException; -import java.util.Date; import java.util.Properties; /** diff --git a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java index 3c507267d2f..943f0d849dc 100644 --- a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java +++ b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java @@ -28,7 +28,6 @@ import org.apache.solr.util.plugin.SolrCoreAware; import org.apache.solr.handler.ContentStreamHandlerBase; import org.apache.solr.handler.ContentStreamLoader; import org.apache.tika.config.TikaConfig; -import org.apache.tika.exception.TikaException; import org.apache.tika.mime.MimeTypeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/SolrContentHandler.java b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/SolrContentHandler.java index 703801226d6..80fa6c964c4 100644 --- a/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/SolrContentHandler.java +++ b/solr/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/SolrContentHandler.java @@ -17,7 +17,6 @@ package org.apache.solr.handler.extraction; -import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.DateUtil; diff --git a/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java b/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java index 64f6767fce7..a4658f46a71 100644 --- a/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java +++ b/solr/contrib/extraction/src/test/java/org/apache/solr/handler/ExtractingRequestHandlerTest.java @@ -31,11 +31,8 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.List; import java.util.ArrayList; -import java.util.Locale; import java.io.File; diff --git a/solr/src/common/org/apache/solr/common/util/DateUtil.java b/solr/src/common/org/apache/solr/common/util/DateUtil.java index 414d7b27b02..00d8bbefd8c 100644 --- a/solr/src/common/org/apache/solr/common/util/DateUtil.java +++ b/solr/src/common/org/apache/solr/common/util/DateUtil.java @@ -17,7 +17,6 @@ package org.apache.solr.common.util; */ import java.io.IOException; -import java.io.Writer; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; diff --git a/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java b/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java index 7bf4b3050fb..8acc832d8fc 100644 --- a/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java +++ b/solr/src/java/org/apache/solr/analysis/ClassicTokenizerFactory.java @@ -20,8 +20,6 @@ package org.apache.solr.analysis; import org.apache.lucene.analysis.Tokenizer; import org.apache.lucene.analysis.standard.ClassicTokenizer; import org.apache.lucene.analysis.standard.StandardAnalyzer; -import org.apache.lucene.analysis.standard.StandardTokenizer; - import java.io.Reader; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java b/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java index b53b9f35841..c7763302935 100644 --- a/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java +++ b/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java @@ -31,7 +31,6 @@ import org.apache.commons.codec.language.Soundex; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.phonetic.PhoneticFilter; import org.apache.solr.common.SolrException; -import org.apache.solr.common.util.StrUtils; /** * Create tokens based on phonetic encoders diff --git a/solr/src/java/org/apache/solr/core/Config.java b/solr/src/java/org/apache/solr/core/Config.java index e0ec47de760..78601dd0281 100644 --- a/solr/src/java/org/apache/solr/core/Config.java +++ b/solr/src/java/org/apache/solr/core/Config.java @@ -33,9 +33,6 @@ import java.io.*; import java.util.Arrays; import java.util.List; import java.util.Locale; -import java.util.Map; -import java.util.LinkedHashMap; -import java.util.Collections; import java.util.concurrent.atomic.AtomicBoolean; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java b/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java index 5fbafe24819..e3eaaf3d9e5 100644 --- a/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java +++ b/solr/src/java/org/apache/solr/core/RefCntRamDirectory.java @@ -3,7 +3,6 @@ package org.apache.solr.core; import java.io.IOException; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.lucene.index.IndexFileNameFilter; import org.apache.lucene.store.Directory; import org.apache.lucene.store.RAMDirectory; diff --git a/solr/src/java/org/apache/solr/core/SolrCore.java b/solr/src/java/org/apache/solr/core/SolrCore.java index 4ca31da400e..0381fdafb10 100644 --- a/solr/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/src/java/org/apache/solr/core/SolrCore.java @@ -23,7 +23,6 @@ import org.apache.lucene.index.IndexWriter; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.store.Directory; import org.apache.solr.common.SolrException; -import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.CommonParams.EchoParamStyle; import org.apache.solr.common.params.SolrParams; @@ -31,7 +30,6 @@ import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.handler.admin.ShowFileRequestHandler; import org.apache.solr.handler.component.*; -import org.apache.solr.highlight.DefaultSolrHighlighter; import org.apache.solr.highlight.SolrHighlighter; import org.apache.solr.request.*; import org.apache.solr.response.*; diff --git a/solr/src/java/org/apache/solr/core/SolrEventListener.java b/solr/src/java/org/apache/solr/core/SolrEventListener.java index 1165833de9c..f499e85a2c1 100644 --- a/solr/src/java/org/apache/solr/core/SolrEventListener.java +++ b/solr/src/java/org/apache/solr/core/SolrEventListener.java @@ -17,7 +17,6 @@ package org.apache.solr.core; -import org.apache.solr.common.util.NamedList; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.util.plugin.NamedListInitializedPlugin; diff --git a/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java b/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java index 8d510b43479..4c31d57b1e8 100644 --- a/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java +++ b/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java @@ -20,7 +20,6 @@ import java.io.IOException; import org.apache.lucene.index.IndexReader; import org.apache.lucene.store.Directory; -import org.apache.solr.common.util.NamedList; /** * Default IndexReaderFactory implementation. Returns a standard Lucene diff --git a/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java b/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java index 091011b0a8e..bad251ccb12 100644 --- a/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java +++ b/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java @@ -24,11 +24,9 @@ import java.net.URL; import java.util.ArrayList; import java.util.Comparator; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.regex.Pattern; import org.apache.lucene.document.Document; diff --git a/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java b/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java index c0e312a2c61..30821a8b51f 100644 --- a/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java +++ b/solr/src/java/org/apache/solr/handler/RequestHandlerBase.java @@ -18,7 +18,6 @@ package org.apache.solr.handler; import org.apache.solr.common.SolrException; -import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; @@ -27,7 +26,6 @@ import org.apache.solr.core.SolrInfoMBean; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.response.SolrQueryResponse; -import org.apache.solr.search.DocSet; import org.apache.solr.util.SolrPluginUtils; import org.apache.lucene.queryParser.ParseException; diff --git a/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java b/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java index 70f9f6376e5..09dcf64e461 100644 --- a/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java +++ b/solr/src/java/org/apache/solr/handler/StandardRequestHandler.java @@ -17,7 +17,6 @@ package org.apache.solr.handler; -import org.apache.solr.common.util.NamedList; import org.apache.solr.handler.component.*; import java.net.MalformedURLException; diff --git a/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java b/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java index b44d594b3a1..39c3c5b1331 100644 --- a/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java +++ b/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java @@ -18,14 +18,11 @@ package org.apache.solr.handler; import org.apache.solr.common.SolrException; -import org.apache.solr.common.params.MapSolrParams; -import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.XML; import org.apache.solr.core.SolrCore; import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.request.SolrQueryRequestBase; import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.update.processor.UpdateRequestProcessor; import org.apache.solr.update.processor.UpdateRequestProcessorChain; diff --git a/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java b/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java index 2bd2e994518..c17a1f0a450 100644 --- a/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java +++ b/solr/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java @@ -42,9 +42,7 @@ import org.apache.lucene.store.Directory; import java.io.File; import java.io.IOException; -import java.util.ArrayList; import java.util.Date; -import java.util.Set; /** * @version $Id$ diff --git a/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java b/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java index 6921d7519ed..86f98c67c31 100644 --- a/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java +++ b/solr/src/java/org/apache/solr/handler/admin/PluginInfoHandler.java @@ -26,7 +26,6 @@ import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrInfoMBean; import org.apache.solr.handler.RequestHandlerBase; -import org.apache.solr.handler.RequestHandlerUtils; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; diff --git a/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java b/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java index 4ae2f2a57e0..0fb25904f47 100644 --- a/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java +++ b/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java @@ -36,7 +36,6 @@ import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.core.SolrCore; import org.apache.solr.core.SolrResourceLoader; import org.apache.solr.handler.RequestHandlerBase; -import org.apache.solr.handler.RequestHandlerUtils; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.RawResponseWriter; import org.apache.solr.response.SolrQueryResponse; diff --git a/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java b/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java index ae9be7ca980..d927920f6c0 100644 --- a/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java +++ b/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java @@ -8,11 +8,9 @@ import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.response.SolrQueryResponse; -import java.util.Date; import java.util.Set; import java.util.Map; import java.util.HashSet; -import java.util.HashMap; /** * A request handler that provides info about all diff --git a/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java b/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java index e6c18e450b5..dfdd41c81aa 100644 --- a/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java +++ b/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java @@ -20,7 +20,6 @@ package org.apache.solr.handler.admin; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.File; -import java.io.StringWriter; import java.lang.management.ManagementFactory; import java.lang.management.OperatingSystemMXBean; import java.lang.management.RuntimeMXBean; @@ -35,7 +34,6 @@ import org.apache.commons.io.IOUtils; import org.apache.lucene.LucenePackage; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; -import org.apache.solr.common.util.XML; import org.apache.solr.core.SolrCore; import org.apache.solr.handler.RequestHandlerBase; import org.apache.solr.request.SolrQueryRequest; diff --git a/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java b/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java index 280b123a51d..f8850160696 100644 --- a/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java +++ b/solr/src/java/org/apache/solr/handler/admin/ThreadDumpHandler.java @@ -25,7 +25,6 @@ import java.lang.management.ThreadMXBean; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.handler.RequestHandlerBase; -import org.apache.solr.handler.RequestHandlerUtils; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; diff --git a/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java b/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java index aa368778847..b47be4fe6a4 100644 --- a/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java +++ b/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java @@ -32,9 +32,6 @@ import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.FieldType; import org.apache.lucene.search.Query; import org.apache.lucene.search.TermQuery; -import org.apache.lucene.document.Field; -import org.apache.lucene.document.Field.Index; -import org.apache.lucene.document.Field.Store; import org.apache.lucene.index.Term; import java.io.IOException; diff --git a/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java b/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java index d813f97f196..00eeb73c7a0 100644 --- a/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java @@ -30,7 +30,6 @@ import java.util.List; import java.util.Map; import java.util.WeakHashMap; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.QueryElevationParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/src/java/org/apache/solr/handler/component/SearchComponent.java b/solr/src/java/org/apache/solr/handler/component/SearchComponent.java index db4036abf4b..2908fbc033d 100644 --- a/solr/src/java/org/apache/solr/handler/component/SearchComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/SearchComponent.java @@ -20,12 +20,9 @@ package org.apache.solr.handler.component; import java.io.IOException; import java.net.URL; -import org.apache.lucene.queryParser.ParseException; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.core.SolrInfoMBean; -import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.util.plugin.NamedListInitializedPlugin; /** diff --git a/solr/src/java/org/apache/solr/handler/component/SearchHandler.java b/solr/src/java/org/apache/solr/handler/component/SearchHandler.java index c655e38c2a3..eaaa4b7736d 100644 --- a/solr/src/java/org/apache/solr/handler/component/SearchHandler.java +++ b/solr/src/java/org/apache/solr/handler/component/SearchHandler.java @@ -54,7 +54,6 @@ import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.ShardParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.RTimer; -import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.common.util.StrUtils; import org.apache.solr.core.SolrCore; import org.apache.solr.handler.RequestHandlerBase; diff --git a/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java b/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java index 669cd932ddb..efd685dba04 100644 --- a/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/SpellCheckComponent.java @@ -23,11 +23,9 @@ import java.util.*; import java.util.concurrent.ConcurrentHashMap; import org.apache.lucene.search.spell.LevensteinDistance; -import org.apache.lucene.search.spell.SpellChecker; import org.apache.lucene.search.spell.StringDistance; import org.apache.lucene.search.spell.SuggestWord; import org.apache.lucene.search.spell.SuggestWordQueue; -import org.apache.lucene.util.PriorityQueue; import org.apache.solr.client.solrj.response.SpellCheckResponse; import org.apache.solr.common.params.ModifiableSolrParams; import org.slf4j.Logger; diff --git a/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java b/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java index 5c5cf09981c..f190ab4ba1f 100644 --- a/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java @@ -1,7 +1,6 @@ package org.apache.solr.handler.component; import org.apache.lucene.document.Document; -import org.apache.lucene.document.Field; import org.apache.lucene.document.Fieldable; import org.apache.lucene.document.SetBasedFieldSelector; import org.apache.lucene.index.IndexReader; @@ -30,15 +29,12 @@ import org.apache.solr.util.plugin.SolrCoreAware; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; /** * Licensed to the Apache Software Foundation (ASF) under one or more diff --git a/solr/src/java/org/apache/solr/handler/component/TermsComponent.java b/solr/src/java/org/apache/solr/handler/component/TermsComponent.java index 091917292b0..17aba9096f2 100644 --- a/solr/src/java/org/apache/solr/handler/component/TermsComponent.java +++ b/solr/src/java/org/apache/solr/handler/component/TermsComponent.java @@ -18,7 +18,6 @@ package org.apache.solr.handler.component; import org.apache.lucene.index.*; import org.apache.lucene.util.BytesRef; -import org.apache.lucene.util.StringHelper; import org.apache.noggit.CharArr; import org.apache.solr.common.SolrException; import org.apache.solr.common.params.*; diff --git a/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java b/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java index e65c311201f..a032da6f55a 100644 --- a/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java +++ b/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java @@ -29,7 +29,6 @@ import java.util.Set; import org.apache.lucene.analysis.CachingTokenFilter; -import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; @@ -50,7 +49,6 @@ import org.apache.solr.core.SolrConfig; import org.apache.solr.core.PluginInfo; import org.apache.solr.core.SolrCore; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.schema.FieldType; import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.DocIterator; diff --git a/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java b/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java index aba6280865a..05be4e69868 100644 --- a/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java +++ b/solr/src/java/org/apache/solr/highlight/SolrHighlighter.java @@ -19,7 +19,6 @@ package org.apache.solr.highlight; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/request/SimpleFacets.java b/solr/src/java/org/apache/solr/request/SimpleFacets.java index 233ac43828c..3d06d57793a 100644 --- a/solr/src/java/org/apache/solr/request/SimpleFacets.java +++ b/solr/src/java/org/apache/solr/request/SimpleFacets.java @@ -38,7 +38,6 @@ import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.common.util.StrUtils; import org.apache.solr.core.SolrCore; import org.apache.solr.schema.*; -import org.apache.solr.schema.TrieField.TrieTypes; import org.apache.solr.search.*; import org.apache.solr.util.BoundedTreeSet; import org.apache.solr.util.ByteUtils; diff --git a/solr/src/java/org/apache/solr/request/SolrQueryRequest.java b/solr/src/java/org/apache/solr/request/SolrQueryRequest.java index 25c2a5a9aa2..eeb3c60408f 100644 --- a/solr/src/java/org/apache/solr/request/SolrQueryRequest.java +++ b/solr/src/java/org/apache/solr/request/SolrQueryRequest.java @@ -19,7 +19,6 @@ package org.apache.solr.request; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.schema.IndexSchema; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.ContentStream; import org.apache.solr.core.SolrCore; diff --git a/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java b/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java index 6177a292412..d598966aeea 100644 --- a/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java +++ b/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java @@ -20,8 +20,6 @@ package org.apache.solr.request; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.util.RefCounted; import org.apache.solr.schema.IndexSchema; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.ContentStream; import org.apache.solr.core.SolrCore; diff --git a/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java b/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java index 1468c7fae8d..f6106cfbcb3 100755 --- a/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java +++ b/solr/src/java/org/apache/solr/response/BinaryQueryResponseWriter.java @@ -17,7 +17,6 @@ package org.apache.solr.response; */ -import java.io.Writer; import java.io.OutputStream; import java.io.IOException; diff --git a/solr/src/java/org/apache/solr/response/TextResponseWriter.java b/solr/src/java/org/apache/solr/response/TextResponseWriter.java index 50cb27ae9d5..4c232d1772e 100644 --- a/solr/src/java/org/apache/solr/response/TextResponseWriter.java +++ b/solr/src/java/org/apache/solr/response/TextResponseWriter.java @@ -18,7 +18,6 @@ package org.apache.solr.response; import org.apache.lucene.document.Document; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.FastWriter; import org.apache.solr.common.SolrDocument; diff --git a/solr/src/java/org/apache/solr/response/XMLWriter.java b/solr/src/java/org/apache/solr/response/XMLWriter.java index 2098142052c..7f6465fb49d 100644 --- a/solr/src/java/org/apache/solr/response/XMLWriter.java +++ b/solr/src/java/org/apache/solr/response/XMLWriter.java @@ -27,7 +27,6 @@ import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.search.DocList; import org.apache.solr.search.DocIterator; import org.apache.solr.search.DocSet; -import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; import org.apache.solr.schema.TextField; diff --git a/solr/src/java/org/apache/solr/schema/BCDLongField.java b/solr/src/java/org/apache/solr/schema/BCDLongField.java index f543ee05d1b..5a4c4f01264 100644 --- a/solr/src/java/org/apache/solr/schema/BCDLongField.java +++ b/solr/src/java/org/apache/solr/schema/BCDLongField.java @@ -18,8 +18,6 @@ package org.apache.solr.schema; import org.apache.lucene.document.Fieldable; - -import java.io.IOException; /** * @version $Id$ */ diff --git a/solr/src/java/org/apache/solr/schema/BCDStrField.java b/solr/src/java/org/apache/solr/schema/BCDStrField.java index c83d3cf69da..ab27f81d7c1 100644 --- a/solr/src/java/org/apache/solr/schema/BCDStrField.java +++ b/solr/src/java/org/apache/solr/schema/BCDStrField.java @@ -18,8 +18,6 @@ package org.apache.solr.schema; import org.apache.lucene.document.Fieldable; - -import java.io.IOException; /** * @version $Id$ */ diff --git a/solr/src/java/org/apache/solr/schema/CoordinateFieldType.java b/solr/src/java/org/apache/solr/schema/CoordinateFieldType.java index 7ad86ce5abe..d986ddd1487 100644 --- a/solr/src/java/org/apache/solr/schema/CoordinateFieldType.java +++ b/solr/src/java/org/apache/solr/schema/CoordinateFieldType.java @@ -17,21 +17,6 @@ package org.apache.solr.schema; -import org.apache.lucene.search.Query; -import org.apache.lucene.search.TermQuery; -import org.apache.lucene.index.Term; -import org.apache.solr.search.QParser; -import org.apache.solr.search.function.ValueSource; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.params.SolrParams; -import org.apache.solr.common.params.MapSolrParams; - -import java.util.Map; -import java.util.List; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; - /** * A CoordinateFieldType is the base class for {@link org.apache.solr.schema.FieldType}s that have semantics * related to items in a coordinate system. diff --git a/solr/src/java/org/apache/solr/schema/SpatialQueryable.java b/solr/src/java/org/apache/solr/schema/SpatialQueryable.java index d17c5fb4673..e60c1114b2b 100644 --- a/solr/src/java/org/apache/solr/schema/SpatialQueryable.java +++ b/solr/src/java/org/apache/solr/schema/SpatialQueryable.java @@ -17,7 +17,6 @@ package org.apache.solr.schema; */ -import org.apache.lucene.search.Filter; import org.apache.lucene.search.Query; import org.apache.solr.search.QParser; import org.apache.solr.search.SpatialOptions; diff --git a/solr/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java b/solr/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java index 00cc64c0a2e..3e418520c42 100755 --- a/solr/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java +++ b/solr/src/java/org/apache/solr/search/ExtendedDismaxQParserPlugin.java @@ -27,7 +27,6 @@ import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.*; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; -import org.apache.solr.common.SolrException; import org.apache.solr.common.params.DefaultSolrParams; import org.apache.solr.common.params.DisMaxParams; import org.apache.solr.common.params.SolrParams; diff --git a/solr/src/java/org/apache/solr/search/FieldQParserPlugin.java b/solr/src/java/org/apache/solr/search/FieldQParserPlugin.java index d1d9a31abce..f9dded8d97b 100644 --- a/solr/src/java/org/apache/solr/search/FieldQParserPlugin.java +++ b/solr/src/java/org/apache/solr/search/FieldQParserPlugin.java @@ -16,24 +16,14 @@ */ package org.apache.solr.search; -import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.Token; -import org.apache.lucene.analysis.TokenStream; -import org.apache.lucene.index.Term; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.search.*; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; -import org.apache.solr.common.SolrException; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.FieldType; -import org.apache.solr.schema.TextField; import org.apache.solr.schema.SchemaField; -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; - /** * Create a field query from the input value, applying text analysis and constructing a phrase query if appropriate. diff --git a/solr/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java b/solr/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java index 5af50d1c8b6..1a71af49610 100755 --- a/solr/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java +++ b/solr/src/java/org/apache/solr/search/FunctionRangeQParserPlugin.java @@ -18,8 +18,6 @@ package org.apache.solr.search; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.search.Query; -import org.apache.lucene.search.ConstantScoreQuery; -import org.apache.lucene.search.Filter; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.request.SolrQueryRequest; diff --git a/solr/src/java/org/apache/solr/search/LuceneQParserPlugin.java b/solr/src/java/org/apache/solr/search/LuceneQParserPlugin.java index 0c8d1a16e4a..7f8d40a5bb9 100755 --- a/solr/src/java/org/apache/solr/search/LuceneQParserPlugin.java +++ b/solr/src/java/org/apache/solr/search/LuceneQParserPlugin.java @@ -17,7 +17,6 @@ package org.apache.solr.search; import org.apache.lucene.queryParser.ParseException; -import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Query; import org.apache.lucene.search.Sort; import org.apache.solr.common.SolrException; diff --git a/solr/src/java/org/apache/solr/search/LuceneQueryOptimizer.java b/solr/src/java/org/apache/solr/search/LuceneQueryOptimizer.java index 56596c7f0a4..d003f40c5ce 100644 --- a/solr/src/java/org/apache/solr/search/LuceneQueryOptimizer.java +++ b/solr/src/java/org/apache/solr/search/LuceneQueryOptimizer.java @@ -24,7 +24,6 @@ package org.apache.solr.search; import org.apache.lucene.search.*; import java.util.LinkedHashMap; -import java.util.List; import java.util.Map; import java.io.IOException; diff --git a/solr/src/java/org/apache/solr/search/NestedQParserPlugin.java b/solr/src/java/org/apache/solr/search/NestedQParserPlugin.java index e74b7041b3a..ee51c2e172e 100755 --- a/solr/src/java/org/apache/solr/search/NestedQParserPlugin.java +++ b/solr/src/java/org/apache/solr/search/NestedQParserPlugin.java @@ -21,9 +21,6 @@ import org.apache.lucene.search.Query; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.search.function.BoostedQuery; -import org.apache.solr.search.function.FunctionQuery; -import org.apache.solr.search.function.QueryValueSource; import org.apache.solr.search.function.ValueSource; /** diff --git a/solr/src/java/org/apache/solr/search/QueryParsing.java b/solr/src/java/org/apache/solr/search/QueryParsing.java index 128fc796af5..bfc9b1ac6e8 100644 --- a/solr/src/java/org/apache/solr/search/QueryParsing.java +++ b/solr/src/java/org/apache/solr/search/QueryParsing.java @@ -19,7 +19,6 @@ package org.apache.solr.search; import org.apache.lucene.index.Term; import org.apache.lucene.queryParser.ParseException; -import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.queryParser.QueryParser.Operator; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; @@ -44,14 +43,11 @@ import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.function.FunctionQuery; import org.apache.solr.search.function.QueryValueSource; -import org.apache.solr.search.function.ValueSource; - import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; /** * Collection of static utilities useful for query parsing. diff --git a/solr/src/java/org/apache/solr/search/QueryResultKey.java b/solr/src/java/org/apache/solr/search/QueryResultKey.java index 9df3f6f2071..2f191432f41 100644 --- a/solr/src/java/org/apache/solr/search/QueryResultKey.java +++ b/solr/src/java/org/apache/solr/search/QueryResultKey.java @@ -17,13 +17,9 @@ package org.apache.solr.search; -import org.apache.lucene.search.FieldComparator; import org.apache.lucene.search.Query; import org.apache.lucene.search.Sort; import org.apache.lucene.search.SortField; -import org.apache.solr.common.SolrException.ErrorCode; -import org.apache.solr.common.SolrException; - import java.io.IOException; import java.util.List; diff --git a/solr/src/java/org/apache/solr/search/SolrCacheBase.java b/solr/src/java/org/apache/solr/search/SolrCacheBase.java index 742b7795b58..23a7267df4b 100644 --- a/solr/src/java/org/apache/solr/search/SolrCacheBase.java +++ b/solr/src/java/org/apache/solr/search/SolrCacheBase.java @@ -17,16 +17,6 @@ package org.apache.solr.search; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.common.util.SimpleOrderedMap; -import org.apache.solr.core.SolrCore; - -import java.util.*; -import java.util.concurrent.atomic.AtomicLong; -import java.io.IOException; -import java.net.URL; - /** * Common base class of reusable functionality for SolrCaches */ diff --git a/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java index 0b2c79e71a7..31b1e68f641 100644 --- a/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java +++ b/solr/src/java/org/apache/solr/search/SolrIndexSearcher.java @@ -35,7 +35,6 @@ import org.apache.solr.core.SolrInfoMBean; import org.apache.solr.request.UnInvertedField; import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; -import org.apache.solr.search.function.ValueSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/solr/src/java/org/apache/solr/search/SpatialFilterQParser.java b/solr/src/java/org/apache/solr/search/SpatialFilterQParser.java index 0b42a4d3e22..c97a4dc3d5c 100644 --- a/solr/src/java/org/apache/solr/search/SpatialFilterQParser.java +++ b/solr/src/java/org/apache/solr/search/SpatialFilterQParser.java @@ -22,7 +22,6 @@ import org.apache.lucene.search.Query; import org.apache.lucene.spatial.geometry.DistanceUnits; import org.apache.lucene.spatial.DistanceUtils; import org.apache.solr.common.SolrException; -import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.SpatialParams; import org.apache.solr.request.SolrQueryRequest; diff --git a/solr/src/java/org/apache/solr/search/function/ByteFieldSource.java b/solr/src/java/org/apache/solr/search/function/ByteFieldSource.java index dfb3e8f7c1c..0cba6fd4c20 100644 --- a/solr/src/java/org/apache/solr/search/function/ByteFieldSource.java +++ b/solr/src/java/org/apache/solr/search/function/ByteFieldSource.java @@ -17,12 +17,8 @@ package org.apache.solr.search.function; */ import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.cache.ByteValuesCreator; -import org.apache.lucene.search.cache.LongValuesCreator; import org.apache.lucene.search.cache.CachedArray.ByteValues; -import org.apache.lucene.search.cache.CachedArray.DoubleValues; -import org.apache.lucene.search.cache.CachedArray.LongValues; import java.io.IOException; import java.util.Map; @@ -86,4 +82,4 @@ public class ByteFieldSource extends NumericFieldCacheSource { }; } -} \ No newline at end of file +} diff --git a/solr/src/java/org/apache/solr/search/function/ConstNumberSource.java b/solr/src/java/org/apache/solr/search/function/ConstNumberSource.java index 08e1c5998bd..da9ef1f051a 100755 --- a/solr/src/java/org/apache/solr/search/function/ConstNumberSource.java +++ b/solr/src/java/org/apache/solr/search/function/ConstNumberSource.java @@ -17,11 +17,6 @@ package org.apache.solr.search.function; -import org.apache.lucene.index.IndexReader; - -import java.io.IOException; -import java.util.Map; - /** * ConstNumberSource is the base class for all constant numbers */ diff --git a/solr/src/java/org/apache/solr/search/function/DoubleFieldSource.java b/solr/src/java/org/apache/solr/search/function/DoubleFieldSource.java index 863259606ca..de670596d84 100644 --- a/solr/src/java/org/apache/solr/search/function/DoubleFieldSource.java +++ b/solr/src/java/org/apache/solr/search/function/DoubleFieldSource.java @@ -19,11 +19,8 @@ package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; import org.apache.lucene.util.Bits; -import org.apache.lucene.search.FieldCache; import org.apache.lucene.search.cache.DoubleValuesCreator; -import org.apache.lucene.search.cache.FloatValuesCreator; import org.apache.lucene.search.cache.CachedArray.DoubleValues; -import org.apache.lucene.search.cache.CachedArray.FloatValues; import org.apache.solr.search.MutableValue; import org.apache.solr.search.MutableValueDouble; diff --git a/solr/src/java/org/apache/solr/search/function/FileFloatSource.java b/solr/src/java/org/apache/solr/search/function/FileFloatSource.java index ac64ee23b82..c682ea8a2e0 100755 --- a/solr/src/java/org/apache/solr/search/function/FileFloatSource.java +++ b/solr/src/java/org/apache/solr/search/function/FileFloatSource.java @@ -21,7 +21,6 @@ import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.TermsEnum; import org.apache.lucene.index.MultiFields; import org.apache.lucene.util.StringHelper; -import org.apache.lucene.util.Bits; import org.apache.lucene.util.BytesRef; import org.apache.solr.core.SolrCore; import org.apache.solr.schema.SchemaField; diff --git a/solr/src/java/org/apache/solr/search/function/IDFValueSource.java b/solr/src/java/org/apache/solr/search/function/IDFValueSource.java index 863ff86df72..0eba06bfc91 100755 --- a/solr/src/java/org/apache/solr/search/function/IDFValueSource.java +++ b/solr/src/java/org/apache/solr/search/function/IDFValueSource.java @@ -18,12 +18,9 @@ package org.apache.solr.search.function; import org.apache.lucene.index.*; -import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.Searcher; import org.apache.lucene.search.Similarity; import org.apache.lucene.util.BytesRef; -import org.apache.solr.common.SolrException; -import org.apache.solr.search.SolrIndexReader; import org.apache.solr.util.ByteUtils; import java.io.IOException; diff --git a/solr/src/java/org/apache/solr/search/function/IntFieldSource.java b/solr/src/java/org/apache/solr/search/function/IntFieldSource.java index 3740d2c6424..5b01abb34bf 100644 --- a/solr/src/java/org/apache/solr/search/function/IntFieldSource.java +++ b/solr/src/java/org/apache/solr/search/function/IntFieldSource.java @@ -21,11 +21,7 @@ import org.apache.lucene.index.IndexReader; import org.apache.lucene.util.Bits; import org.apache.solr.search.MutableValueInt; import org.apache.solr.search.MutableValue; -import org.apache.lucene.search.FieldCache; -import org.apache.lucene.search.cache.FloatValuesCreator; import org.apache.lucene.search.cache.IntValuesCreator; -import org.apache.lucene.search.cache.CachedArray.DoubleValues; -import org.apache.lucene.search.cache.CachedArray.FloatValues; import org.apache.lucene.search.cache.CachedArray.IntValues; import java.io.IOException; diff --git a/solr/src/java/org/apache/solr/search/function/NormValueSource.java b/solr/src/java/org/apache/solr/search/function/NormValueSource.java index fbc252ff27e..7876a742e01 100755 --- a/solr/src/java/org/apache/solr/search/function/NormValueSource.java +++ b/solr/src/java/org/apache/solr/search/function/NormValueSource.java @@ -20,8 +20,6 @@ package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.Searcher; import org.apache.lucene.search.Similarity; -import org.apache.solr.search.SolrIndexReader; - import java.io.IOException; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/search/function/OrdFieldSource.java b/solr/src/java/org/apache/solr/search/function/OrdFieldSource.java index 87a80426b8e..93da97395d1 100644 --- a/solr/src/java/org/apache/solr/search/function/OrdFieldSource.java +++ b/solr/src/java/org/apache/solr/search/function/OrdFieldSource.java @@ -20,7 +20,6 @@ package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; import org.apache.solr.search.MutableValue; import org.apache.solr.search.MutableValueInt; -import org.apache.solr.util.NumberUtils; import java.io.IOException; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/search/function/PowFloatFunction.java b/solr/src/java/org/apache/solr/search/function/PowFloatFunction.java index 55a0bb72f09..c085e11b641 100755 --- a/solr/src/java/org/apache/solr/search/function/PowFloatFunction.java +++ b/solr/src/java/org/apache/solr/search/function/PowFloatFunction.java @@ -17,10 +17,6 @@ package org.apache.solr.search.function; -import org.apache.lucene.index.IndexReader; - -import java.io.IOException; - /** Function to raise the base "a" to the power "b" */ public class PowFloatFunction extends DualFloatFunction { diff --git a/solr/src/java/org/apache/solr/search/function/ShortFieldSource.java b/solr/src/java/org/apache/solr/search/function/ShortFieldSource.java index 2701705be4f..cb146d84dcb 100644 --- a/solr/src/java/org/apache/solr/search/function/ShortFieldSource.java +++ b/solr/src/java/org/apache/solr/search/function/ShortFieldSource.java @@ -16,11 +16,7 @@ package org.apache.solr.search.function; * limitations under the License. */ -import org.apache.lucene.search.FieldCache; -import org.apache.lucene.search.cache.FloatValuesCreator; import org.apache.lucene.search.cache.ShortValuesCreator; -import org.apache.lucene.search.cache.CachedArray.FloatValues; -import org.apache.lucene.search.cache.CachedArray.LongValues; import org.apache.lucene.search.cache.CachedArray.ShortValues; import org.apache.lucene.index.IndexReader; diff --git a/solr/src/java/org/apache/solr/search/function/SumFloatFunction.java b/solr/src/java/org/apache/solr/search/function/SumFloatFunction.java index 08b8ae81de5..a0a6c17a68a 100755 --- a/solr/src/java/org/apache/solr/search/function/SumFloatFunction.java +++ b/solr/src/java/org/apache/solr/search/function/SumFloatFunction.java @@ -17,13 +17,6 @@ package org.apache.solr.search.function; -import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.Searcher; - -import java.io.IOException; -import java.util.Arrays; -import java.util.Map; - /** * SumFloatFunction returns the sum of it's components. */ diff --git a/solr/src/java/org/apache/solr/search/function/TermFreqValueSource.java b/solr/src/java/org/apache/solr/search/function/TermFreqValueSource.java index a034cfed241..a5603fd451b 100755 --- a/solr/src/java/org/apache/solr/search/function/TermFreqValueSource.java +++ b/solr/src/java/org/apache/solr/search/function/TermFreqValueSource.java @@ -19,8 +19,6 @@ package org.apache.solr.search.function; import org.apache.lucene.index.*; import org.apache.lucene.search.DocIdSetIterator; -import org.apache.lucene.search.Searcher; -import org.apache.lucene.search.Similarity; import org.apache.lucene.util.BytesRef; import org.apache.solr.common.SolrException; diff --git a/solr/src/java/org/apache/solr/search/function/ValueSource.java b/solr/src/java/org/apache/solr/search/function/ValueSource.java index 4c7b0bf3d90..60a6d1d6d30 100644 --- a/solr/src/java/org/apache/solr/search/function/ValueSource.java +++ b/solr/src/java/org/apache/solr/search/function/ValueSource.java @@ -18,7 +18,6 @@ package org.apache.solr.search.function; import org.apache.lucene.index.IndexReader; -import org.apache.lucene.search.Explanation; import org.apache.lucene.search.FieldComparator; import org.apache.lucene.search.FieldComparatorSource; import org.apache.lucene.search.Scorer; diff --git a/solr/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java b/solr/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java index 5af597629c5..340498121bb 100755 --- a/solr/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java +++ b/solr/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java @@ -17,7 +17,6 @@ package org.apache.solr.search.function; -import org.apache.lucene.search.Filter; import org.apache.lucene.search.DocIdSet; import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.search.Searcher; diff --git a/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java b/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java index 1dcfcb2f66e..5400046f161 100644 --- a/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java +++ b/solr/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java @@ -21,7 +21,6 @@ import org.apache.lucene.search.spell.StringDistance; import java.io.File; import java.io.IOException; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; diff --git a/solr/src/java/org/apache/solr/spelling/SolrSpellChecker.java b/solr/src/java/org/apache/solr/spelling/SolrSpellChecker.java index 9d132c50116..7df42b294dc 100644 --- a/solr/src/java/org/apache/solr/spelling/SolrSpellChecker.java +++ b/solr/src/java/org/apache/solr/spelling/SolrSpellChecker.java @@ -17,14 +17,11 @@ package org.apache.solr.spelling; */ import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.Token; -import org.apache.lucene.index.IndexReader; import org.apache.solr.common.util.NamedList; import org.apache.solr.core.SolrCore; import org.apache.solr.search.SolrIndexSearcher; import java.io.IOException; -import java.util.Collection; /** diff --git a/solr/src/java/org/apache/solr/spelling/SpellCheckCollator.java b/solr/src/java/org/apache/solr/spelling/SpellCheckCollator.java index 6ee4c3f1ef4..aa1c377524f 100644 --- a/solr/src/java/org/apache/solr/spelling/SpellCheckCollator.java +++ b/solr/src/java/org/apache/solr/spelling/SpellCheckCollator.java @@ -21,16 +21,13 @@ import java.util.Arrays; import java.util.List; import org.apache.lucene.analysis.Token; -import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.handler.component.QueryComponent; import org.apache.solr.handler.component.ResponseBuilder; import org.apache.solr.handler.component.SearchComponent; -import org.apache.solr.handler.component.SearchHandler; import org.apache.solr.request.LocalSolrQueryRequest; -import org.apache.solr.request.SolrQueryRequestBase; import org.apache.solr.response.SolrQueryResponse; import org.mortbay.log.Log; import org.slf4j.Logger; diff --git a/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java b/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java index e3ce6b1ac02..33252185eef 100644 --- a/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java +++ b/solr/src/java/org/apache/solr/update/DirectUpdateHandler2.java @@ -20,7 +20,6 @@ package org.apache.solr.update; -import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; diff --git a/solr/src/java/org/apache/solr/update/processor/Lookup3Signature.java b/solr/src/java/org/apache/solr/update/processor/Lookup3Signature.java index 3fd9fba2251..1960ffac2b2 100755 --- a/solr/src/java/org/apache/solr/update/processor/Lookup3Signature.java +++ b/solr/src/java/org/apache/solr/update/processor/Lookup3Signature.java @@ -16,12 +16,6 @@ package org.apache.solr.update.processor; * limitations under the License. */ -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.apache.solr.common.util.Hash; public class Lookup3Signature extends Signature { diff --git a/solr/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java b/solr/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java index 486a0bd1b44..71f68f55fe8 100755 --- a/solr/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java +++ b/solr/src/java/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.java @@ -33,11 +33,7 @@ import org.apache.solr.common.util.StrUtils; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.update.AddUpdateCommand; -import org.apache.solr.update.CommitUpdateCommand; -import org.apache.solr.update.DeleteUpdateCommand; -import org.apache.solr.core.SolrResourceLoader; import org.apache.solr.core.SolrCore; -import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; import org.apache.solr.util.plugin.SolrCoreAware; diff --git a/solr/src/java/org/apache/solr/util/DateMathParser.java b/solr/src/java/org/apache/solr/util/DateMathParser.java index 5b9d9381820..bb62e589115 100644 --- a/solr/src/java/org/apache/solr/util/DateMathParser.java +++ b/solr/src/java/org/apache/solr/util/DateMathParser.java @@ -17,7 +17,6 @@ package org.apache.solr.util; -import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestInfo; import java.util.Date; diff --git a/solr/src/java/org/apache/solr/util/SolrPluginUtils.java b/solr/src/java/org/apache/solr/util/SolrPluginUtils.java index bef1eb6b6f7..950d940808e 100644 --- a/solr/src/java/org/apache/solr/util/SolrPluginUtils.java +++ b/solr/src/java/org/apache/solr/util/SolrPluginUtils.java @@ -41,9 +41,6 @@ import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.*; import org.apache.solr.update.DocumentBuilder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import java.io.IOException; import java.util.*; import java.util.regex.Pattern; diff --git a/solr/src/java/org/apache/solr/util/TestHarness.java b/solr/src/java/org/apache/solr/util/TestHarness.java index 6b67b44905d..d6c1a633ba9 100644 --- a/solr/src/java/org/apache/solr/util/TestHarness.java +++ b/solr/src/java/org/apache/solr/util/TestHarness.java @@ -38,7 +38,6 @@ import org.apache.solr.common.util.NamedList.NamedListEntry; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; @@ -49,10 +48,7 @@ import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; diff --git a/solr/src/java/org/apache/solr/util/plugin/AbstractPluginLoader.java b/solr/src/java/org/apache/solr/util/plugin/AbstractPluginLoader.java index 7860220d719..f3488b448d9 100644 --- a/solr/src/java/org/apache/solr/util/plugin/AbstractPluginLoader.java +++ b/solr/src/java/org/apache/solr/util/plugin/AbstractPluginLoader.java @@ -27,7 +27,6 @@ import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.util.DOMUtil; import org.apache.solr.core.SolrConfig; -import org.apache.solr.core.SolrResourceLoader; import org.w3c.dom.Node; import org.w3c.dom.NodeList; diff --git a/solr/src/solrj/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java b/solr/src/solrj/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java index cf55dd3b256..b13b708e0bf 100644 --- a/solr/src/solrj/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java +++ b/solr/src/solrj/org/apache/solr/client/solrj/impl/LBHttpSolrServer.java @@ -18,7 +18,6 @@ package org.apache.solr.client.solrj.impl; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; -import org.apache.commons.httpclient.DefaultMethodRetryHandler; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.params.HttpMethodParams; import org.apache.solr.client.solrj.*; @@ -32,7 +31,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.ReentrantLock; import java.util.*; /** diff --git a/solr/src/solrj/org/apache/solr/client/solrj/request/ContentStreamUpdateRequest.java b/solr/src/solrj/org/apache/solr/client/solrj/request/ContentStreamUpdateRequest.java index 442257cd01b..0435d2201e5 100644 --- a/solr/src/solrj/org/apache/solr/client/solrj/request/ContentStreamUpdateRequest.java +++ b/solr/src/solrj/org/apache/solr/client/solrj/request/ContentStreamUpdateRequest.java @@ -17,12 +17,6 @@ package org.apache.solr.client.solrj.request; */ -import org.apache.solr.client.solrj.SolrRequest; -import org.apache.solr.client.solrj.SolrServer; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.response.UpdateResponse; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.ContentStream; import org.apache.solr.common.util.ContentStreamBase; diff --git a/solr/src/solrj/org/apache/solr/client/solrj/request/UpdateRequest.java b/solr/src/solrj/org/apache/solr/client/solrj/request/UpdateRequest.java index 1b5ae4a9877..8038dcc28a6 100644 --- a/solr/src/solrj/org/apache/solr/client/solrj/request/UpdateRequest.java +++ b/solr/src/solrj/org/apache/solr/client/solrj/request/UpdateRequest.java @@ -25,10 +25,6 @@ import java.util.Collection; import java.util.List; import java.util.Iterator; -import org.apache.solr.client.solrj.SolrServer; -import org.apache.solr.client.solrj.SolrServerException; -import org.apache.solr.client.solrj.SolrRequest; -import org.apache.solr.client.solrj.response.UpdateResponse; import org.apache.solr.client.solrj.util.ClientUtils; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.params.ModifiableSolrParams; diff --git a/solr/src/solrj/org/apache/solr/client/solrj/response/PivotField.java b/solr/src/solrj/org/apache/solr/client/solrj/response/PivotField.java index 76621c628b3..a8ca4c8b76c 100644 --- a/solr/src/solrj/org/apache/solr/client/solrj/response/PivotField.java +++ b/solr/src/solrj/org/apache/solr/client/solrj/response/PivotField.java @@ -18,7 +18,6 @@ package org.apache.solr.client.solrj.response; import java.io.PrintStream; -import java.io.PrintWriter; import java.io.Serializable; import java.util.List; diff --git a/solr/src/solrj/org/apache/solr/client/solrj/response/SolrPingResponse.java b/solr/src/solrj/org/apache/solr/client/solrj/response/SolrPingResponse.java index 44d37853e75..ad58878f835 100644 --- a/solr/src/solrj/org/apache/solr/client/solrj/response/SolrPingResponse.java +++ b/solr/src/solrj/org/apache/solr/client/solrj/response/SolrPingResponse.java @@ -17,8 +17,6 @@ package org.apache.solr.client.solrj.response; -import org.apache.solr.common.util.NamedList; - /** * * @version $Id$ diff --git a/solr/src/solrj/org/apache/solr/client/solrj/response/UpdateResponse.java b/solr/src/solrj/org/apache/solr/client/solrj/response/UpdateResponse.java index d4dc75680c0..028b313ad01 100644 --- a/solr/src/solrj/org/apache/solr/client/solrj/response/UpdateResponse.java +++ b/solr/src/solrj/org/apache/solr/client/solrj/response/UpdateResponse.java @@ -17,8 +17,6 @@ package org.apache.solr.client.solrj.response; -import org.apache.solr.common.util.NamedList; - /** * TODO -- mostly a stub until we have a defined output format diff --git a/solr/src/test/org/apache/solr/BasicFunctionalityTest.java b/solr/src/test/org/apache/solr/BasicFunctionalityTest.java index 377bb30851d..e8d5371ccff 100644 --- a/solr/src/test/org/apache/solr/BasicFunctionalityTest.java +++ b/solr/src/test/org/apache/solr/BasicFunctionalityTest.java @@ -17,10 +17,6 @@ package org.apache.solr; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; diff --git a/solr/src/test/org/apache/solr/ConvertedLegacyTest.java b/solr/src/test/org/apache/solr/ConvertedLegacyTest.java index 17e1cd44a8e..f6f9d1b0c14 100644 --- a/solr/src/test/org/apache/solr/ConvertedLegacyTest.java +++ b/solr/src/test/org/apache/solr/ConvertedLegacyTest.java @@ -18,7 +18,6 @@ package org.apache.solr; import org.apache.solr.request.*; -import org.apache.solr.util.*; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/DisMaxRequestHandlerTest.java b/solr/src/test/org/apache/solr/DisMaxRequestHandlerTest.java index 3e0d683a646..81cf610c8ca 100644 --- a/solr/src/test/org/apache/solr/DisMaxRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/DisMaxRequestHandlerTest.java @@ -23,8 +23,6 @@ import org.junit.Test; import java.util.regex.Pattern; -import static org.junit.Assert.*; - /** * Tests some basic functionality of the DisMaxRequestHandler */ diff --git a/solr/src/test/org/apache/solr/JSONTestUtil.java b/solr/src/test/org/apache/solr/JSONTestUtil.java index 65b9d398714..d8cb897a6d9 100644 --- a/solr/src/test/org/apache/solr/JSONTestUtil.java +++ b/solr/src/test/org/apache/solr/JSONTestUtil.java @@ -17,14 +17,10 @@ package org.apache.solr; -import org.apache.noggit.JSONParser; import org.apache.noggit.ObjectBuilder; import org.apache.solr.common.util.StrUtils; -import java.io.StringReader; import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; public class JSONTestUtil { diff --git a/solr/src/test/org/apache/solr/MinimalSchemaTest.java b/solr/src/test/org/apache/solr/MinimalSchemaTest.java index 04c0c27e3be..e3712b14a0b 100644 --- a/solr/src/test/org/apache/solr/MinimalSchemaTest.java +++ b/solr/src/test/org/apache/solr/MinimalSchemaTest.java @@ -20,8 +20,6 @@ package org.apache.solr; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.Set; /** diff --git a/solr/src/test/org/apache/solr/OutputWriterTest.java b/solr/src/test/org/apache/solr/OutputWriterTest.java index c5c71f6b9d4..e864e7e25a8 100644 --- a/solr/src/test/org/apache/solr/OutputWriterTest.java +++ b/solr/src/test/org/apache/solr/OutputWriterTest.java @@ -27,8 +27,6 @@ import org.apache.solr.response.SolrQueryResponse; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** Tests the ability to configure multiple query output writers, and select those * at query time. * diff --git a/solr/src/test/org/apache/solr/SampleTest.java b/solr/src/test/org/apache/solr/SampleTest.java index a7494001be8..d32e16c92b7 100644 --- a/solr/src/test/org/apache/solr/SampleTest.java +++ b/solr/src/test/org/apache/solr/SampleTest.java @@ -22,8 +22,6 @@ import org.apache.solr.util.*; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * This is an example of how to write a JUnit tests for Solr using the * SolrTestCaseJ4 diff --git a/solr/src/test/org/apache/solr/SolrInfoMBeanTest.java b/solr/src/test/org/apache/solr/SolrInfoMBeanTest.java index 1cce5c66fa8..fbe14a95f22 100644 --- a/solr/src/test/org/apache/solr/SolrInfoMBeanTest.java +++ b/solr/src/test/org/apache/solr/SolrInfoMBeanTest.java @@ -16,7 +16,6 @@ */ package org.apache.solr; -import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.core.SolrInfoMBean; import org.apache.solr.handler.StandardRequestHandler; import org.apache.solr.handler.admin.LukeRequestHandler; @@ -25,8 +24,6 @@ import org.apache.solr.handler.component.SearchHandler; import org.apache.solr.highlight.DefaultSolrHighlighter; import org.apache.solr.search.LRUCache; import org.junit.BeforeClass; -import org.junit.Ignore; - import java.io.File; import java.net.URL; import java.util.ArrayList; diff --git a/solr/src/test/org/apache/solr/SolrTestCaseJ4.java b/solr/src/test/org/apache/solr/SolrTestCaseJ4.java index cd4957f2be5..8c7617e56c0 100755 --- a/solr/src/test/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/src/test/org/apache/solr/SolrTestCaseJ4.java @@ -51,9 +51,6 @@ import java.io.IOException; import java.io.StringWriter; import java.util.*; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - /** * A junit4 Solr test harness that extends LuceneTestCaseJ4. * Unlike AbstractSolrTestCase, a new core is not created for each test method. diff --git a/solr/src/test/org/apache/solr/TestDistributedSearch.java b/solr/src/test/org/apache/solr/TestDistributedSearch.java index 687c1dcc9d2..b04c51c023d 100755 --- a/solr/src/test/org/apache/solr/TestDistributedSearch.java +++ b/solr/src/test/org/apache/solr/TestDistributedSearch.java @@ -17,9 +17,6 @@ package org.apache.solr; -import junit.framework.TestCase; - -import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.common.params.CommonParams; /** diff --git a/solr/src/test/org/apache/solr/TestGroupingSearch.java b/solr/src/test/org/apache/solr/TestGroupingSearch.java index f095d41863e..09ab2a52d2f 100644 --- a/solr/src/test/org/apache/solr/TestGroupingSearch.java +++ b/solr/src/test/org/apache/solr/TestGroupingSearch.java @@ -22,7 +22,6 @@ import org.apache.noggit.JSONUtil; import org.apache.noggit.ObjectBuilder; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.schema.IndexSchema; -import org.apache.solr.schema.SchemaField; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/TestTrie.java b/solr/src/test/org/apache/solr/TestTrie.java index e767944f015..9a818099609 100644 --- a/solr/src/test/org/apache/solr/TestTrie.java +++ b/solr/src/test/org/apache/solr/TestTrie.java @@ -22,12 +22,9 @@ import org.apache.solr.schema.FieldType; import org.apache.solr.schema.TrieField; import org.apache.solr.util.DateMathParser; import org.junit.After; -import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.text.SimpleDateFormat; import java.util.Locale; import java.util.TimeZone; diff --git a/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java b/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java index c2e6a6a9fa9..ccf60042451 100644 --- a/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java +++ b/solr/src/test/org/apache/solr/analysis/TestRussianFilters.java @@ -20,7 +20,6 @@ package org.apache.solr.analysis; import java.io.Reader; import java.io.StringReader; -import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.Tokenizer; /** diff --git a/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java b/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java index 627eba5914d..9014d969b05 100644 --- a/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java +++ b/solr/src/test/org/apache/solr/analysis/TestTrimFilterFactory.java @@ -17,21 +17,12 @@ package org.apache.solr.analysis; -import java.io.IOException; import java.io.StringReader; -import java.util.Collection; import java.util.HashMap; import java.util.Map; -import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.core.KeywordTokenizer; -import org.apache.lucene.analysis.tokenattributes.FlagsAttribute; -import org.apache.lucene.analysis.tokenattributes.OffsetAttribute; -import org.apache.lucene.analysis.tokenattributes.PayloadAttribute; -import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; -import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import org.apache.lucene.analysis.tokenattributes.TypeAttribute; /** * Simple tests to ensure this factory is working diff --git a/solr/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java b/solr/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java index 98309f8ab59..955ed59feef 100644 --- a/solr/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java +++ b/solr/src/test/org/apache/solr/client/solrj/LargeVolumeTestBase.java @@ -26,8 +26,6 @@ import org.apache.solr.client.solrj.response.UpdateResponse; import org.apache.solr.common.SolrInputDocument; import org.junit.Test; -import static org.junit.Assert.*; - /** * @version $Id$ * @since solr 1.3 diff --git a/solr/src/test/org/apache/solr/client/solrj/SolrExampleBinaryTest.java b/solr/src/test/org/apache/solr/client/solrj/SolrExampleBinaryTest.java index 66bd523ca95..220c64c47b6 100644 --- a/solr/src/test/org/apache/solr/client/solrj/SolrExampleBinaryTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/SolrExampleBinaryTest.java @@ -22,7 +22,6 @@ import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.client.solrj.impl.BinaryRequestWriter; import org.apache.solr.client.solrj.impl.BinaryResponseParser; import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; -import org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer; import org.junit.BeforeClass; diff --git a/solr/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/src/test/org/apache/solr/client/solrj/SolrExampleTests.java index 3975e9d0ce5..9d219c796c3 100644 --- a/solr/src/test/org/apache/solr/client/solrj/SolrExampleTests.java +++ b/solr/src/test/org/apache/solr/client/solrj/SolrExampleTests.java @@ -48,8 +48,6 @@ import org.apache.solr.common.util.NamedList; import org.apache.solr.common.params.FacetParams; import org.junit.Test; -import static org.junit.Assert.*; - /** * This should include tests against the example solr config * diff --git a/solr/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java b/solr/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java index dde373ad5e9..25197812150 100644 --- a/solr/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java @@ -17,15 +17,11 @@ package org.apache.solr.client.solrj; -import java.net.UnknownHostException; - import org.apache.lucene.util.LuceneTestCase; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; -import org.apache.solr.client.solrj.response.QueryResponse; -import org.apache.solr.common.SolrException; /** * diff --git a/solr/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java b/solr/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java index 372a3b8ee18..9f5a4b50a31 100644 --- a/solr/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java +++ b/solr/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java @@ -28,8 +28,6 @@ import org.junit.Test; import java.io.IOException; import java.util.Iterator; -import static org.junit.Assert.assertEquals; - /** * Test for SOLR-1038 * diff --git a/solr/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java b/solr/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java index 7c86a3a05f7..860351fe490 100644 --- a/solr/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java +++ b/solr/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java @@ -25,7 +25,6 @@ import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.SolrInputField; import org.apache.solr.common.SolrDocument; -import org.apache.solr.common.util.Hash; import org.apache.solr.common.util.NamedList; import org.junit.Assert; diff --git a/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java b/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java index 30d57c7b114..69b13facb3c 100644 --- a/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java @@ -17,9 +17,6 @@ package org.apache.solr.client.solrj.embedded; import org.apache.solr.client.solrj.LargeVolumeTestBase; -import org.apache.solr.client.solrj.SolrServer; -import org.apache.solr.client.solrj.impl.BinaryRequestWriter; -import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; import org.junit.BeforeClass; /** diff --git a/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java b/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java index add707d14b7..b72098a1c98 100644 --- a/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeEmbeddedTest.java @@ -18,7 +18,6 @@ package org.apache.solr.client.solrj.embedded; import org.apache.solr.client.solrj.LargeVolumeTestBase; -import org.apache.solr.client.solrj.SolrServer; import org.junit.BeforeClass; public class LargeVolumeEmbeddedTest extends LargeVolumeTestBase { diff --git a/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java b/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java index 50da9a288ff..430316493cd 100644 --- a/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java @@ -18,8 +18,6 @@ package org.apache.solr.client.solrj.embedded; import org.apache.solr.client.solrj.LargeVolumeTestBase; -import org.apache.solr.client.solrj.SolrServer; -import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; import org.junit.BeforeClass; public class LargeVolumeJettyTest extends LargeVolumeTestBase { diff --git a/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java b/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java index 79743965720..74839724d3d 100644 --- a/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleEmbeddedTest.java @@ -18,7 +18,6 @@ package org.apache.solr.client.solrj.embedded; import org.apache.solr.client.solrj.SolrExampleTests; -import org.apache.solr.client.solrj.SolrServer; import org.junit.BeforeClass; /** diff --git a/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java b/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java index f22b62a4264..b18605aae12 100644 --- a/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java @@ -18,10 +18,7 @@ package org.apache.solr.client.solrj.embedded; import org.apache.solr.client.solrj.SolrExampleTests; -import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; -import org.apache.solr.core.SolrCore; -import org.apache.solr.schema.SchemaField; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java b/solr/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java index 952119d1dda..e1856505e0c 100644 --- a/solr/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java @@ -19,7 +19,6 @@ package org.apache.solr.client.solrj.response; import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.common.util.NamedList; -import static org.junit.Assert.*; import org.junit.Test; import java.util.ArrayList; diff --git a/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java b/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java index 77937c1e3b8..fbfbafeab8e 100644 --- a/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java @@ -19,8 +19,6 @@ package org.apache.solr.client.solrj.response; import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.common.util.NamedList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; import org.junit.Test; import java.util.ArrayList; diff --git a/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java b/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java index 65a42d0dcdc..73b506dc0cd 100644 --- a/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java @@ -19,7 +19,6 @@ package org.apache.solr.client.solrj.response; import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.common.util.NamedList; -import static org.junit.Assert.*; import org.junit.Test; import java.util.ArrayList; diff --git a/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java b/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java index 6dbae7dc1e1..06c00bf82fa 100644 --- a/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java @@ -17,8 +17,6 @@ package org.apache.solr.client.solrj.response; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.FileReader; import junit.framework.Assert; @@ -27,7 +25,6 @@ import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.client.solrj.impl.XMLResponseParser; import org.apache.solr.common.util.NamedList; import org.junit.Test; -import static org.junit.Assert.assertTrue; /** * Simple test for Date facet support in QueryResponse diff --git a/solr/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java b/solr/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java index eb957d1a7d1..16258416ba8 100644 --- a/solr/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java +++ b/solr/src/test/org/apache/solr/client/solrj/response/TermsResponseTest.java @@ -21,11 +21,8 @@ import junit.framework.Assert; import org.apache.solr.client.solrj.SolrJettyTestBase; import org.apache.solr.client.solrj.SolrQuery; -import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.client.solrj.SolrExampleTestBase; import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; import org.apache.solr.client.solrj.response.TermsResponse.Term; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java b/solr/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java index 4f82dfb507b..ff789f5088e 100644 --- a/solr/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java +++ b/solr/src/test/org/apache/solr/client/solrj/response/TestSpellCheckResponse.java @@ -24,26 +24,12 @@ import org.apache.solr.client.solrj.response.SpellCheckResponse.Collation; import org.apache.solr.client.solrj.response.SpellCheckResponse.Correction; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.common.params.CommonParams; -import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.SpellingParams; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.common.util.SimpleOrderedMap; -import org.apache.solr.core.SolrCore; -import org.apache.solr.handler.component.SearchComponent; -import org.apache.solr.handler.component.SpellCheckComponent; -import org.apache.solr.request.LocalSolrQueryRequest; -import org.apache.solr.request.SolrRequestHandler; -import org.apache.solr.response.SolrQueryResponse; import org.junit.BeforeClass; import org.junit.Test; import java.util.List; -import static org.junit.Assert.fail; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - /** * Test for SpellCheckComponent's response in Solrj * diff --git a/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java b/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java index 0854a65ba67..00b9568ed98 100644 --- a/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java +++ b/solr/src/test/org/apache/solr/cloud/ZkControllerTest.java @@ -33,7 +33,6 @@ import org.apache.zookeeper.KeeperException; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; public class ZkControllerTest extends SolrTestCaseJ4 { diff --git a/solr/src/test/org/apache/solr/common/util/TestFastInputStream.java b/solr/src/test/org/apache/solr/common/util/TestFastInputStream.java index a5983e739d8..68744e85c63 100644 --- a/solr/src/test/org/apache/solr/common/util/TestFastInputStream.java +++ b/solr/src/test/org/apache/solr/common/util/TestFastInputStream.java @@ -16,8 +16,6 @@ */ package org.apache.solr.common.util; -import static org.junit.Assert.assertEquals; - import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/core/AlternateDirectoryTest.java b/solr/src/test/org/apache/solr/core/AlternateDirectoryTest.java index 75df1bb8d79..9f1d46a92b7 100755 --- a/solr/src/test/org/apache/solr/core/AlternateDirectoryTest.java +++ b/solr/src/test/org/apache/solr/core/AlternateDirectoryTest.java @@ -21,7 +21,6 @@ import java.io.IOException; import org.apache.lucene.index.IndexReader; import org.apache.lucene.store.Directory; -import org.apache.lucene.store.FSDirectory; import org.apache.solr.SolrTestCaseJ4; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/core/IndexReaderFactoryTest.java b/solr/src/test/org/apache/solr/core/IndexReaderFactoryTest.java index 85590d44428..870e21d5567 100644 --- a/solr/src/test/org/apache/solr/core/IndexReaderFactoryTest.java +++ b/solr/src/test/org/apache/solr/core/IndexReaderFactoryTest.java @@ -16,12 +16,8 @@ package org.apache.solr.core; * limitations under the License. */ -import org.apache.lucene.index.IndexReader; -import org.apache.lucene.store.Directory; import org.apache.solr.util.AbstractSolrTestCase; -import java.io.IOException; - public class IndexReaderFactoryTest extends AbstractSolrTestCase { public String getSchemaFile() { diff --git a/solr/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java b/solr/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java index 7d630a8601b..6e480a65556 100644 --- a/solr/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java +++ b/solr/src/test/org/apache/solr/core/RAMDirectoryFactoryTest.java @@ -18,12 +18,8 @@ package org.apache.solr.core; import org.apache.lucene.store.Directory; -import org.apache.lucene.store.RAMDirectory; import org.apache.lucene.util.LuceneTestCase; -import org.easymock.EasyMock; - import java.io.IOException; -import java.io.File; /** * Test-case for RAMDirectoryFactory diff --git a/solr/src/test/org/apache/solr/core/SOLR749Test.java b/solr/src/test/org/apache/solr/core/SOLR749Test.java index 5ce56079a0e..38dcdd20b96 100644 --- a/solr/src/test/org/apache/solr/core/SOLR749Test.java +++ b/solr/src/test/org/apache/solr/core/SOLR749Test.java @@ -17,7 +17,6 @@ package org.apache.solr.core; */ import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.search.QParserPlugin; import org.apache.solr.search.FooQParserPlugin; import org.apache.solr.search.ValueSourceParser; diff --git a/solr/src/test/org/apache/solr/core/SolrCoreTest.java b/solr/src/test/org/apache/solr/core/SolrCoreTest.java index 481d8c25be5..b979ede29f1 100755 --- a/solr/src/test/org/apache/solr/core/SolrCoreTest.java +++ b/solr/src/test/org/apache/solr/core/SolrCoreTest.java @@ -25,7 +25,6 @@ import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.util.plugin.SolrCoreAware; -import org.junit.BeforeClass; import org.junit.Test; import java.util.concurrent.*; diff --git a/solr/src/test/org/apache/solr/core/TestArbitraryIndexDir.java b/solr/src/test/org/apache/solr/core/TestArbitraryIndexDir.java index 0348435b16e..60ec7d05be9 100644 --- a/solr/src/test/org/apache/solr/core/TestArbitraryIndexDir.java +++ b/solr/src/test/org/apache/solr/core/TestArbitraryIndexDir.java @@ -30,7 +30,6 @@ import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.store.Directory; -import org.apache.lucene.store.FSDirectory; import org.apache.lucene.util.Version; import org.apache.solr.common.SolrException; import org.apache.solr.util.AbstractSolrTestCase; diff --git a/solr/src/test/org/apache/solr/core/TestConfig.java b/solr/src/test/org/apache/solr/core/TestConfig.java index 4d78b6bec02..03676c881e6 100644 --- a/solr/src/test/org/apache/solr/core/TestConfig.java +++ b/solr/src/test/org/apache/solr/core/TestConfig.java @@ -21,18 +21,13 @@ import org.apache.lucene.index.IndexWriter; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.handler.admin.ShowFileRequestHandler; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.search.SolrIndexReader; -import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.update.DirectUpdateHandler2; import org.apache.solr.update.SolrIndexConfig; -import org.apache.solr.util.RefCounted; import org.junit.BeforeClass; import org.junit.Test; import org.w3c.dom.Node; import org.w3c.dom.NodeList; -import static org.junit.Assert.*; - import javax.xml.xpath.XPathConstants; import java.io.IOException; import java.io.InputStream; diff --git a/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java b/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java index 63a31ce2f8f..160a69d3492 100644 --- a/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java +++ b/solr/src/test/org/apache/solr/core/TestJmxMonitoredMap.java @@ -20,8 +20,6 @@ import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.common.util.NamedList; import org.apache.solr.core.SolrConfig.JmxConfiguration; import org.junit.After; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/core/TestQuerySenderListener.java b/solr/src/test/org/apache/solr/core/TestQuerySenderListener.java index 2a6659340c3..b8edad8e255 100644 --- a/solr/src/test/org/apache/solr/core/TestQuerySenderListener.java +++ b/solr/src/test/org/apache/solr/core/TestQuerySenderListener.java @@ -24,7 +24,6 @@ import org.apache.solr.common.params.EventParams; import org.apache.lucene.store.Directory; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; public class TestQuerySenderListener extends SolrTestCaseJ4 { diff --git a/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy1.java b/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy1.java index 758a3a0ba86..2d9cf6c03b1 100644 --- a/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy1.java +++ b/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy1.java @@ -22,8 +22,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.Map; /** diff --git a/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy2.java b/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy2.java index 1235910cacd..61ac85ae1be 100644 --- a/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy2.java +++ b/solr/src/test/org/apache/solr/core/TestSolrDeletionPolicy2.java @@ -17,7 +17,6 @@ package org.apache.solr.core; import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.util.AbstractSolrTestCase; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/handler/AnalysisRequestHandlerTestBase.java b/solr/src/test/org/apache/solr/handler/AnalysisRequestHandlerTestBase.java index 580ad7becbc..c46c2751134 100644 --- a/solr/src/test/org/apache/solr/handler/AnalysisRequestHandlerTestBase.java +++ b/solr/src/test/org/apache/solr/handler/AnalysisRequestHandlerTestBase.java @@ -20,8 +20,6 @@ package org.apache.solr.handler; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.util.NamedList; -import static org.junit.Assert.*; - /** * A base class for all analysis request handler tests. * diff --git a/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java b/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java index d7172716a73..2454bfba7cd 100644 --- a/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java @@ -30,8 +30,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.ArrayList; import java.util.List; diff --git a/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java b/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java index 764e25e3670..2443a9b1489 100644 --- a/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java @@ -30,8 +30,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.List; /** diff --git a/solr/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java b/solr/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java index 77a0faff00a..63b1edde582 100644 --- a/solr/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java +++ b/solr/src/test/org/apache/solr/handler/MoreLikeThisHandlerTest.java @@ -18,9 +18,6 @@ package org.apache.solr.handler; import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.params.*; import org.apache.solr.common.util.ContentStream; @@ -30,7 +27,6 @@ import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrQueryRequestBase; import org.apache.solr.response.SolrQueryResponse; -import org.apache.solr.util.AbstractSolrTestCase; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/handler/TestCSVLoader.java b/solr/src/test/org/apache/solr/handler/TestCSVLoader.java index 7a229d1bb6c..c6415c5b065 100755 --- a/solr/src/test/org/apache/solr/handler/TestCSVLoader.java +++ b/solr/src/test/org/apache/solr/handler/TestCSVLoader.java @@ -18,7 +18,6 @@ package org.apache.solr.handler; import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.util.AbstractSolrTestCase; import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.common.util.ContentStream; import org.apache.solr.common.util.ContentStreamBase; diff --git a/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java index 8462a3bd897..47e9ef0fef5 100644 --- a/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java +++ b/solr/src/test/org/apache/solr/handler/TestReplicationHandler.java @@ -37,12 +37,9 @@ import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.util.AbstractSolrTestCase; import org.junit.AfterClass; -import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.io.*; import java.net.URL; diff --git a/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java b/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java index 78988b313b0..75a968d4f7f 100644 --- a/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/DistributedSpellCheckComponentTest.java @@ -1,11 +1,8 @@ package org.apache.solr.handler.component; -import java.io.File; - import org.apache.solr.BaseDistributedSearchTestCase; import org.apache.solr.client.solrj.SolrServer; import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.util.AbstractSolrTestCase; /** * Test for SpellCheckComponent's distributed querying diff --git a/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java b/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java index 508efbcd60b..ac3b7094c1e 100644 --- a/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/DistributedTermsComponentTest.java @@ -1,7 +1,6 @@ package org.apache.solr.handler.component; import org.apache.solr.BaseDistributedSearchTestCase; -import org.junit.Test; /** * Test for TermsComponent distributed querying diff --git a/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java b/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java index 725abebcd6f..b165298fa7d 100644 --- a/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java @@ -39,8 +39,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - public class QueryElevationComponentTest extends SolrTestCaseJ4 { diff --git a/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java b/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java index 2cbf5e77973..66f353ee497 100644 --- a/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/SpellCheckComponentTest.java @@ -29,9 +29,6 @@ import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.spelling.AbstractLuceneSpellChecker; import org.junit.BeforeClass; import org.junit.Test; - - -import static org.junit.Assert.*; /** * @since solr 1.3 diff --git a/solr/src/test/org/apache/solr/handler/component/StatsComponentTest.java b/solr/src/test/org/apache/solr/handler/component/StatsComponentTest.java index 4fe69ea45a4..a0124bab3a4 100644 --- a/solr/src/test/org/apache/solr/handler/component/StatsComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/StatsComponentTest.java @@ -16,18 +16,8 @@ package org.apache.solr.handler.component; * limitations under the License. */ -import org.apache.solr.common.params.CommonParams; -import org.apache.solr.common.params.MapSolrParams; -import org.apache.solr.common.params.StatsParams; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.core.SolrCore; -import org.apache.solr.request.LocalSolrQueryRequest; -import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.util.AbstractSolrTestCase; -import java.util.HashMap; -import java.util.Map; - /** * Statistics Component Test */ diff --git a/solr/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java b/solr/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java index a2e648db1a7..2a4dd253746 100644 --- a/solr/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/TermVectorComponentTest.java @@ -5,16 +5,11 @@ import org.apache.solr.core.SolrCore; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.TermVectorParams; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.common.util.SimpleOrderedMap; -import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.request.LocalSolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.HashMap; import java.util.ArrayList; import java.util.Arrays; diff --git a/solr/src/test/org/apache/solr/handler/component/TermsComponentTest.java b/solr/src/test/org/apache/solr/handler/component/TermsComponentTest.java index f9bedaa599a..eb176b2a8c4 100644 --- a/solr/src/test/org/apache/solr/handler/component/TermsComponentTest.java +++ b/solr/src/test/org/apache/solr/handler/component/TermsComponentTest.java @@ -24,9 +24,6 @@ import org.junit.Test; import java.util.regex.Pattern; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - /** * * diff --git a/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java b/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java index 408286deba3..f438834bfe9 100644 --- a/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java +++ b/solr/src/test/org/apache/solr/highlight/FastVectorHighlighterTest.java @@ -17,9 +17,6 @@ package org.apache.solr.highlight; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.util.HashMap; import org.apache.solr.SolrTestCaseJ4; diff --git a/solr/src/test/org/apache/solr/highlight/HighlighterTest.java b/solr/src/test/org/apache/solr/highlight/HighlighterTest.java index e641dacbc31..76de5bf6540 100755 --- a/solr/src/test/org/apache/solr/highlight/HighlighterTest.java +++ b/solr/src/test/org/apache/solr/highlight/HighlighterTest.java @@ -18,11 +18,9 @@ package org.apache.solr.highlight; import org.apache.lucene.analysis.Analyzer; -import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.core.SolrCore; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.util.*; import org.apache.solr.common.params.HighlightParams; @@ -30,9 +28,6 @@ import org.junit.After; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - -import java.io.IOException; import java.io.StringReader; import java.util.Arrays; import java.util.HashMap; diff --git a/solr/src/test/org/apache/solr/request/JSONWriterTest.java b/solr/src/test/org/apache/solr/request/JSONWriterTest.java index 5c8b057b715..19630e6b86a 100644 --- a/solr/src/test/org/apache/solr/request/JSONWriterTest.java +++ b/solr/src/test/org/apache/solr/request/JSONWriterTest.java @@ -18,7 +18,6 @@ package org.apache.solr.request; import java.io.IOException; -import java.io.Writer; import java.io.StringWriter; import org.apache.solr.SolrTestCaseJ4; @@ -32,8 +31,6 @@ import org.apache.solr.response.SolrQueryResponse; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** Test some aspects of JSON/python writer output (very incomplete) * */ diff --git a/solr/src/test/org/apache/solr/request/SimpleFacetsTest.java b/solr/src/test/org/apache/solr/request/SimpleFacetsTest.java index f0478eb61ed..7f9b76e671c 100644 --- a/solr/src/test/org/apache/solr/request/SimpleFacetsTest.java +++ b/solr/src/test/org/apache/solr/request/SimpleFacetsTest.java @@ -19,7 +19,6 @@ package org.apache.solr.request; import org.apache.solr.SolrTestCaseJ4; import org.junit.BeforeClass; -import org.junit.After; import org.junit.Test; import java.util.ArrayList; diff --git a/solr/src/test/org/apache/solr/request/TestFaceting.java b/solr/src/test/org/apache/solr/request/TestFaceting.java index 91b26d75f68..fa5b6cdd1e0 100755 --- a/solr/src/test/org/apache/solr/request/TestFaceting.java +++ b/solr/src/test/org/apache/solr/request/TestFaceting.java @@ -23,8 +23,6 @@ import org.apache.solr.SolrTestCaseJ4; import org.junit.After; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.Locale; import java.util.Random; diff --git a/solr/src/test/org/apache/solr/response/TestCSVResponseWriter.java b/solr/src/test/org/apache/solr/response/TestCSVResponseWriter.java index bb00a055445..f5ed5027050 100644 --- a/solr/src/test/org/apache/solr/response/TestCSVResponseWriter.java +++ b/solr/src/test/org/apache/solr/response/TestCSVResponseWriter.java @@ -27,10 +27,6 @@ import org.junit.*; import java.io.StringWriter; -import static org.junit.Assert.*; - -import static org.junit.Assert.assertEquals; - public class TestCSVResponseWriter extends SolrTestCaseJ4 { @BeforeClass public static void beforeClass() throws Exception { diff --git a/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java b/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java index 96e506010bd..d8ae588cd77 100644 --- a/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java +++ b/solr/src/test/org/apache/solr/schema/BadIndexSchemaTest.java @@ -22,10 +22,6 @@ import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.core.SolrConfig; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.junit.Before; import org.junit.Test; public class BadIndexSchemaTest extends SolrTestCaseJ4 { diff --git a/solr/src/test/org/apache/solr/schema/CopyFieldTest.java b/solr/src/test/org/apache/solr/schema/CopyFieldTest.java index 9c55959844a..83904d1ecd3 100644 --- a/solr/src/test/org/apache/solr/schema/CopyFieldTest.java +++ b/solr/src/test/org/apache/solr/schema/CopyFieldTest.java @@ -29,8 +29,6 @@ import org.apache.solr.request.SolrQueryRequest; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * This is a simple test to make sure the CopyField works. * It uses its own special schema file. diff --git a/solr/src/test/org/apache/solr/schema/DateFieldTest.java b/solr/src/test/org/apache/solr/schema/DateFieldTest.java index 47186b1e4df..334067f6608 100644 --- a/solr/src/test/org/apache/solr/schema/DateFieldTest.java +++ b/solr/src/test/org/apache/solr/schema/DateFieldTest.java @@ -20,14 +20,9 @@ package org.apache.solr.schema; import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.schema.DateField; import org.apache.solr.util.DateMathParser; -import org.apache.lucene.document.Fieldable; - import java.util.Date; import java.util.TimeZone; import java.util.Locale; -import java.text.DateFormat; - -import junit.framework.TestCase; public class DateFieldTest extends LuceneTestCase { public static TimeZone UTC = TimeZone.getTimeZone("UTC"); diff --git a/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java b/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java index 9a1d7b82050..cb4b90a1c34 100644 --- a/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java +++ b/solr/src/test/org/apache/solr/schema/IndexSchemaTest.java @@ -31,8 +31,6 @@ import org.apache.lucene.search.Similarity; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - public class IndexSchemaTest extends SolrTestCaseJ4 { @BeforeClass diff --git a/solr/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java b/solr/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java index d1db5512355..a43fcfc3c3e 100644 --- a/solr/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java +++ b/solr/src/test/org/apache/solr/schema/NotRequiredUniqueKeyTest.java @@ -20,7 +20,6 @@ package org.apache.solr.schema; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.core.SolrCore; import org.apache.solr.schema.SchemaField; -import org.apache.solr.util.AbstractSolrTestCase; import org.junit.BeforeClass; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/schema/PolyFieldTest.java b/solr/src/test/org/apache/solr/schema/PolyFieldTest.java index 6c5d9bd1a46..34c1fcbe0ee 100644 --- a/solr/src/test/org/apache/solr/schema/PolyFieldTest.java +++ b/solr/src/test/org/apache/solr/schema/PolyFieldTest.java @@ -20,10 +20,6 @@ import org.apache.lucene.document.Fieldable; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.Query; -import org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder; -import org.apache.lucene.spatial.tier.Shape; -import org.apache.lucene.spatial.tier.projections.CartesianTierPlotter; -import org.apache.lucene.spatial.tier.projections.SinusoidalProjector; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.core.SolrCore; import org.apache.solr.common.SolrException; @@ -31,10 +27,6 @@ import org.apache.solr.search.function.ValueSource; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - -import java.util.List; - /** * Test a whole slew of things related to PolyFields diff --git a/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java b/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java index 666cd94c613..e91a249178b 100644 --- a/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java +++ b/solr/src/test/org/apache/solr/schema/RequiredFieldsTest.java @@ -24,8 +24,6 @@ import org.apache.solr.core.SolrCore; import org.apache.solr.schema.SchemaField; import org.junit.BeforeClass; import org.junit.Test; - -import static org.junit.Assert.*; /** * */ diff --git a/solr/src/test/org/apache/solr/schema/TestBinaryField.java b/solr/src/test/org/apache/solr/schema/TestBinaryField.java index 99976215162..1b675d3b0de 100644 --- a/solr/src/test/org/apache/solr/schema/TestBinaryField.java +++ b/solr/src/test/org/apache/solr/schema/TestBinaryField.java @@ -16,8 +16,6 @@ */ package org.apache.solr.schema; -import junit.framework.TestCase; - import org.apache.lucene.util.LuceneTestCase; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.beans.Field; @@ -27,7 +25,6 @@ import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.util.AbstractSolrTestCase; import org.apache.commons.io.FileUtils; import java.nio.ByteBuffer; diff --git a/solr/src/test/org/apache/solr/search/QueryParsingTest.java b/solr/src/test/org/apache/solr/search/QueryParsingTest.java index d8543d2f479..e1bf9c5c2aa 100644 --- a/solr/src/test/org/apache/solr/search/QueryParsingTest.java +++ b/solr/src/test/org/apache/solr/search/QueryParsingTest.java @@ -25,8 +25,6 @@ import org.apache.solr.schema.IndexSchema; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * * diff --git a/solr/src/test/org/apache/solr/search/SpatialFilterTest.java b/solr/src/test/org/apache/solr/search/SpatialFilterTest.java index ca52fead702..0b1d971126c 100644 --- a/solr/src/test/org/apache/solr/search/SpatialFilterTest.java +++ b/solr/src/test/org/apache/solr/search/SpatialFilterTest.java @@ -20,7 +20,6 @@ package org.apache.solr.search; import org.apache.solr.SolrTestCaseJ4; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.assertTrue; /** diff --git a/solr/src/test/org/apache/solr/search/TestRangeQuery.java b/solr/src/test/org/apache/solr/search/TestRangeQuery.java index ad81ae64760..dcd920fdfc6 100644 --- a/solr/src/test/org/apache/solr/search/TestRangeQuery.java +++ b/solr/src/test/org/apache/solr/search/TestRangeQuery.java @@ -24,12 +24,8 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.*; -import junit.framework.TestCase; - public class TestRangeQuery extends SolrTestCaseJ4 { @BeforeClass diff --git a/solr/src/test/org/apache/solr/search/TestSearchPerf.java b/solr/src/test/org/apache/solr/search/TestSearchPerf.java index ef3470c2cc2..dd0a27b02b6 100755 --- a/solr/src/test/org/apache/solr/search/TestSearchPerf.java +++ b/solr/src/test/org/apache/solr/search/TestSearchPerf.java @@ -25,7 +25,6 @@ import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.update.processor.UpdateRequestProcessorChain; import org.apache.solr.update.processor.UpdateRequestProcessor; import org.apache.solr.update.AddUpdateCommand; -import org.apache.solr.common.params.UpdateParams; import org.apache.solr.common.SolrInputDocument; import java.util.*; diff --git a/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java b/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java index d1061bb4316..bb008189901 100644 --- a/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java +++ b/solr/src/test/org/apache/solr/search/TestSolrQueryParser.java @@ -18,7 +18,6 @@ package org.apache.solr.search; import org.apache.solr.SolrTestCaseJ4; import org.junit.BeforeClass; -import org.junit.After; import org.junit.Test; diff --git a/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java b/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java index 7bd85a388ab..4cfebb79c94 100755 --- a/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java +++ b/solr/src/test/org/apache/solr/search/function/TestFunctionQuery.java @@ -23,8 +23,6 @@ import org.apache.lucene.search.Similarity; import org.apache.solr.SolrTestCaseJ4; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.internal.runners.statements.Fail; - import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.Writer; @@ -33,8 +31,6 @@ import java.util.Arrays; import java.util.List; import java.util.Random; -import static org.junit.Assert.assertTrue; - /** * Tests some basic functionality of Solr while demonstrating good * Best Practices for using AbstractSolrTestCase diff --git a/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java b/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java index 29232042547..17b68934a1c 100644 --- a/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java +++ b/solr/src/test/org/apache/solr/search/function/distance/DistanceFunctionTest.java @@ -23,8 +23,6 @@ import org.apache.solr.common.SolrException; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * * diff --git a/solr/src/test/org/apache/solr/servlet/CacheHeaderTest.java b/solr/src/test/org/apache/solr/servlet/CacheHeaderTest.java index cd2811a23f2..3c400f02154 100644 --- a/solr/src/test/org/apache/solr/servlet/CacheHeaderTest.java +++ b/solr/src/test/org/apache/solr/servlet/CacheHeaderTest.java @@ -29,8 +29,6 @@ import org.apache.commons.httpclient.util.DateUtil; import org.junit.BeforeClass; import org.junit.Test; -import static junit.framework.Assert.*; - /** * A test case for the several HTTP cache headers emitted by Solr */ diff --git a/solr/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java b/solr/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java index 063798226df..22c206201ed 100644 --- a/solr/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java +++ b/solr/src/test/org/apache/solr/servlet/CacheHeaderTestBase.java @@ -22,16 +22,10 @@ import org.apache.commons.httpclient.NameValuePair; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.HeadMethod; import org.apache.commons.httpclient.methods.PostMethod; -import org.apache.solr.client.solrj.SolrExampleTestBase; import org.apache.solr.client.solrj.SolrJettyTestBase; -import org.apache.solr.client.solrj.SolrServer; -import org.apache.solr.client.solrj.embedded.JettySolrRunner; import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer; import org.junit.Test; -import static junit.framework.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - public abstract class CacheHeaderTestBase extends SolrJettyTestBase { protected HttpMethodBase getSelectMethod(String method) { diff --git a/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java b/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java index d865c3f28e0..26c3e162200 100644 --- a/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java +++ b/solr/src/test/org/apache/solr/servlet/NoCacheHeaderTest.java @@ -24,8 +24,6 @@ import org.apache.commons.httpclient.util.DateUtil; import org.junit.BeforeClass; import org.junit.Test; -import static junit.framework.Assert.*; - /** * A test case for the several HTTP cache headers emitted by Solr diff --git a/solr/src/test/org/apache/solr/servlet/SolrRequestParserTest.java b/solr/src/test/org/apache/solr/servlet/SolrRequestParserTest.java index fc237ded58c..cc763c885b6 100644 --- a/solr/src/test/org/apache/solr/servlet/SolrRequestParserTest.java +++ b/solr/src/test/org/apache/solr/servlet/SolrRequestParserTest.java @@ -43,8 +43,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - public class SolrRequestParserTest extends SolrTestCaseJ4 { @BeforeClass diff --git a/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java b/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java index c1580a16c53..450df399d7c 100644 --- a/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java +++ b/solr/src/test/org/apache/solr/spelling/FileBasedSpellCheckerTest.java @@ -27,8 +27,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.io.File; import java.util.Date; import java.util.Map; diff --git a/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java b/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java index 8f8e18ddb0e..d7f8edfb95b 100644 --- a/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java +++ b/solr/src/test/org/apache/solr/spelling/IndexBasedSpellCheckerTest.java @@ -16,8 +16,6 @@ */ package org.apache.solr.spelling; -import static org.junit.Assert.*; - import org.apache.lucene.analysis.Token; import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.document.Document; @@ -31,11 +29,9 @@ import org.apache.lucene.search.spell.StringDistance; import org.apache.lucene.search.spell.SuggestWord; import org.apache.lucene.search.spell.SuggestWordFrequencyComparator; import org.apache.lucene.store.Directory; -import org.apache.lucene.store.FSDirectory; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.util.NamedList; import org.apache.solr.core.SolrCore; -import org.apache.solr.handler.component.SearchComponent; import org.apache.solr.handler.component.SpellCheckComponent; import org.apache.solr.util.RefCounted; import org.apache.solr.search.SolrIndexSearcher; diff --git a/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java b/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java index 77066a0d13c..669676f6341 100644 --- a/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java +++ b/solr/src/test/org/apache/solr/spelling/SpellCheckCollatorTest.java @@ -16,10 +16,6 @@ package org.apache.solr.spelling; * limitations under the License. */ -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.util.HashSet; import java.util.List; import java.util.Set; diff --git a/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java b/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java index cd122861c8c..34a950950c3 100644 --- a/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java +++ b/solr/src/test/org/apache/solr/spelling/SpellPossibilityIteratorTest.java @@ -16,8 +16,6 @@ package org.apache.solr.spelling; * limitations under the License. */ -import static org.junit.Assert.*; - import java.util.LinkedHashMap; import java.util.Map; diff --git a/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java b/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java index a22446995d8..7dd1132759e 100644 --- a/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java +++ b/solr/src/test/org/apache/solr/update/DirectUpdateHandlerTest.java @@ -36,8 +36,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * * diff --git a/solr/src/test/org/apache/solr/update/DocumentBuilderTest.java b/solr/src/test/org/apache/solr/update/DocumentBuilderTest.java index 1cd084a2b08..cdbf8e11006 100644 --- a/solr/src/test/org/apache/solr/update/DocumentBuilderTest.java +++ b/solr/src/test/org/apache/solr/update/DocumentBuilderTest.java @@ -26,8 +26,6 @@ import org.apache.solr.schema.FieldType; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * * diff --git a/solr/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java b/solr/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java index 9d88e716dab..9b07cab1312 100755 --- a/solr/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java +++ b/solr/src/test/org/apache/solr/update/processor/SignatureUpdateProcessorFactoryTest.java @@ -37,8 +37,6 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - /** * */ diff --git a/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java b/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java index b562c340730..cb56f5a47ee 100644 --- a/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java +++ b/solr/src/test/org/apache/solr/util/SolrPluginUtilsTest.java @@ -20,12 +20,8 @@ package org.apache.solr.util; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.util.SolrPluginUtils; import org.apache.solr.util.SolrPluginUtils.DisjunctionMaxQueryParser; -import org.apache.solr.core.SolrCore; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.search.DocList; -import org.apache.solr.search.DocSlice; -import org.apache.solr.response.SolrQueryResponse; -import org.apache.solr.common.util.*; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; @@ -41,8 +37,6 @@ import org.apache.lucene.search.BooleanClause.Occur; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; - import java.util.List; import java.util.Map; import java.util.HashMap; diff --git a/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java index b2dce960b5c..422066b079a 100644 --- a/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java +++ b/solr/src/webapp/src/org/apache/solr/client/solrj/embedded/JettySolrRunner.java @@ -30,7 +30,6 @@ import org.mortbay.jetty.Connector; import org.mortbay.jetty.Handler; import org.mortbay.jetty.Server; import org.mortbay.jetty.bio.SocketConnector; -import org.mortbay.jetty.nio.SelectChannelConnector; import org.mortbay.jetty.servlet.Context; import org.mortbay.jetty.servlet.FilterHolder; import org.mortbay.jetty.servlet.HashSessionIdManager; diff --git a/solr/src/webapp/src/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java b/solr/src/webapp/src/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java index 5d71a48d543..6169a5cb095 100644 --- a/solr/src/webapp/src/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java +++ b/solr/src/webapp/src/org/apache/solr/servlet/cache/HttpCacheHeaderUtil.java @@ -35,7 +35,6 @@ import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.response.SolrQueryResponse; import org.apache.commons.codec.binary.Base64;