Apache Solr open-source search software
fix lint problems at private level (not enforced, jflex has some issues with generated code)
Robert Muirf63eec34dccf
diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/TaskStats.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/TaskStats.javaindex eb83441a7c1..05ae92b050c 100644--- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/TaskStats.java+++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/stats/TaskStats.java@@ -35,7 +35,7 @@ public class TaskStats implements Cloneable {/** task start time */private long start;- /** task elapsed time. elapsed >= 0 indicates run completion! */+ /** task elapsed time. elapsed >= 0 indicates run completion! */private long elapsed = -1;/** max tot mem during task */diff --git a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.javaindex 60822dcdd98..03cc88f332f 100644--- a/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java+++ b/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/directory/DirectoryTaxonomyWriter.java@@ -529,9 +529,9 @@ public class DirectoryTaxonomyWriter implements TaxonomyWriter {* Note that when TermPositions.nextPosition() is later used to* retrieve this value, val-1 will be returned, not val.* <P>- * IMPORTANT NOTE: Before Lucene 2.9, val>=0 were safe (for val==0,+ * IMPORTANT NOTE: Before Lucene 2.9, val>=0 were safe (for val==0,* the retrieved position would be -1). But starting with Lucene 2.9,- * this unfortunately changed, and only val>0 are safe. val=0 can+ * this unfortunately changed, and only val>0 are safe. val=0 can* still be used, but don't count on the value you retrieve later* (it could be 0 or -1, depending on circumstances or versions).* This change is described in Lucene's JIRA: LUCENE-1542.diff --git a/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java b/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.javaindex 2958ade716f..048430402f0 100644--- a/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java+++ b/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java@@ -189,7 +189,7 @@ import org.apache.lucene.util.RecyclingIntBlockAllocator;*/public class MemoryIndex {- /** info for each field: Map<String fieldName, Info field> */+ /** info for each field: Map<String fieldName, Info field> */private final HashMap<String,Info> fields = new HashMap<>();/** fields sorted ascending by fieldName; lazily computed on demand */@@ -689,8 +689,8 @@ public class MemoryIndex {private static final class Info {/**- * Term strings and their positions for this field: Map <String- * termText, ArrayIntList positions>+ * Term strings and their positions for this field: Map <String+ * termText, ArrayIntList positions>*/private final BytesRefHash terms;diff --git a/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java b/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.javaindex dae7a62aecd..4f07b229dfe 100644--- a/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java+++ b/lucene/queries/src/java/org/apache/lucene/queries/mlt/MoreLikeThis.java@@ -1,3 +1,5 @@+package org.apache.lucene.queries.mlt;+/*** Copyright 2004-2005 The Apache Software Foundation.*@@ -13,7 +15,6 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package org.apache.lucene.queries.mlt;import org.apache.lucene.analysis.Analyzer;import org.apache.lucene.analysis.TokenStream;@@ -45,7 +46,6 @@ import java.util.HashMap;import java.util.Map;import java.util.Set;-/*** Generate "more like this" similarity queries.* Based on this mail:@@ -644,7 +644,7 @@ public final class MoreLikeThis {}/**- * Create a PriorityQueue from a word->tf map.+ * Create a PriorityQueue from a word->tf map.** @param words a map of words keyed on the word(String) with Int objects as the values.*/diff --git a/lucene/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowFuzzyTermsEnum.java b/lucene/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowFuzzyTermsEnum.javaindex 5ba963d0919..5336f9fc5b7 100644--- a/lucene/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowFuzzyTermsEnum.java+++ b/lucene/sandbox/src/java/org/apache/lucene/sandbox/queries/SlowFuzzyTermsEnum.java@@ -110,7 +110,7 @@ public final class SlowFuzzyTermsEnum extends FuzzyTermsEnum {* <p>The termCompare method in FuzzyTermEnum uses Levenshtein distance to* calculate the distance between the given term and the comparing term.* </p>- * <p>If the minSimilarity is >= 1.0, this uses the maxEdits as the comparison.+ * <p>If the minSimilarity is >= 1.0, this uses the maxEdits as the comparison.* Otherwise, this method uses the following logic to calculate similarity.* <pre>* similarity = 1 - ((float)distance / (float) (prefixLength + Math.min(textlen, targetlen)));diff --git a/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java b/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.javaindex e3025544b7b..cd5b8dc8bc7 100644--- a/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java+++ b/lucene/spatial/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java@@ -407,7 +407,7 @@ public class RandomSpatialOpFuzzyPrefixTreeTest extends StrategyTestCase {/*** An aggregate of 2 shapes. Unfortunately we can't simply use a ShapeCollection because:- * (a) ambiguity between CONTAINS & WITHIN for equal shapes, and+ * (a) ambiguity between CONTAINS and WITHIN for equal shapes, and* (b) adjacent pairs could as a whole contain the input shape.* The tests here are sensitive to these matters, although in practice ShapeCollection* is fine.diff --git a/lucene/suggest/src/java/org/apache/lucene/search/spell/DirectSpellChecker.java b/lucene/suggest/src/java/org/apache/lucene/search/spell/DirectSpellChecker.javaindex 631ff49c6b0..6583f2adaa9 100644--- a/lucene/suggest/src/java/org/apache/lucene/search/spell/DirectSpellChecker.java+++ b/lucene/suggest/src/java/org/apache/lucene/search/spell/DirectSpellChecker.java@@ -73,12 +73,12 @@ public class DirectSpellChecker {private int maxInspections = 5;/** minimum accuracy for a term to match */private float accuracy = SpellChecker.DEFAULT_ACCURACY;- /** value in [0..1] (or absolute number >=1) representing the minimum+ /** value in [0..1] (or absolute number >= 1) representing the minimum* number of documents (of the total) where a term should appear. */private float thresholdFrequency = 0f;/** minimum length of a query word to return suggestions */private int minQueryLength = 4;- /** value in [0..1] (or absolute number >=1) representing the maximum+ /** value in [0..1] (or absolute number >= 1) representing the maximum* number of documents (of the total) a query term can appear in to* be corrected. */private float maxQueryFrequency = 0.01f;diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingSuggester.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingSuggester.javaindex a6f15874827..374278327b1 100644--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingSuggester.java+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/AnalyzingSuggester.java@@ -119,7 +119,7 @@ import static org.apache.lucene.util.automaton.Operations.DEFAULT_MAX_DETERMINIZpublic class AnalyzingSuggester extends Lookup {/**- * FST<Weight,Surface>:+ * FST<Weight,Surface>:* input is the analyzed form, with a null byte between terms* weights are encoded as costs: (Integer.MAX_VALUE-weight)* surface is the original, unanalyzed form.@@ -912,12 +912,12 @@ public class AnalyzingSuggester extends Lookup {throw new UnsupportedOperationException();}- /** cost -> weight */+ /** cost -> weight */private static int decodeWeight(long encoded) {return (int)(Integer.MAX_VALUE - encoded);}- /** weight -> cost */+ /** weight -> cost */private static int encodeWeight(long value) {if (value < 0 || value > Integer.MAX_VALUE) {throw new UnsupportedOperationException("cannot encode value: " + value);diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.javaindex c1f4235607b..075891781f8 100644--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/analyzing/FreeTextSuggester.java@@ -734,12 +734,12 @@ public class FreeTextSuggester extends Lookup {}}- /** weight -> cost */+ /** weight -> cost */private long encodeWeight(long ngramCount) {return Long.MAX_VALUE - ngramCount;}- /** cost -> weight */+ /** cost -> weight *///private long decodeWeight(Pair<Long,BytesRef> output) {private long decodeWeight(Long output) {assert output != null;diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.javaindex a3ddc078e31..81765ee6053 100644--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTCompletionLookup.java@@ -243,7 +243,7 @@ public class FSTCompletionLookup extends Lookup implements Accountable {}}- /** weight -> cost */+ /** weight -> cost */private static int encodeWeight(long value) {if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) {throw new UnsupportedOperationException("cannot encode value: " + value);diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/WFSTCompletionLookup.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/WFSTCompletionLookup.javaindex d6b1c85bd30..82cf4c7f7d2 100644--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/WFSTCompletionLookup.java+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/fst/WFSTCompletionLookup.java@@ -247,12 +247,12 @@ public class WFSTCompletionLookup extends Lookup {}}- /** cost -> weight */+ /** cost -> weight */private static int decodeWeight(long encoded) {return (int)(Integer.MAX_VALUE - encoded);}- /** weight -> cost */+ /** weight -> cost */private static int encodeWeight(long value) {if (value < 0 || value > Integer.MAX_VALUE) {throw new UnsupportedOperationException("cannot encode value: " + value);diff --git a/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentDictionaryTest.java b/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentDictionaryTest.javaindex 71f65e1cd04..2ebf11560db 100644--- a/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentDictionaryTest.java+++ b/lucene/suggest/src/test/org/apache/lucene/search/suggest/DocumentDictionaryTest.java@@ -53,7 +53,7 @@ public class DocumentDictionaryTest extends LuceneTestCase {static final String PAYLOAD_FIELD_NAME = "p1";static final String CONTEXT_FIELD_NAME = "c1";- /** Returns Pair(list of invalid document terms, Map of document term -> document) */+ /** Returns Pair(list of invalid document terms, Map of document term -> document) */private Map.Entry<List<String>, Map<String, Document>> generateIndexDocuments(int ndocs, boolean requiresPayload, boolean requiresContexts) {Map<String, Document> docs = new HashMap<>();List<String> invalidDocTerms = new ArrayList<>();