Skip to content

Apache Lucene open-source search software

Merge branch 'master' into lucene-6835

Mike McCandlessd2a5c103266e
diff --cc lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundReader.java
index 831fb4cf4ef,8cac8108a0a..a4487826d62
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundReader.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50CompoundReader.java
@@@ -16,14 -14,9 +14,16 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.codecs.lucene50;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
import org.apache.lucene.codecs.CodecUtil;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.IndexFileNames;
diff --cc lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
index 9d0cfa79344,584168a06a2..32e078caa52
--- a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
@@@ -16,8 -14,9 +14,10 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.store;
+
+import java.io.FileNotFoundException;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.nio.channels.ClosedChannelException; // javadoc @link
diff --cc lucene/core/src/test/org/apache/lucene/index/TestCodecHoldsOpenFiles.java
index 4ffc1f87c29,0c0605fa4ee..e3fd6995273
--- a/lucene/core/src/test/org/apache/lucene/index/TestCodecHoldsOpenFiles.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestCodecHoldsOpenFiles.java
@@@ -16,7 -14,11 +14,9 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.index;
+
-import java.io.IOException;
-
import org.apache.lucene.document.Document;
import org.apache.lucene.document.IntPoint;
import org.apache.lucene.document.NumericDocValuesField;
diff --cc lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java
index 1d7d3052d1c,846192342b3..b9cdf2b9129
--- a/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestDeletionPolicy.java
@@@ -16,15 -14,9 +14,17 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.index;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
diff --cc lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
index 50daac3e0a3,2ca0b270815..3ea9da004b5
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
@@@ -16,11 -14,10 +14,13 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.index;
+
import java.io.*;
+import java.net.URI;
+import java.nio.file.FileSystem;
+import java.nio.file.Path;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
diff --cc lucene/core/src/test/org/apache/lucene/index/TestIndexWriterFromReader.java
index 44d938fd049,d25711d3824..e63894f1089
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterFromReader.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterFromReader.java
@@@ -16,11 -14,9 +14,13 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.index;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.store.AlreadyClosedException;
diff --cc lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
index a860ec96efa,e3fed138e3f..7a714508190
--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/directory/TestAddTaxonomy.java
@@@ -16,13 -14,14 +16,27 @@@ package org.apache.lucene.facet.taxonom
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.lucene.facet.taxonomy.directory;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Random;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.lucene.facet.FacetTestCase;
++import org.apache.lucene.facet.taxonomy.FacetLabel;
++import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap;
++import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
++import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap;
++import org.apache.lucene.store.Directory;
++import org.apache.lucene.util.IOUtils;
++import org.apache.lucene.util.TestUtil;
+
+ import java.io.IOException;
+ import java.util.HashSet;
+ import java.util.Random;
+ import java.util.concurrent.atomic.AtomicInteger;
+
+ import org.apache.lucene.facet.FacetTestCase;
import org.apache.lucene.facet.taxonomy.FacetLabel;
import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap;
import org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap;
diff --cc lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/TestCompactLabelToOrdinal.java
index 49fc9bd0135,3ab277a6c6b..801b46fcf8b
--- a/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/TestCompactLabelToOrdinal.java
+++ b/lucene/facet/src/test/org/apache/lucene/facet/taxonomy/writercache/TestCompactLabelToOrdinal.java
@@@ -1,7 -1,5 +1,5 @@@
- package org.apache.lucene.facet.taxonomy.writercache;
-
/*
-+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
@@@ -16,7 -14,8 +14,9 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+ package org.apache.lucene.facet.taxonomy.writercache;
+
import java.nio.ByteBuffer;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CodingErrorAction;
diff --cc lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
index 7677bad6098,512a0000895..595efee4d95
--- a/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/store/BaseLockFactoryTestCase.java
@@@ -16,18 -14,8 +14,19 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.lucene.store;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.file.AccessDeniedException;
+import java.nio.file.Path;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantLock;
+
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
diff --cc solr/core/src/java/org/apache/solr/handler/RestoreCore.java
index 735163bf618,086985c7617..a6c1da90ec8
--- a/solr/core/src/java/org/apache/solr/handler/RestoreCore.java
+++ b/solr/core/src/java/org/apache/solr/handler/RestoreCore.java
@@@ -16,7 -14,9 +14,8 @@@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ package org.apache.solr.handler;
-import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.file.Path;
import java.nio.file.Paths;