Apache Lucene open-source search software
LUCENE-7013: add licence header position checker to -validate-source-patterns, and fix the violations it found
Steve Rowe51d4af6859f6
diff --git a/build.xml b/build.xmlindex d0c9aa549b8..5cc7bd84515 100644--- a/build.xml+++ b/build.xml@@ -166,10 +166,17 @@}def javadocsPattern = ~$/(?sm)^\Q/**\E(.*?)\Q*/\E/$;+ def commentPattern = ~$/(?sm)^\Q/*\E(.*?)\Q*/\E/$;def lineSplitter = ~$/[\r\n]+/$;def licenseMatcher = Defaults.createDefaultMatcher();def validLoggerPattern = ~$/(?s)\b(private\s|static\s|final\s){3}+\s*Logger\s+\p{javaJavaIdentifierStart}+\s+=\s+\QLoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\E/$;+ def packagePattern = ~$/(?m)^\s*package\s+org\.apache.*;/$;+ def isLicense = { matcher, ratDocument ->+ licenseMatcher.reset();+ return lineSplitter.split(matcher.group(1)).any{ licenseMatcher.match(ratDocument, it) };+ }+ant.fileScanner{fileset(dir: baseDir){extensions.each{@@ -197,17 +204,32 @@}}def javadocsMatcher = javadocsPattern.matcher(text);+ def ratDocument = new FileDocument(f);while (javadocsMatcher.find()) {- def ratDocument = new FileDocument(f);- licenseMatcher.reset();- if (lineSplitter.split(javadocsMatcher.group(1)).any{ licenseMatcher.match(ratDocument, it) }) {+ if (isLicense(javadocsMatcher, ratDocument)) {reportViolation(f, String.format(Locale.ENGLISH, 'javadoc-style license header [%s]',ratDocument.getMetaData().value(MetaData.RAT_URL_LICENSE_FAMILY_NAME)));}}- if (f.toString().endsWith('.java') && text.contains('org.slf4j.LoggerFactory')) {- if (!validLoggerPattern.matcher(text).find()) {- reportViolation(f, 'invalid logging pattern [not private static final, uses static class name]');+ if (f.toString().endsWith('.java')) {+ if (text.contains('org.slf4j.LoggerFactory')) {+ if (!validLoggerPattern.matcher(text).find()) {+ reportViolation(f, 'invalid logging pattern [not private static final, uses static class name]');+ }+ }+ def packageMatcher = packagePattern.matcher(text);+ if (packageMatcher.find()) {+ def packageStartPos = packageMatcher.start();+ def commentMatcher = commentPattern.matcher(text);+ while (commentMatcher.find()) {+ if (isLicense(commentMatcher, ratDocument)) {+ if (commentMatcher.start() < packageStartPos) {+ break; // This file is all good, so break loop: license header precedes package definition+ } else {+ reportViolation(f, 'package declaration precedes license header');+ }+ }+ }}}};diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.javaindex 68a939b044c..ba44dd8c40e 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.java@@ -16,6 +16,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.charfilter;import java.io.IOException;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex b/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflexindex 352ede79ffa..98c39462179 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.jflex@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.charfilter;import java.io.IOException;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.javaindex 60df1c051c4..1a1a637d0a3 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilter.java@@ -1,5 +1,3 @@-package org.apache.lucene.analysis.minhash;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -16,6 +14,9 @@ package org.apache.lucene.analysis.minhash;* See the License for the specific language governing permissions and* limitations under the License.*/++package org.apache.lucene.analysis.minhash;+import java.io.IOException;import java.util.ArrayList;import java.util.List;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilterFactory.javaindex d951b9bb1c0..c4c827ba986 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilterFactory.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/minhash/MinHashFilterFactory.java@@ -1,5 +1,3 @@-package org.apache.lucene.analysis.minhash;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -16,6 +14,9 @@ package org.apache.lucene.analysis.minhash;* See the License for the specific language governing permissions and* limitations under the License.*/++package org.apache.lucene.analysis.minhash;+import java.util.Map;import org.apache.lucene.analysis.TokenStream;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macroindex 5d78558a20d..ec336f2698b 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+// Generated from IANA Root Zone Database <http://www.internic.net/zones/root.zone>// file version from Friday, December 6, 2013 4:34:10 AM UTC// generated on Friday, December 6, 2013 3:21:59 PM UTC@@ -363,4 +364,3 @@ ASCIITLD = "." (| [zZ][mM]| [zZ][wW]) "."? // Accept trailing root (empty) domain-diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.javaindex 76b1ef640c4..339ab8bb116 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizer.java@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.standard;import java.io.IOException;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflexindex de65d26247a..4d6ad167811 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.standard;import java.io.Reader;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.javaindex 03de0329be5..d2b02e43784 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizer.java@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.standard;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizerImpl.jflex b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizerImpl.jflexindex 32af6317827..73a471e3a8a 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizerImpl.jflex+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29URLEmailTokenizerImpl.jflex@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.standard;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/UnicodeProps.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/UnicodeProps.javaindex e1537aee295..75070d10700 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/UnicodeProps.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/UnicodeProps.java@@ -1,7 +1,5 @@// DO NOT EDIT THIS FILE! Use "ant unicode-data" to recreate.-package org.apache.lucene.analysis.util;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -19,6 +17,8 @@ package org.apache.lucene.analysis.util;* limitations under the License.*/+package org.apache.lucene.analysis.util;+import org.apache.lucene.util.Bits;import org.apache.lucene.util.SparseFixedBitSet;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.javaindex 337a5628e74..7f9227f7f12 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java@@ -16,6 +16,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.wikipedia;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex b/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflexindex 404fbd68469..3ac31e45fc5 100644--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.wikipedia;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/minhash/MinHashFilterTest.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/minhash/MinHashFilterTest.javaindex 7c02d3b3aed..a4080feab76 100644--- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/minhash/MinHashFilterTest.java+++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/minhash/MinHashFilterTest.java@@ -1,5 +1,3 @@-package org.apache.lucene.analysis.minhash;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.analysis.minhash;* limitations under the License.*/+package org.apache.lucene.analysis.minhash;+import java.io.IOException;import java.io.StringReader;import java.io.UnsupportedEncodingException;diff --git a/lucene/analysis/common/src/tools/groovy/generate-unicode-data.groovy b/lucene/analysis/common/src/tools/groovy/generate-unicode-data.groovyindex 3ea2b9e6fdf..37857e09b00 100644--- a/lucene/analysis/common/src/tools/groovy/generate-unicode-data.groovy+++ b/lucene/analysis/common/src/tools/groovy/generate-unicode-data.groovy@@ -44,8 +44,6 @@ def unicodeVersion = UCharacter.getUnicodeVersion().toString();def code = """// DO NOT EDIT THIS FILE! Use "ant unicode-data" to recreate.-package org.apache.lucene.analysis.util;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -63,6 +61,8 @@ package org.apache.lucene.analysis.util;* limitations under the License.*/+package org.apache.lucene.analysis.util;+import org.apache.lucene.util.Bits;import org.apache.lucene.util.SparseFixedBitSet;diff --git a/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java b/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.javaindex 5c5169a05cf..5b8fc753bed 100644--- a/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java+++ b/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.standard;import java.io.IOException;diff --git a/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex b/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflexindex 24c401d084f..11b2cbdddfd 100644--- a/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex+++ b/lucene/core/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex@@ -14,6 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/+package org.apache.lucene.analysis.standard;import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;diff --git a/lucene/core/src/java/org/apache/lucene/index/MergeReaderWrapper.java b/lucene/core/src/java/org/apache/lucene/index/MergeReaderWrapper.javaindex 2401d0fa3ee..bcecf2fb04f 100644--- a/lucene/core/src/java/org/apache/lucene/index/MergeReaderWrapper.java+++ b/lucene/core/src/java/org/apache/lucene/index/MergeReaderWrapper.java@@ -1,5 +1,3 @@-package org.apache.lucene.index;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.index;* limitations under the License.*/+package org.apache.lucene.index;+import java.io.IOException;import org.apache.lucene.codecs.DocValuesProducer;diff --git a/lucene/core/src/java/org/apache/lucene/index/SortingLeafReader.java b/lucene/core/src/java/org/apache/lucene/index/SortingLeafReader.javaindex 70d5d204439..c1476d05edc 100644--- a/lucene/core/src/java/org/apache/lucene/index/SortingLeafReader.java+++ b/lucene/core/src/java/org/apache/lucene/index/SortingLeafReader.java@@ -1,5 +1,3 @@-package org.apache.lucene.index;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.index;* limitations under the License.*/+package org.apache.lucene.index;+import java.io.IOException;import java.util.Arrays;diff --git a/lucene/core/src/java/org/apache/lucene/store/ByteArrayIndexInput.java b/lucene/core/src/java/org/apache/lucene/store/ByteArrayIndexInput.javaindex 80f56474fdf..6ad6125704e 100644--- a/lucene/core/src/java/org/apache/lucene/store/ByteArrayIndexInput.java+++ b/lucene/core/src/java/org/apache/lucene/store/ByteArrayIndexInput.java@@ -1,5 +1,3 @@-package org.apache.lucene.store;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.store;* limitations under the License.*/+package org.apache.lucene.store;+import java.io.IOException;/**diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene62/TestLucene62SegmentInfoFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene62/TestLucene62SegmentInfoFormat.javaindex 8c758f29e5a..54110f72a9d 100644--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene62/TestLucene62SegmentInfoFormat.java+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene62/TestLucene62SegmentInfoFormat.java@@ -1,5 +1,3 @@-package org.apache.lucene.codecs.lucene62;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.codecs.lucene62;* limitations under the License.*/+package org.apache.lucene.codecs.lucene62;+import org.apache.lucene.codecs.Codec;import org.apache.lucene.index.BaseSegmentInfoFormatTestCase;import org.apache.lucene.util.TestUtil;diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.javaindex 65287657b19..363ccb2ce59 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexSorting.java@@ -1,5 +1,3 @@-package org.apache.lucene.index;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.index;* limitations under the License.*/+package org.apache.lucene.index;+import java.io.IOException;import java.util.ArrayList;import java.util.Collections;diff --git 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.javaindex a860ec96efa..232ccee9259 100644--- 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@@ -1,5 +1,3 @@-package org.apache.lucene.facet.taxonomy.directory;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.facet.taxonomy.directory;* limitations under the License.*/+package org.apache.lucene.facet.taxonomy.directory;+import java.io.IOException;import java.util.HashSet;import java.util.Random;diff --git a/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.javaindex 5018e974809..f99f3183127 100644--- a/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java+++ b/lucene/join/src/java/org/apache/lucene/search/join/PointInSetIncludingScoreQuery.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.lucene.search.join;import java.io.IOException;@@ -32,23 +49,6 @@ import org.apache.lucene.util.BytesRef;import org.apache.lucene.util.BytesRefBuilder;import org.apache.lucene.util.FixedBitSet;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-// A TermsIncludingScoreQuery variant for point values:abstract class PointInSetIncludingScoreQuery extends Query {diff --git a/lucene/misc/src/java/org/apache/lucene/store/HardlinkCopyDirectoryWrapper.java b/lucene/misc/src/java/org/apache/lucene/store/HardlinkCopyDirectoryWrapper.javaindex 374178ec84a..c7b164a9954 100644--- a/lucene/misc/src/java/org/apache/lucene/store/HardlinkCopyDirectoryWrapper.java+++ b/lucene/misc/src/java/org/apache/lucene/store/HardlinkCopyDirectoryWrapper.java@@ -1,5 +1,3 @@-package org.apache.lucene.store;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.store;* limitations under the License.*/+package org.apache.lucene.store;+import java.io.FileNotFoundException;import java.io.IOException;import java.nio.file.FileAlreadyExistsException;diff --git a/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java b/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.javaindex 953dc5939ce..4a88dd42009 100644--- a/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java+++ b/lucene/misc/src/test/org/apache/lucene/store/TestHardLinkCopyDirectoryWrapper.java@@ -1,5 +1,3 @@-package org.apache.lucene.store;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.store;* limitations under the License.*/+package org.apache.lucene.store;+import java.io.IOException;import java.nio.file.Files;import java.nio.file.Path;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyJob.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyJob.javaindex 1e63d1fedb9..2bdcf1dd9d3 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyJob.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyJob.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.IOException;import java.util.Iterator;import java.util.List;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyOneFile.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyOneFile.javaindex ab71e05e648..dd9f16cac2e 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyOneFile.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyOneFile.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.Closeable;import java.io.IOException;import java.util.Locale;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyState.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyState.javaindex c5ddda0228c..aff45c0ae63 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyState.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/CopyState.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.util.Collections;import java.util.Map;import java.util.Set;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/FileMetaData.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/FileMetaData.javaindex 897d5ca5af6..ac3e1f0be29 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/FileMetaData.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/FileMetaData.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+/** Holds metadata details about a single file that we use to confirm two files (one remote, one local) are in fact "identical".** @lucene.experimental */diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/Node.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/Node.javaindex 85da89c3438..759497a644a 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/Node.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/Node.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.Closeable;import java.io.EOFException;import java.io.FileNotFoundException;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/NodeCommunicationException.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/NodeCommunicationException.javaindex d286f3dc0f0..cbbb65c2487 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/NodeCommunicationException.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/NodeCommunicationException.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+/*** Should be thrown by subclasses of {@link PrimaryNode} and {@link ReplicaNode} if a non-fatal exception* occurred while communicating between nodes.diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PreCopyMergedSegmentWarmer.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PreCopyMergedSegmentWarmer.javaindex 77f23ab00d6..0b33f1714d8 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PreCopyMergedSegmentWarmer.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PreCopyMergedSegmentWarmer.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+/** A merged segment warmer that pre-copies the merged segment out to* replicas before primary cuts over to the merged segment. This* ensures that NRT reopen time on replicas is only in proportion todiff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PrimaryNode.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PrimaryNode.javaindex 749f54e716f..1d04d081c95 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PrimaryNode.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/PrimaryNode.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.IOException;import java.io.PrintStream;import java.util.Collections;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaFileDeleter.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaFileDeleter.javaindex 1638c297699..86dbc52c716 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaFileDeleter.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaFileDeleter.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.FileNotFoundException;import java.io.IOException;import java.nio.file.NoSuchFileException;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaNode.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaNode.javaindex 1ca151965c1..ce9c3ceba0d 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaNode.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/ReplicaNode.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.IOException;import java.io.PrintStream;import java.util.ArrayList;diff --git a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/SegmentInfosSearcherManager.java b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/SegmentInfosSearcherManager.javaindex 4fda0fa4192..4cb49c4f12d 100644--- a/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/SegmentInfosSearcherManager.java+++ b/lucene/replicator/src/java/org/apache/lucene/replicator/nrt/SegmentInfosSearcherManager.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.IOException;import java.util.ArrayList;import java.util.List;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Connection.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Connection.javaindex 87fce579e0a..8d671bae20f 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Connection.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Connection.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedOutputStream;import java.io.Closeable;import java.io.IOException;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Jobs.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Jobs.javaindex 6968fdb4cef..87feb33119a 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Jobs.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/Jobs.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.Closeable;import java.io.IOException;import java.util.PriorityQueue;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/NodeProcess.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/NodeProcess.javaindex a0bfb78f399..daeffc79f1c 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/NodeProcess.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/NodeProcess.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.Closeable;import java.io.IOException;import java.util.concurrent.atomic.AtomicBoolean;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleCopyJob.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleCopyJob.javaindex 6793df866f2..ba72ae4b858 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleCopyJob.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleCopyJob.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.IOException;import java.util.HashSet;import java.util.Iterator;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimplePrimaryNode.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimplePrimaryNode.javaindex 3d41b32870c..bb39135ec66 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimplePrimaryNode.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimplePrimaryNode.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedOutputStream;import java.io.EOFException;import java.io.IOException;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleReplicaNode.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleReplicaNode.javaindex 6948b78d2ee..c394c659627 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleReplicaNode.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleReplicaNode.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedOutputStream;import java.io.EOFException;import java.io.IOException;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleServer.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleServer.javaindex 49d2ce2b172..20c3f613f23 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleServer.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleServer.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.IOException;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleTransLog.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleTransLog.javaindex dd2085fe82f..ce75a2902a8 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleTransLog.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/SimpleTransLog.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.Closeable;import java.io.EOFException;import java.io.IOException;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.javaindex f98cf8d08dc..a2e7cf9d0df 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.javaindex b53dc7869b4..045bb38953a 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedReader;import java.io.Closeable;import java.io.IOException;diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/ThreadPumper.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/ThreadPumper.javaindex 73f3908eee1..ff57ea67c98 100644--- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/ThreadPumper.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/ThreadPumper.java@@ -1,5 +1,3 @@-package org.apache.lucene.replicator.nrt;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.replicator.nrt;* limitations under the License.*/+package org.apache.lucene.replicator.nrt;+import java.io.BufferedReader;import java.io.IOException;import java.io.PrintStream;diff --git a/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/document/GeoPointTokenStream.java b/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/document/GeoPointTokenStream.javaindex 5ecd1db230f..87b228bb907 100644--- a/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/document/GeoPointTokenStream.java+++ b/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/document/GeoPointTokenStream.java@@ -1,5 +1,3 @@-package org.apache.lucene.spatial.geopoint.document;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.spatial.geopoint.document;* limitations under the License.*/+package org.apache.lucene.spatial.geopoint.document;+import java.util.Objects;import org.apache.lucene.analysis.TokenStream;diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/util/TestGeoPointField.java b/lucene/spatial/src/test/org/apache/lucene/spatial/util/TestGeoPointField.javaindex 567d46db279..1e4f4785ab4 100644--- a/lucene/spatial/src/test/org/apache/lucene/spatial/util/TestGeoPointField.java+++ b/lucene/spatial/src/test/org/apache/lucene/spatial/util/TestGeoPointField.java@@ -1,5 +1,3 @@-package org.apache.lucene.spatial.util;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.spatial.util;* limitations under the License.*/+package org.apache.lucene.spatial.util;+import org.apache.lucene.spatial.geopoint.document.GeoPointField;import org.apache.lucene.util.BytesRefBuilder;import org.apache.lucene.util.LuceneTestCase;diff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymAnalyzer.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymAnalyzer.javaindex a2ce33e74e2..1bbaabc896c 100644--- a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymAnalyzer.java+++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymAnalyzer.java@@ -1,5 +1,3 @@-package org.apache.lucene.analysis;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.analysis;* limitations under the License.*/+package org.apache.lucene.analysis;+/** adds synonym of "dog" for "dogs", and synonym of "cavy" for "guinea pig". */public class MockSynonymAnalyzer extends Analyzer {@Overridediff --git a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymFilter.java b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymFilter.javaindex b50be0735dd..1d8b51391e6 100644--- a/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymFilter.java+++ b/lucene/test-framework/src/java/org/apache/lucene/analysis/MockSynonymFilter.java@@ -1,5 +1,3 @@-package org.apache.lucene.analysis;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.analysis;* limitations under the License.*/+package org.apache.lucene.analysis;+import java.io.IOException;import java.util.ArrayList;import java.util.List;diff --git a/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java b/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.javaindex 4f68adb0067..3553b1576a8 100644--- a/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java+++ b/lucene/test-framework/src/java/org/apache/lucene/geo/EarthDebugger.java@@ -1,5 +1,3 @@-package org.apache.lucene.geo;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.geo;* limitations under the License.*/+package org.apache.lucene.geo;+import org.apache.lucene.util.SloppyMath;/** Draws shapes on the earth surface and renders using the very cool http://www.webglearth.org.diff --git a/lucene/test-framework/src/java/org/apache/lucene/mockfile/VirusCheckingFS.java b/lucene/test-framework/src/java/org/apache/lucene/mockfile/VirusCheckingFS.javaindex 2c24d109dd1..eff62b13967 100644--- a/lucene/test-framework/src/java/org/apache/lucene/mockfile/VirusCheckingFS.java+++ b/lucene/test-framework/src/java/org/apache/lucene/mockfile/VirusCheckingFS.java@@ -1,5 +1,3 @@-package org.apache.lucene.mockfile;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.mockfile;* limitations under the License.*/+package org.apache.lucene.mockfile;+import java.io.IOException;import java.nio.file.AccessDeniedException;import java.nio.file.FileSystem;diff --git a/lucene/test-framework/src/test/org/apache/lucene/mockfile/TestVirusCheckingFS.java b/lucene/test-framework/src/test/org/apache/lucene/mockfile/TestVirusCheckingFS.javaindex 4a34ab83aa9..91e9aa86d1e 100644--- a/lucene/test-framework/src/test/org/apache/lucene/mockfile/TestVirusCheckingFS.java+++ b/lucene/test-framework/src/test/org/apache/lucene/mockfile/TestVirusCheckingFS.java@@ -1,5 +1,3 @@-package org.apache.lucene.mockfile;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.lucene.mockfile;* limitations under the License.*/+package org.apache.lucene.mockfile;+import java.io.IOException;import java.io.OutputStream;import java.net.URI;diff --git a/solr/core/src/java/org/apache/solr/cloud/LockTree.java b/solr/core/src/java/org/apache/solr/cloud/LockTree.javaindex d629d1cdd87..8ae7f7530a3 100644--- a/solr/core/src/java/org/apache/solr/cloud/LockTree.java+++ b/solr/core/src/java/org/apache/solr/cloud/LockTree.java@@ -1,18 +1,3 @@-package org.apache.solr.cloud;--import java.lang.invoke.MethodHandles;-import java.util.HashMap;-import java.util.LinkedList;-import java.util.List;-import java.util.Map;--import org.apache.solr.cloud.OverseerMessageHandler.Lock;-import org.apache.solr.common.params.CollectionParams;-import org.apache.solr.common.params.CollectionParams.LockLevel;-import org.apache.solr.common.util.StrUtils;-import org.slf4j.Logger;-import org.slf4j.LoggerFactory;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -30,6 +15,21 @@ import org.slf4j.LoggerFactory;* limitations under the License.*/+package org.apache.solr.cloud;++import java.lang.invoke.MethodHandles;+import java.util.HashMap;+import java.util.LinkedList;+import java.util.List;+import java.util.Map;++import org.apache.solr.cloud.OverseerMessageHandler.Lock;+import org.apache.solr.common.params.CollectionParams;+import org.apache.solr.common.params.CollectionParams.LockLevel;+import org.apache.solr.common.util.StrUtils;+import org.slf4j.Logger;+import org.slf4j.LoggerFactory;+/*** This is a utility class that offers fine grained locking for various Collection Operations* This class is designed for single threaded operation. It's safe for multiple threads to use itdiff --git a/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepositoryFactory.java b/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepositoryFactory.javaindex d03587489e2..aaccceb5876 100644--- a/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepositoryFactory.java+++ b/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepositoryFactory.java@@ -1,5 +1,3 @@-package org.apache.solr.core.backup.repository;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.core.backup.repository;* limitations under the License.*/+package org.apache.solr.core.backup.repository;+import java.lang.invoke.MethodHandles;import java.util.HashMap;import java.util.Map;diff --git a/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java b/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.javaindex 596c2713e37..bb148dea543 100644--- a/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java+++ b/solr/core/src/java/org/apache/solr/core/backup/repository/HdfsBackupRepository.java@@ -1,5 +1,3 @@-package org.apache.solr.core.backup.repository;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.core.backup.repository;* limitations under the License.*/+package org.apache.solr.core.backup.repository;+import java.io.IOException;import java.io.OutputStream;import java.net.URI;diff --git a/solr/core/src/java/org/apache/solr/core/backup/repository/LocalFileSystemRepository.java b/solr/core/src/java/org/apache/solr/core/backup/repository/LocalFileSystemRepository.javaindex bb75a9e2680..4eb77908c5a 100644--- a/solr/core/src/java/org/apache/solr/core/backup/repository/LocalFileSystemRepository.java+++ b/solr/core/src/java/org/apache/solr/core/backup/repository/LocalFileSystemRepository.java@@ -1,5 +1,3 @@-package org.apache.solr.core.backup.repository;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.core.backup.repository;* limitations under the License.*/+package org.apache.solr.core.backup.repository;+import java.io.IOException;import java.io.OutputStream;import java.net.URI;diff --git a/solr/core/src/java/org/apache/solr/handler/GraphHandler.java b/solr/core/src/java/org/apache/solr/handler/GraphHandler.javaindex c4b42d9d609..4b043b248d8 100644--- a/solr/core/src/java/org/apache/solr/handler/GraphHandler.java+++ b/solr/core/src/java/org/apache/solr/handler/GraphHandler.java@@ -1,5 +1,3 @@-package org.apache.solr.handler;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.handler;* limitations under the License.*/+package org.apache.solr.handler;+import java.io.IOException;import java.lang.invoke.MethodHandles;import java.util.HashMap;@@ -278,4 +278,4 @@ public class GraphHandler extends RequestHandlerBase implements SolrCoreAware, P}}-}\ No newline at end of file+}diff --git a/solr/core/src/java/org/apache/solr/response/GraphMLResponseWriter.java b/solr/core/src/java/org/apache/solr/response/GraphMLResponseWriter.javaindex d941991c2b2..7f2fac22b73 100644--- a/solr/core/src/java/org/apache/solr/response/GraphMLResponseWriter.java+++ b/solr/core/src/java/org/apache/solr/response/GraphMLResponseWriter.java@@ -1,5 +1,3 @@-package org.apache.solr.response;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.response;* limitations under the License.*/+package org.apache.solr.response;+import java.io.IOException;import java.io.PrintWriter;import java.io.Writer;@@ -164,4 +164,4 @@ public class GraphMLResponseWriter implements QueryResponseWriter {return s;}-}\ No newline at end of file+}diff --git a/solr/core/src/java/org/apache/solr/security/AutorizationEditOperation.java b/solr/core/src/java/org/apache/solr/security/AutorizationEditOperation.javaindex f60b6dd7b92..88c7987ef48 100644--- a/solr/core/src/java/org/apache/solr/security/AutorizationEditOperation.java+++ b/solr/core/src/java/org/apache/solr/security/AutorizationEditOperation.java@@ -1,18 +1,3 @@-package org.apache.solr.security;--import java.util.ArrayList;-import java.util.LinkedHashMap;-import java.util.List;-import java.util.Map;-import java.util.concurrent.atomic.AtomicInteger;-import java.util.stream.Collectors;--import org.apache.solr.util.CommandOperation;--import static org.apache.solr.common.util.Utils.getDeepCopy;-import static org.apache.solr.handler.admin.SecurityConfHandler.getListValue;-import static org.apache.solr.handler.admin.SecurityConfHandler.getMapValue;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -30,6 +15,20 @@ import static org.apache.solr.handler.admin.SecurityConfHandler.getMapValue;* limitations under the License.*/+package org.apache.solr.security;++import java.util.ArrayList;+import java.util.LinkedHashMap;+import java.util.List;+import java.util.Map;+import java.util.concurrent.atomic.AtomicInteger;+import java.util.stream.Collectors;++import org.apache.solr.util.CommandOperation;++import static org.apache.solr.common.util.Utils.getDeepCopy;+import static org.apache.solr.handler.admin.SecurityConfHandler.getListValue;+import static org.apache.solr.handler.admin.SecurityConfHandler.getMapValue;enum AutorizationEditOperation {SET_USER_ROLE("set-user-role") {diff --git a/solr/core/src/java/org/apache/solr/security/Permission.java b/solr/core/src/java/org/apache/solr/security/Permission.javaindex 0084bdcd9df..33ae8f72434 100644--- a/solr/core/src/java/org/apache/solr/security/Permission.java+++ b/solr/core/src/java/org/apache/solr/security/Permission.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.security;import java.util.Collection;@@ -19,24 +36,6 @@ import static java.util.Collections.singleton;import static java.util.Collections.singletonList;import static org.apache.solr.common.params.CommonParams.NAME;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--class Permission {String name;Set<String> path, role, collections, method;diff --git a/solr/core/src/java/org/apache/solr/security/PermissionNameProvider.java b/solr/core/src/java/org/apache/solr/security/PermissionNameProvider.javaindex 4b6af47d238..d0e5c9a7dff 100644--- a/solr/core/src/java/org/apache/solr/security/PermissionNameProvider.java+++ b/solr/core/src/java/org/apache/solr/security/PermissionNameProvider.java@@ -1,5 +1,3 @@-package org.apache.solr.security;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.security;* limitations under the License.*/+package org.apache.solr.security;+import java.util.HashSet;import java.util.Map;import java.util.Set;diff --git a/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java b/solr/core/src/java/org/apache/solr/update/IndexFingerprint.javaindex 7b8a7319874..01cf9a644e4 100644--- a/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java+++ b/solr/core/src/java/org/apache/solr/update/IndexFingerprint.java@@ -1,5 +1,3 @@-package org.apache.solr.update;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.update;* limitations under the License.*/+package org.apache.solr.update;+import java.io.IOException;import java.lang.invoke.MethodHandles;import java.util.LinkedHashMap;diff --git a/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.javaindex 88ac0db30c6..050fff02455 100644--- a/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java+++ b/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.update.processor;import java.io.IOException;@@ -17,23 +34,6 @@ import org.apache.solr.schema.IndexSchema;import org.apache.solr.schema.SchemaField;import org.apache.solr.update.AddUpdateCommand;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-/*** This Class is a Request Update Processor to classify the document in input and add a field* containing the class to the Document.diff --git a/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.javaindex 2f1b8d70710..81bec2f91f4 100644--- a/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.java+++ b/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.java@@ -1,13 +1,3 @@-package org.apache.solr.update.processor;--import org.apache.lucene.index.IndexReader;-import org.apache.solr.common.SolrException;-import org.apache.solr.common.params.SolrParams;-import org.apache.solr.common.util.NamedList;-import org.apache.solr.request.SolrQueryRequest;-import org.apache.solr.response.SolrQueryResponse;-import org.apache.solr.schema.IndexSchema;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -25,6 +15,16 @@ import org.apache.solr.schema.IndexSchema;* limitations under the License.*/+package org.apache.solr.update.processor;++import org.apache.lucene.index.IndexReader;+import org.apache.solr.common.SolrException;+import org.apache.solr.common.params.SolrParams;+import org.apache.solr.common.util.NamedList;+import org.apache.solr.request.SolrQueryRequest;+import org.apache.solr.response.SolrQueryResponse;+import org.apache.solr.schema.IndexSchema;+/*** This class implements an UpdateProcessorFactory for the Classification Update Processor.* It takes in input a series of parameter that will be necessary to instantiate and use the Classifierdiff --git a/solr/core/src/test/org/apache/solr/cloud/CreateCollectionCleanupTest.java b/solr/core/src/test/org/apache/solr/cloud/CreateCollectionCleanupTest.javaindex 2d1a7f8d888..989e1afde34 100644--- a/solr/core/src/test/org/apache/solr/cloud/CreateCollectionCleanupTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/CreateCollectionCleanupTest.java@@ -1,5 +1,3 @@-package org.apache.solr.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.cloud;* limitations under the License.*/+package org.apache.solr.cloud;+import java.util.ArrayList;import java.util.Properties;diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.javaindex 6809b6d8ad9..e902ab4cbd1 100644--- a/solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerModifyCollectionTest.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.cloud;import static org.apache.solr.client.solrj.SolrRequest.METHOD.POST;@@ -22,23 +39,6 @@ import org.junit.Test;import org.slf4j.Logger;import org.slf4j.LoggerFactory;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class OverseerModifyCollectionTest extends AbstractFullDistribZkTestBase {private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());diff --git a/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java b/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.javaindex 082b618a321..78be30bfdc2 100644--- a/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/SolrCLIZkUtilsTest.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.cloud;import java.io.ByteArrayOutputStream;@@ -20,23 +37,6 @@ import org.junit.AfterClass;import org.junit.BeforeClass;import org.junit.Test;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class SolrCLIZkUtilsTest extends SolrCloudTestCase {@BeforeClassdiff --git a/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java b/solr/core/src/test/org/apache/solr/cloud/TestLockTree.javaindex 3d9c059d2b9..ec503275b11 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestLockTree.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.cloud;import java.lang.invoke.MethodHandles;@@ -20,23 +37,6 @@ import static org.apache.solr.common.params.CollectionParams.CollectionAction.DEimport static org.apache.solr.common.params.CollectionParams.CollectionAction.MODIFYCOLLECTION;import static org.apache.solr.common.params.CollectionParams.CollectionAction.SPLITSHARD;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class TestLockTree extends SolrTestCaseJ4 {private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());diff --git a/solr/core/src/test/org/apache/solr/cloud/TestOnReconnectListenerSupport.java b/solr/core/src/test/org/apache/solr/cloud/TestOnReconnectListenerSupport.javaindex 052cd1f630b..165b22ac2b0 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestOnReconnectListenerSupport.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestOnReconnectListenerSupport.java@@ -1,5 +1,3 @@-package org.apache.solr.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.cloud;* limitations under the License.*/+package org.apache.solr.cloud;+import java.lang.invoke.MethodHandles;import java.util.Set;diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSizeLimitedDistributedMap.java b/solr/core/src/test/org/apache/solr/cloud/TestSizeLimitedDistributedMap.javaindex 2131f48fafc..801403aa73f 100644--- a/solr/core/src/test/org/apache/solr/cloud/TestSizeLimitedDistributedMap.java+++ b/solr/core/src/test/org/apache/solr/cloud/TestSizeLimitedDistributedMap.java@@ -1,5 +1,3 @@-package org.apache.solr.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.cloud;* limitations under the License.*/+package org.apache.solr.cloud;+import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.common.cloud.SolrZkClient;diff --git a/solr/core/src/test/org/apache/solr/cloud/rule/ImplicitSnitchTest.java b/solr/core/src/test/org/apache/solr/cloud/rule/ImplicitSnitchTest.javaindex 5ae9710ab39..424b6a583be 100644--- a/solr/core/src/test/org/apache/solr/cloud/rule/ImplicitSnitchTest.java+++ b/solr/core/src/test/org/apache/solr/cloud/rule/ImplicitSnitchTest.java@@ -1,20 +1,3 @@-package org.apache.solr.cloud.rule;--import java.util.HashMap;-import java.util.Map;--import com.google.common.collect.Sets;-import org.junit.Before;-import org.junit.Test;-import org.mockito.Mockito;--import static org.hamcrest.core.Is.is;-import static org.junit.Assert.assertFalse;-import static org.junit.Assert.assertThat;-import static org.junit.Assert.assertTrue;-import static org.mockito.Matchers.anyString;-import static org.mockito.Mockito.when;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -32,6 +15,23 @@ import static org.mockito.Mockito.when;* limitations under the License.*/+package org.apache.solr.cloud.rule;++import java.util.HashMap;+import java.util.Map;++import com.google.common.collect.Sets;+import org.junit.Before;+import org.junit.Test;+import org.mockito.Mockito;++import static org.hamcrest.core.Is.is;+import static org.junit.Assert.assertFalse;+import static org.junit.Assert.assertThat;+import static org.junit.Assert.assertTrue;+import static org.mockito.Matchers.anyString;+import static org.mockito.Mockito.when;+public class ImplicitSnitchTest {private ImplicitSnitch snitch;@@ -184,4 +184,4 @@ public class ImplicitSnitchTest {assertFalse(snitch.isKnownTag("ip_5"));}-}\ No newline at end of file+}diff --git a/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java b/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.javaindex d477c3aa49c..40f57920996 100644--- a/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java+++ b/solr/core/src/test/org/apache/solr/core/BlobRepositoryCloudTest.java@@ -1,5 +1,21 @@-package org.apache.solr.core;+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.core;import java.io.IOException;import java.nio.ByteBuffer;@@ -18,23 +34,6 @@ import org.apache.solr.handler.TestBlobHandler;import org.junit.BeforeClass;import org.junit.Test;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class BlobRepositoryCloudTest extends SolrCloudTestCase {public static final Path TEST_PATH = getFile("solr/configsets").toPath();diff --git a/solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.java b/solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.javaindex 42454d99dca..6da13677ed3 100644--- a/solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.java+++ b/solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.core;import java.io.IOException;@@ -22,24 +39,6 @@ import static org.junit.Assert.assertFalse;import static org.junit.Assert.assertNotNull;import static org.junit.Assert.assertTrue;--/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class BlobRepositoryMockingTest {private static final Charset UTF8 = Charset.forName("UTF-8");diff --git a/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java b/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.javaindex 6bc7d47b560..e2f4304ac82 100644--- a/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java+++ b/solr/core/src/test/org/apache/solr/handler/BackupRestoreUtils.java@@ -1,5 +1,3 @@-package org.apache.solr.handler;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.handler;* limitations under the License.*/+package org.apache.solr.handler;+import java.io.IOException;import java.lang.invoke.MethodHandles;import java.util.ArrayList;diff --git a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java b/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.javaindex 887ebfe79c8..a84042833ab 100644--- a/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java+++ b/solr/core/src/test/org/apache/solr/handler/TestHdfsBackupRestoreCore.java@@ -1,5 +1,3 @@-package org.apache.solr.handler;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.handler;* limitations under the License.*/+package org.apache.solr.handler;+import java.io.IOException;import java.io.InputStream;import java.lang.invoke.MethodHandles;@@ -248,4 +248,4 @@ public class TestHdfsBackupRestoreCore extends SolrCloudTestCase {IOUtils.closeQuietly(stream);}}-}\ No newline at end of file+}diff --git a/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java b/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.javaindex 8223fe511d0..7c4e6639a1b 100644--- a/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java+++ b/solr/core/src/test/org/apache/solr/handler/component/ResourceSharingTestComponent.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.handler.component;import org.apache.solr.common.params.ModifiableSolrParams;@@ -20,23 +37,6 @@ import java.util.stream.Stream;import static org.junit.Assert.assertEquals;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class ResourceSharingTestComponent extends SearchComponent implements SolrCoreAware {private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());diff --git a/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java b/solr/core/src/test/org/apache/solr/request/TestFacetMethods.javaindex 29c0ef2bb77..1da41f52581 100644--- a/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java+++ b/solr/core/src/test/org/apache/solr/request/TestFacetMethods.java@@ -1,5 +1,3 @@-package org.apache.solr.request;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.request;* limitations under the License.*/+package org.apache.solr.request;+import org.apache.solr.schema.BoolField;import org.apache.solr.schema.SchemaField;import org.apache.solr.schema.StrField;diff --git a/solr/core/src/test/org/apache/solr/response/TestGraphMLResponseWriter.java b/solr/core/src/test/org/apache/solr/response/TestGraphMLResponseWriter.javaindex 283f64d3cac..e974b42614e 100644--- a/solr/core/src/test/org/apache/solr/response/TestGraphMLResponseWriter.java+++ b/solr/core/src/test/org/apache/solr/response/TestGraphMLResponseWriter.java@@ -1,5 +1,3 @@-package org.apache.solr.response;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.response;* limitations under the License.*/+package org.apache.solr.response;+import java.io.StringWriter;import java.util.Map;import java.util.HashMap;diff --git a/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java b/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.javaindex 8f13204d4b8..d851d7147d4 100644--- a/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java+++ b/solr/core/src/test/org/apache/solr/schema/BooleanFieldTest.java@@ -1,5 +1,3 @@-package org.apache.solr.schema;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.schema;* limitations under the License.*/+package org.apache.solr.schema;+import org.apache.solr.SolrTestCaseJ4;import org.junit.BeforeClass;import org.junit.Test;diff --git a/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaAPI.java b/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaAPI.javaindex 3bd4dea938b..e426e3b20e5 100644--- a/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaAPI.java+++ b/solr/core/src/test/org/apache/solr/schema/TestManagedSchemaAPI.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.schema;import java.io.IOException;@@ -19,23 +36,6 @@ import org.junit.Test;import org.slf4j.Logger;import org.slf4j.LoggerFactory;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-public class TestManagedSchemaAPI extends SolrCloudTestCase {private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());diff --git a/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java b/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.javaindex a4d0211a300..05ec9822577 100644--- a/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java+++ b/solr/core/src/test/org/apache/solr/search/TestGraphTermsQParserPlugin.java@@ -1,5 +1,3 @@-package org.apache.solr.search;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.search;* limitations under the License.*/+package org.apache.solr.search;+import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;import org.apache.solr.SolrTestCaseJ4;import org.apache.solr.common.params.ModifiableSolrParams;diff --git a/solr/core/src/test/org/apache/solr/update/processor/ClassificationUpdateProcessorFactoryTest.java b/solr/core/src/test/org/apache/solr/update/processor/ClassificationUpdateProcessorFactoryTest.javaindex 27d8dca71ee..05d112f76de 100644--- a/solr/core/src/test/org/apache/solr/update/processor/ClassificationUpdateProcessorFactoryTest.java+++ b/solr/core/src/test/org/apache/solr/update/processor/ClassificationUpdateProcessorFactoryTest.java@@ -1,5 +1,3 @@-package org.apache.solr.update.processor;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.update.processor;* limitations under the License.*/+package org.apache.solr.update.processor;+import java.io.IOException;import java.util.ArrayList;import java.util.HashMap;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.javaindex 6d7b32af9a0..768ce07ebb5 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/ShortestPathStream.java@@ -1,5 +1,3 @@-package org.apache.solr.client.solrj.io.graph;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.client.solrj.io.graph;* limitations under the License.*/+package org.apache.solr.client.solrj.io.graph;+import java.io.IOException;import java.util.HashMap;import java.util.HashSet;@@ -539,4 +539,4 @@ public class ShortestPathStream extends TupleStream implements Expressible {public StreamComparator getStreamSort() {return null;}-}\ No newline at end of file+}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.javaindex 6c8247f746f..6a0cfc7abfd 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java@@ -1,5 +1,3 @@-package org.apache.solr.client.solrj.io.stream;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.client.solrj.io.stream;* limitations under the License.*/+package org.apache.solr.client.solrj.io.stream;+import java.io.IOException;import java.util.ArrayList;import java.util.Iterator;@@ -253,4 +253,4 @@ public class ScoreNodesStream extends TupleStream implements Expressiblereturn 0;}-}\ No newline at end of file+}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.javaindex 8d3279ab55c..30c6f594ae1 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java@@ -1,5 +1,3 @@-package org.apache.solr.client.solrj.io.stream;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.client.solrj.io.stream;* limitations under the License.*/+package org.apache.solr.client.solrj.io.stream;+import java.io.IOException;import java.lang.invoke.MethodHandles;import java.util.ArrayList;diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterProperties.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterProperties.javaindex 6645336f13b..e6df8459e35 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterProperties.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterProperties.java@@ -1,5 +1,3 @@-package org.apache.solr.common.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.common.cloud;* limitations under the License.*/+package org.apache.solr.common.cloud;+import java.io.IOException;import java.util.Collections;import java.util.LinkedHashMap;diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.javaindex 0b0a28eeed0..37b00d7c28e 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStatePredicate.java@@ -1,5 +1,3 @@-package org.apache.solr.common.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.common.cloud;* limitations under the License.*/+package org.apache.solr.common.cloud;+import java.util.Set;import java.util.concurrent.TimeUnit;diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.javaindex 0bcbe0476fb..cd42ad6abd0 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java@@ -1,5 +1,3 @@-package org.apache.solr.common.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -15,7 +13,9 @@ package org.apache.solr.common.cloud;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.-*/+ */++package org.apache.solr.common.cloud;import java.util.Set;diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.javaindex d508aaac28d..b7aa3d27589 100644--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java@@ -1,3 +1,20 @@+/*+ * Licensed to the Apache Software Foundation (ASF) under one or more+ * contributor license agreements. See the NOTICE file distributed with+ * this work for additional information regarding copyright ownership.+ * The ASF licenses this file to You under the Apache License, Version 2.0+ * (the "License"); you may not use this file except in compliance with+ * the License. You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package org.apache.solr.common.cloud;import java.io.IOException;@@ -17,23 +34,6 @@ import org.apache.zookeeper.KeeperException;import org.slf4j.Logger;import org.slf4j.LoggerFactory;-/*- * Licensed to the Apache Software Foundation (ASF) under one or more- * contributor license agreements. See the NOTICE file distributed with- * this work for additional information regarding copyright ownership.- * The ASF licenses this file to You under the Apache License, Version 2.0- * (the "License"); you may not use this file except in compliance with- * the License. You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */-/*** Class to hold ZK upload/download/move common code. With the advent of the upconfig/downconfig/cp/ls/mv commands* in bin/solr it made sense to keep the individual transfer methods in a central place, so here it is.diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.javaindex 5f1c5c20118..4c385546ea0 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java@@ -1,12 +1,3 @@-package org.apache.solr.client.solrj.impl;--import java.io.IOException;-import java.util.ArrayList;--import org.apache.lucene.util.LuceneTestCase;-import org.apache.solr.client.solrj.impl.CloudSolrClient.Builder;-import org.junit.Test;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -24,6 +15,15 @@ import org.junit.Test;* limitations under the License.*/+package org.apache.solr.client.solrj.impl;++import java.io.IOException;+import java.util.ArrayList;++import org.apache.lucene.util.LuceneTestCase;+import org.apache.solr.client.solrj.impl.CloudSolrClient.Builder;+import org.junit.Test;+public class CloudSolrClientBuilderTest extends LuceneTestCase {private static final String ANY_CHROOT = "/ANY_CHROOT";private static final String ANY_ZK_HOST = "ANY_ZK_HOST";diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.javaindex 3389b7fcb3b..5f986b73b50 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java@@ -1,9 +1,3 @@-package org.apache.solr.client.solrj.impl;--import org.apache.lucene.util.LuceneTestCase;-import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.Builder;-import org.junit.Test;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -21,6 +15,12 @@ import org.junit.Test;* limitations under the License.*/+package org.apache.solr.client.solrj.impl;++import org.apache.lucene.util.LuceneTestCase;+import org.apache.solr.client.solrj.impl.ConcurrentUpdateSolrClient.Builder;+import org.junit.Test;+/*** Unit tests for {@link Builder}.*/diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.javaindex da56576034f..a42e82083da 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java@@ -1,14 +1,3 @@-package org.apache.solr.client.solrj.impl;--import java.io.IOException;--import org.apache.http.client.HttpClient;-import org.apache.http.impl.client.HttpClientBuilder;-import org.apache.lucene.util.LuceneTestCase;-import org.apache.solr.client.solrj.ResponseParser;-import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;-import org.junit.Test;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -26,6 +15,17 @@ import org.junit.Test;* limitations under the License.*/+package org.apache.solr.client.solrj.impl;++import java.io.IOException;++import org.apache.http.client.HttpClient;+import org.apache.http.impl.client.HttpClientBuilder;+import org.apache.lucene.util.LuceneTestCase;+import org.apache.solr.client.solrj.ResponseParser;+import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;+import org.junit.Test;+/*** Unit tests for {@link Builder}.*/diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.javaindex 6a02da5afbc..83870d0a723 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientBuilderTest.java@@ -1,12 +1,3 @@-package org.apache.solr.client.solrj.impl;--import org.apache.http.client.HttpClient;-import org.apache.http.impl.client.HttpClientBuilder;-import org.apache.lucene.util.LuceneTestCase;-import org.apache.solr.client.solrj.impl.LBHttpSolrClient.Builder;-import org.apache.solr.client.solrj.ResponseParser;-import org.junit.Test;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -24,6 +15,15 @@ import org.junit.Test;* limitations under the License.*/+package org.apache.solr.client.solrj.impl;++import org.apache.http.client.HttpClient;+import org.apache.http.impl.client.HttpClientBuilder;+import org.apache.lucene.util.LuceneTestCase;+import org.apache.solr.client.solrj.impl.LBHttpSolrClient.Builder;+import org.apache.solr.client.solrj.ResponseParser;+import org.junit.Test;+/*** Unit tests for {@link Builder}.*/diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.javaindex a141b7341ab..dcd5ff40fbd 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java@@ -1,5 +1,3 @@-package org.apache.solr.client.solrj.io.graph;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.client.solrj.io.graph;* limitations under the License.*/+package org.apache.solr.client.solrj.io.graph;+import java.io.IOException;import java.io.InputStreamReader;import java.io.InputStream;@@ -897,4 +897,4 @@ public class GraphExpressionTest extends SolrCloudTestCase {return true;}-}\ No newline at end of file+}diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphTest.javaindex b098be000e1..dea758b91bd 100644--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphTest.java+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphTest.java@@ -1,5 +1,3 @@-package org.apache.solr.client.solrj.io.graph;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.client.solrj.io.graph;* limitations under the License.*/+package org.apache.solr.client.solrj.io.graph;+import java.io.IOException;import java.util.ArrayList;import java.util.HashSet;diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java b/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.javaindex 2b2e181b68a..d959aa83c9b 100644--- a/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java+++ b/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java@@ -1,5 +1,3 @@-package org.apache.solr.common.cloud;-/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with@@ -17,6 +15,8 @@ package org.apache.solr.common.cloud;* limitations under the License.*/+package org.apache.solr.common.cloud;+import java.lang.invoke.MethodHandles;import java.util.HashMap;import java.util.Set;