Apache Lucene open-source search software
LUCENE-2185: add @Deprecated annotations
Robert Muird22b7a98cdc0
diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.javaindex aad6aa3a004..7b17e6fad1b 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ar/ArabicAnalyzer.java@@ -65,6 +65,7 @@ public final class ArabicAnalyzer extends StopwordAnalyzerBase {* @deprecated use {@link WordlistLoader#getWordSet(File, String)} directly*/// TODO make this private+ @Deprecatedpublic static final String STOPWORDS_COMMENT = "#";/**@@ -116,6 +117,7 @@ public final class ArabicAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #ArabicAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic ArabicAnalyzer( Version matchVersion, String... stopwords ) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords ));}@@ -124,6 +126,7 @@ public final class ArabicAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #ArabicAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic ArabicAnalyzer( Version matchVersion, Hashtable<?,?> stopwords ) {this(matchVersion, stopwords.keySet());}@@ -132,6 +135,7 @@ public final class ArabicAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words. Lines can be commented out using {@link #STOPWORDS_COMMENT}* @deprecated use {@link #ArabicAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic ArabicAnalyzer( Version matchVersion, File stopwords ) throws IOException {this(matchVersion, WordlistLoader.getWordSet( stopwords, STOPWORDS_COMMENT));}diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.javaindex 7abacf169e4..2c2aba65b7c 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/bg/BulgarianAnalyzer.java@@ -59,6 +59,7 @@ public final class BulgarianAnalyzer extends StopwordAnalyzerBase {* @deprecated use {@link WordlistLoader#getWordSet(File, String)} directly*///TODO make this private+ @Deprecatedpublic static final String STOPWORDS_COMMENT = "#";/**diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.javaindex 3230ec293e0..351c6b9c9bb 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/BrazilianAnalyzer.java@@ -58,6 +58,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* @deprecated use {@link #getDefaultStopSet()} instead*/// TODO make this private in 3.1+ @Deprecatedpublic final static String[] BRAZILIAN_STOP_WORDS = {"a","ainda","alem","ambas","ambos","antes","ao","aonde","aos","apos","aquele","aqueles",@@ -138,6 +139,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #BrazilianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic BrazilianAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));}@@ -146,6 +148,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #BrazilianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic BrazilianAnalyzer(Version matchVersion, Map<?,?> stopwords) {this(matchVersion, stopwords.keySet());}@@ -154,6 +157,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #BrazilianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic BrazilianAnalyzer(Version matchVersion, File stopwords)throws IOException {this(matchVersion, WordlistLoader.getWordSet(stopwords));@@ -163,6 +167,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from an array of Strings.* @deprecated use {@link #BrazilianAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable( String... exclusionlist ) {excltable = StopFilter.makeStopSet( matchVersion, exclusionlist );setPreviousTokenStream(null); // force a new stemmer to be created@@ -171,6 +176,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from a {@link Map}.* @deprecated use {@link #BrazilianAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable( Map<?,?> exclusionlist ) {excltable = new HashSet<Object>(exclusionlist.keySet());setPreviousTokenStream(null); // force a new stemmer to be created@@ -179,6 +185,7 @@ public final class BrazilianAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from the words contained in the given file.* @deprecated use {@link #BrazilianAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable( File exclusionlist ) throws IOException {excltable = WordlistLoader.getWordSet( exclusionlist );setPreviousTokenStream(null); // force a new stemmer to be createddiff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.javaindex dc2df4c2d38..896691a9678 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cjk/CJKAnalyzer.java@@ -45,6 +45,7 @@ public final class CJKAnalyzer extends StopwordAnalyzerBase {*/// TODO make this final in 3.1 -// this might be revised and merged with StopFilter stop words too+ @Deprecatedpublic final static String[] STOP_WORDS = {"a", "and", "are", "as", "at", "be","but", "by", "for", "if", "in",@@ -99,6 +100,7 @@ public final class CJKAnalyzer extends StopwordAnalyzerBase {* @param stopWords stop word array* @deprecated use {@link #CJKAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic CJKAnalyzer(Version matchVersion, String... stopWords) {super(matchVersion, StopFilter.makeStopSet(matchVersion, stopWords));}diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.javaindex 781342cee7d..496763805f9 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/CompoundWordTokenFilterBase.java@@ -80,6 +80,7 @@ public abstract class CompoundWordTokenFilterBase extends TokenFilter {/*** @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean)} instead*/+ @Deprecatedprotected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {this(Version.LUCENE_30, input, makeDictionary(dictionary),minWordSize,minSubwordSize,maxSubwordSize, onlyLongestMatch);}@@ -87,6 +88,7 @@ public abstract class CompoundWordTokenFilterBase extends TokenFilter {/*** @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean)} instead*/+ @Deprecatedprotected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, boolean onlyLongestMatch) {this(Version.LUCENE_30, input, makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);}@@ -94,6 +96,7 @@ public abstract class CompoundWordTokenFilterBase extends TokenFilter {/*** @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean)} instead*/+ @Deprecatedprotected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, boolean onlyLongestMatch) {this(Version.LUCENE_30, input, dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, onlyLongestMatch);}@@ -101,6 +104,7 @@ public abstract class CompoundWordTokenFilterBase extends TokenFilter {/*** @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, String[])} instead*/+ @Deprecatedprotected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary) {this(Version.LUCENE_30, input, makeDictionary(dictionary),DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);}@@ -108,6 +112,7 @@ public abstract class CompoundWordTokenFilterBase extends TokenFilter {/*** @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, Set)} instead*/+ @Deprecatedprotected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary) {this(Version.LUCENE_30, input, dictionary,DEFAULT_MIN_WORD_SIZE,DEFAULT_MIN_SUBWORD_SIZE,DEFAULT_MAX_SUBWORD_SIZE, false);}@@ -115,6 +120,7 @@ public abstract class CompoundWordTokenFilterBase extends TokenFilter {/*** @deprecated use {@link #CompoundWordTokenFilterBase(Version, TokenStream, Set, int, int, int, boolean)} instead*/+ @Deprecatedprotected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {this(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);}diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.javaindex dd248088252..988b9550da6 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/DictionaryCompoundWordTokenFilter.java@@ -46,6 +46,7 @@ public class DictionaryCompoundWordTokenFilter extends CompoundWordTokenFilterBa* @param onlyLongestMatch Add only the longest matching subword to the stream* @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean)} instead*/+ @Deprecatedpublic DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary,int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {super(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);@@ -58,6 +59,7 @@ public class DictionaryCompoundWordTokenFilter extends CompoundWordTokenFilterBa* @param dictionary the word dictionary to match against* @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, String[])} instead*/+ @Deprecatedpublic DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary) {super(Version.LUCENE_30, input, dictionary);}@@ -70,6 +72,7 @@ public class DictionaryCompoundWordTokenFilter extends CompoundWordTokenFilterBa* lower case strings.* @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, Set)} instead*/+ @Deprecatedpublic DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary) {super(Version.LUCENE_30, input, dictionary);}@@ -86,6 +89,7 @@ public class DictionaryCompoundWordTokenFilter extends CompoundWordTokenFilterBa* @param onlyLongestMatch Add only the longest matching subword to the stream* @deprecated use {@link #DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean)} instead*/+ @Deprecatedpublic DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary,int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {super(Version.LUCENE_30, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.javaindex 2074246b00f..e9afe2c4870 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/compound/HyphenationCompoundWordTokenFilter.java@@ -167,6 +167,7 @@ public class HyphenationCompoundWordTokenFilter extends* @param onlyLongestMatch Add only the longest matching subword to the stream* @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean)} instead.*/+ @Deprecatedpublic HyphenationCompoundWordTokenFilter(TokenStream input,HyphenationTree hyphenator, String[] dictionary, int minWordSize,int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {@@ -182,6 +183,7 @@ public class HyphenationCompoundWordTokenFilter extends* @param dictionary the word dictionary to match against* @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[])} instead.*/+ @Deprecatedpublic HyphenationCompoundWordTokenFilter(TokenStream input,HyphenationTree hyphenator, String[] dictionary) {this(Version.LUCENE_30, input, hyphenator, makeDictionary(dictionary), DEFAULT_MIN_WORD_SIZE,@@ -197,6 +199,7 @@ public class HyphenationCompoundWordTokenFilter extends* lower case strings.* @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set)} instead.*/+ @Deprecatedpublic HyphenationCompoundWordTokenFilter(TokenStream input,HyphenationTree hyphenator, Set dictionary) {this(Version.LUCENE_30, input, hyphenator, dictionary, DEFAULT_MIN_WORD_SIZE,@@ -218,6 +221,7 @@ public class HyphenationCompoundWordTokenFilter extends* @param onlyLongestMatch Add only the longest matching subword to the stream* @deprecated use {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean)} instead.*/+ @Deprecatedpublic HyphenationCompoundWordTokenFilter(TokenStream input,HyphenationTree hyphenator, Set dictionary, int minWordSize,int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch) {diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.javaindex 804791607c6..ffce33463e3 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/CzechAnalyzer.java@@ -62,6 +62,7 @@ public final class CzechAnalyzer extends ReusableAnalyzerBase {* @deprecated use {@link #getDefaultStopSet()} instead*/// TODO make this private in 3.1+ @Deprecatedpublic final static String[] CZECH_STOP_WORDS = {"a","s","k","o","i","u","v","z","dnes","cz","t\u00edmto","bude\u0161","budem","byli","jse\u0161","m\u016fj","sv\u00fdm","ta","tomto","tohle","tuto","tyto",@@ -136,6 +137,7 @@ public final class CzechAnalyzer extends ReusableAnalyzerBase {* @param stopwords a stopword set* @deprecated use {@link #CzechAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic CzechAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet( matchVersion, stopwords ));}@@ -148,6 +150,7 @@ public final class CzechAnalyzer extends ReusableAnalyzerBase {* @param stopwords a stopword set* @deprecated use {@link #CzechAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic CzechAnalyzer(Version matchVersion, HashSet<?> stopwords) {this(matchVersion, (Set<?>)stopwords);}@@ -160,6 +163,7 @@ public final class CzechAnalyzer extends ReusableAnalyzerBase {* @param stopwords a file containing stopwords* @deprecated use {@link #CzechAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic CzechAnalyzer(Version matchVersion, File stopwords ) throws IOException {this(matchVersion, (Set<?>)WordlistLoader.getWordSet( stopwords ));}@@ -172,6 +176,7 @@ public final class CzechAnalyzer extends ReusableAnalyzerBase {* and {@link #CzechAnalyzer(Version, Set)} instead*/// TODO extend StopwordAnalyzerBase once this method is gone!+ @Deprecatedpublic void loadStopWords( InputStream wordfile, String encoding ) {setPreviousTokenStream(null); // force a new stopfilter to be createdif ( wordfile == null ) {diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.javaindex 603a41347cb..51b03121d23 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/de/GermanAnalyzer.java@@ -60,6 +60,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* @deprecated use {@link #getDefaultStopSet()} instead*///TODO make this private in 3.1+ @Deprecatedpublic final static String[] GERMAN_STOP_WORDS = {"einer", "eine", "eines", "einem", "einen","der", "die", "das", "dass", "daß",@@ -137,6 +138,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #GermanAnalyzer(Version, Set)}*/+ @Deprecatedpublic GermanAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));}@@ -145,6 +147,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #GermanAnalyzer(Version, Set)}*/+ @Deprecatedpublic GermanAnalyzer(Version matchVersion, Map<?,?> stopwords) {this(matchVersion, stopwords.keySet());@@ -154,6 +157,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #GermanAnalyzer(Version, Set)}*/+ @Deprecatedpublic GermanAnalyzer(Version matchVersion, File stopwords) throws IOException {this(matchVersion, WordlistLoader.getWordSet(stopwords));}@@ -162,6 +166,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from an array of Strings.* @deprecated use {@link #GermanAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(String[] exclusionlist) {exclusionSet = StopFilter.makeStopSet(matchVersion, exclusionlist);setPreviousTokenStream(null); // force a new stemmer to be created@@ -171,6 +176,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from a {@link Map}* @deprecated use {@link #GermanAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(Map<?,?> exclusionlist) {exclusionSet = new HashSet<Object>(exclusionlist.keySet());setPreviousTokenStream(null); // force a new stemmer to be created@@ -180,6 +186,7 @@ public final class GermanAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from the words contained in the given file.* @deprecated use {@link #GermanAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(File exclusionlist) throws IOException {exclusionSet = WordlistLoader.getWordSet(exclusionlist);setPreviousTokenStream(null); // force a new stemmer to be createddiff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.javaindex 808cc207f85..d2e93797ec5 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/el/GreekAnalyzer.java@@ -95,6 +95,7 @@ public final class GreekAnalyzer extends StopwordAnalyzerBase* @param stopwords Array of stopwords to use.* @deprecated use {@link #GreekAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic GreekAnalyzer(Version matchVersion, String... stopwords){this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));@@ -104,6 +105,7 @@ public final class GreekAnalyzer extends StopwordAnalyzerBase* Builds an analyzer with the given stop words.* @deprecated use {@link #GreekAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic GreekAnalyzer(Version matchVersion, Map<?,?> stopwords){this(matchVersion, stopwords.keySet());diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.javaindex 6df9c0b5765..5aa7f310c6a 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fa/PersianAnalyzer.java@@ -111,6 +111,7 @@ public final class PersianAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #PersianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic PersianAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));}@@ -119,6 +120,7 @@ public final class PersianAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #PersianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic PersianAnalyzer(Version matchVersion, Hashtable<?, ?> stopwords) {this(matchVersion, stopwords.keySet());}@@ -128,6 +130,7 @@ public final class PersianAnalyzer extends StopwordAnalyzerBase {* using {@link #STOPWORDS_COMMENT}* @deprecated use {@link #PersianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic PersianAnalyzer(Version matchVersion, File stopwords) throws IOException {this(matchVersion, WordlistLoader.getWordSet(stopwords, STOPWORDS_COMMENT));}diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/ElisionFilter.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/ElisionFilter.javaindex d3a4fadb8b1..eb5181b9100 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/ElisionFilter.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/ElisionFilter.java@@ -50,6 +50,7 @@ public final class ElisionFilter extends TokenFilter {* @param articles a set of articles* @deprecated use {@link #ElisionFilter(Version, TokenStream, Set)} instead*/+ @Deprecatedpublic void setArticles(Version matchVersion, Set<?> articles) {this.articles = CharArraySet.unmodifiableSet(CharArraySet.copy(matchVersion, articles));@@ -60,6 +61,7 @@ public final class ElisionFilter extends TokenFilter {* @param articles a set of articles* @deprecated use {@link #setArticles(Version, Set)} instead*/+ @Deprecatedpublic void setArticles(Set<?> articles) {setArticles(Version.LUCENE_CURRENT, articles);}@@ -74,6 +76,7 @@ public final class ElisionFilter extends TokenFilter {* Constructs an elision filter with standard stop words* @deprecated use {@link #ElisionFilter(Version, TokenStream)} instead*/+ @Deprecatedprotected ElisionFilter(TokenStream input) {this(Version.LUCENE_30, input);}@@ -82,6 +85,7 @@ public final class ElisionFilter extends TokenFilter {* Constructs an elision filter with a Set of stop words* @deprecated use {@link #ElisionFilter(Version, TokenStream, Set)} instead*/+ @Deprecatedpublic ElisionFilter(TokenStream input, Set<?> articles) {this(Version.LUCENE_30, input, articles);}@@ -103,6 +107,7 @@ public final class ElisionFilter extends TokenFilter {* Constructs an elision filter with an array of stop words* @deprecated use {@link #ElisionFilter(Version, TokenStream, Set)} instead*/+ @Deprecatedpublic ElisionFilter(TokenStream input, String[] articles) {this(Version.LUCENE_CURRENT, input,new CharArraySet(Version.LUCENE_CURRENT,diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.javaindex cf029412335..52d5f8a478b 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/fr/FrenchAnalyzer.java@@ -68,6 +68,7 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase {* @deprecated use {@link #getDefaultStopSet()} instead*/// TODO make this private in 3.1+ @Deprecatedpublic final static String[] FRENCH_STOP_WORDS = {"a", "afin", "ai", "ainsi", "après", "attendu", "au", "aujourd", "auquel", "aussi","autre", "autres", "aux", "auxquelles", "auxquels", "avait", "avant", "avec", "avoir",@@ -154,6 +155,7 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase {* Builds an analyzer with the given stop words.* @deprecated use {@link #FrenchAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic FrenchAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));}@@ -163,6 +165,7 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase {* @throws IOException* @deprecated use {@link #FrenchAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic FrenchAnalyzer(Version matchVersion, File stopwords) throws IOException {this(matchVersion, WordlistLoader.getWordSet(stopwords));}@@ -171,6 +174,7 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from an array of Strings.* @deprecated use {@link #FrenchAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(String... exclusionlist) {excltable = StopFilter.makeStopSet(matchVersion, exclusionlist);setPreviousTokenStream(null); // force a new stemmer to be created@@ -180,6 +184,7 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase {* Builds an exclusionlist from a Map.* @deprecated use {@link #FrenchAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(Map<?,?> exclusionlist) {excltable = new HashSet<Object>(exclusionlist.keySet());setPreviousTokenStream(null); // force a new stemmer to be created@@ -190,6 +195,7 @@ public final class FrenchAnalyzer extends StopwordAnalyzerBase {* @throws IOException* @deprecated use {@link #FrenchAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(File exclusionlist) throws IOException {excltable = new HashSet<Object>(WordlistLoader.getWordSet(exclusionlist));setPreviousTokenStream(null); // force a new stemmer to be createddiff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.javaindex b7e9622890a..1e66060def2 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/nl/DutchAnalyzer.java@@ -57,6 +57,7 @@ public final class DutchAnalyzer extends Analyzer {* List of typical Dutch stopwords.* @deprecated use {@link #getDefaultStopSet()} instead*/+ @Deprecatedpublic final static String[] DUTCH_STOP_WORDS ={"de", "en", "van", "ik", "te", "dat", "die", "in", "een",@@ -128,6 +129,7 @@ public final class DutchAnalyzer extends Analyzer {* @param stopwords* @deprecated use {@link #DutchAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic DutchAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));}@@ -138,6 +140,7 @@ public final class DutchAnalyzer extends Analyzer {* @param stopwords* @deprecated use {@link #DutchAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic DutchAnalyzer(Version matchVersion, HashSet<?> stopwords) {this(matchVersion, (Set<?>)stopwords);}@@ -148,6 +151,7 @@ public final class DutchAnalyzer extends Analyzer {* @param stopwords* @deprecated use {@link #DutchAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic DutchAnalyzer(Version matchVersion, File stopwords) {// this is completely broken!try {@@ -165,6 +169,7 @@ public final class DutchAnalyzer extends Analyzer {* @param exclusionlist* @deprecated use {@link #DutchAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(String... exclusionlist) {excltable = StopFilter.makeStopSet(matchVersion, exclusionlist);setPreviousTokenStream(null); // force a new stemmer to be created@@ -174,6 +179,7 @@ public final class DutchAnalyzer extends Analyzer {* Builds an exclusionlist from a Hashtable.* @deprecated use {@link #DutchAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(HashSet<?> exclusionlist) {excltable = exclusionlist;setPreviousTokenStream(null); // force a new stemmer to be created@@ -183,6 +189,7 @@ public final class DutchAnalyzer extends Analyzer {* Builds an exclusionlist from the words contained in the given file.* @deprecated use {@link #DutchAnalyzer(Version, Set, Set)} instead*/+ @Deprecatedpublic void setStemExclusionTable(File exclusionlist) {try {excltable = org.apache.lucene.analysis.WordlistLoader.getWordSet(exclusionlist);diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/reverse/ReverseStringFilter.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/reverse/ReverseStringFilter.javaindex 7d91ecf9c5d..ef9d2f996b2 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/reverse/ReverseStringFilter.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/reverse/ReverseStringFilter.java@@ -78,6 +78,7 @@ public final class ReverseStringFilter extends TokenFilter {* @deprecated use {@link #ReverseStringFilter(Version, TokenStream)}* instead. This constructor will be removed in Lucene 4.0*/+ @Deprecatedpublic ReverseStringFilter(TokenStream in) {this(in, NOMARKER);}@@ -95,6 +96,7 @@ public final class ReverseStringFilter extends TokenFilter {* @deprecated use {@link #ReverseStringFilter(Version, TokenStream, char)}* instead. This constructor will be removed in Lucene 4.0*/+ @Deprecatedpublic ReverseStringFilter(TokenStream in, char marker) {this(Version.LUCENE_30, in, marker);}@@ -157,6 +159,7 @@ public final class ReverseStringFilter extends TokenFilter {* @deprecated use {@link #reverse(Version, String)} instead. This method* will be removed in Lucene 4.0*/+ @Deprecatedpublic static String reverse( final String input ){return reverse(Version.LUCENE_30, input);}@@ -180,6 +183,7 @@ public final class ReverseStringFilter extends TokenFilter {* @deprecated use {@link #reverse(Version, char[])} instead. This* method will be removed in Lucene 4.0*/+ @Deprecatedpublic static void reverse( final char[] buffer ){reverse( buffer, 0, buffer.length );}@@ -202,6 +206,7 @@ public final class ReverseStringFilter extends TokenFilter {* @deprecated use {@link #reverse(Version, char[], int)} instead. This* method will be removed in Lucene 4.0*/+ @Deprecatedpublic static void reverse( final char[] buffer, final int len ){reverse( buffer, 0, len );}@@ -229,6 +234,7 @@ public final class ReverseStringFilter extends TokenFilter {* @deprecated use {@link #reverse(Version, char[], int, int)} instead. This* method will be removed in Lucene 4.0*/+ @Deprecatedpublic static void reverse(char[] buffer, int start, int len ) {reverseUnicode3(buffer, start, len);}@@ -236,6 +242,7 @@ public final class ReverseStringFilter extends TokenFilter {/*** @deprecated Remove this when support for 3.0 indexes is no longer needed.*/+ @Deprecatedprivate static void reverseUnicode3( char[] buffer, int start, int len ){if( len <= 1 ) return;int num = len>>1;diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.javaindex ff414b8b1b1..5c8d8d0a933 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianAnalyzer.java@@ -72,6 +72,7 @@ public final class RussianAnalyzer extends StopwordAnalyzerBase* Builds an analyzer with the given stop words.* @deprecated use {@link #RussianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic RussianAnalyzer(Version matchVersion, String... stopwords) {this(matchVersion, StopFilter.makeStopSet(matchVersion, stopwords));}@@ -93,6 +94,7 @@ public final class RussianAnalyzer extends StopwordAnalyzerBase* TODO: create a Set version of this ctor* @deprecated use {@link #RussianAnalyzer(Version, Set)} instead*/+ @Deprecatedpublic RussianAnalyzer(Version matchVersion, Map<?,?> stopwords){this(matchVersion, stopwords.keySet());diff --git a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.javaindex a773dca6842..5beec03b830 100644--- a/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java+++ b/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ru/RussianLowerCaseFilter.java@@ -29,6 +29,7 @@ import org.apache.lucene.analysis.tokenattributes.TermAttribute;* @deprecated Use {@link LowerCaseFilter} instead, which has the same* functionality. This filter will be removed in Lucene 4.0*/+@Deprecatedpublic final class RussianLowerCaseFilter extends TokenFilter{private TermAttribute termAtt;diff --git a/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java b/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.javaindex 37de521324c..c0107cdb93a 100644--- a/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java+++ b/contrib/analyzers/common/src/test/org/apache/lucene/analysis/cz/TestCzechAnalyzer.java@@ -40,6 +40,7 @@ public class TestCzechAnalyzer extends BaseTokenStreamTestCase {/*** @deprecated Remove this test when support for 3.0 indexes is no longer needed.*/+ @Deprecatedpublic void testStopWordLegacy() throws Exception {assertAnalyzesTo(new CzechAnalyzer(Version.LUCENE_30), "Pokud mluvime o volnem",new String[] { "mluvime", "volnem" });@@ -53,6 +54,7 @@ public class TestCzechAnalyzer extends BaseTokenStreamTestCase {/*** @deprecated Remove this test when support for 3.0 indexes is no longer needed.*/+ @Deprecatedpublic void testReusableTokenStreamLegacy() throws Exception {Analyzer analyzer = new CzechAnalyzer(Version.LUCENE_30);assertAnalyzesToReuse(analyzer, "Pokud mluvime o volnem", new String[] { "mluvime", "volnem" });@@ -69,6 +71,7 @@ public class TestCzechAnalyzer extends BaseTokenStreamTestCase {* An input stream that always throws IOException for testing.* @deprecated Remove this class when the loadStopWords method is removed.*/+ @Deprecatedprivate class UnreliableInputStream extends InputStream {@Overridepublic int read() throws IOException {@@ -82,6 +85,7 @@ public class TestCzechAnalyzer extends BaseTokenStreamTestCase {* this would cause a NPE when it is time to create the StopFilter.* @deprecated Remove this test when the loadStopWords method is removed.*/+ @Deprecatedpublic void testInvalidStopWordFile() throws Exception {CzechAnalyzer cz = new CzechAnalyzer(Version.LUCENE_30);cz.loadStopWords(new UnreliableInputStream(), "UTF-8");@@ -94,6 +98,7 @@ public class TestCzechAnalyzer extends BaseTokenStreamTestCase {* when using reusable token streams.* @deprecated Remove this test when the loadStopWords method is removed.*/+ @Deprecatedpublic void testStopWordFileReuse() throws Exception {CzechAnalyzer cz = new CzechAnalyzer(Version.LUCENE_30);assertAnalyzesToReuse(cz, "Česká Republika",diff --git a/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java b/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.javaindex 0bf48a2d52c..4829cd24a71 100644--- a/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java+++ b/contrib/highlighter/src/java/org/apache/lucene/search/highlight/TextFragment.java@@ -41,6 +41,7 @@ public class TextFragment* @deprecated Use {@link #TextFragment(CharSequence, int, int)} instead.* This constructor will be removed in Lucene 4.0*/+ @Deprecatedpublic TextFragment(StringBuffer markedUpText,int textStartPos, int fragNum){this.markedUpText=markedUpText;diff --git a/contrib/misc/src/java/org/apache/lucene/misc/ChainedFilter.java b/contrib/misc/src/java/org/apache/lucene/misc/ChainedFilter.javaindex bc39faecda7..3f7deb6d1ab 100644--- a/contrib/misc/src/java/org/apache/lucene/misc/ChainedFilter.java+++ b/contrib/misc/src/java/org/apache/lucene/misc/ChainedFilter.java@@ -156,6 +156,7 @@ public class ChainedFilter extends Filter* switch to a different DocIdSet implementation yourself.* This method will be removed in Lucene 4.0**/+ @Deprecatedprotected final DocIdSet finalResult(OpenBitSetDISI result, int maxDocs) {return result;}diff --git a/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java b/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.javaindex 189ee436822..a514c380d7f 100644--- a/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java+++ b/contrib/queries/src/java/org/apache/lucene/search/BooleanFilter.java@@ -117,6 +117,7 @@ public class BooleanFilter extends Filter* switch to a different DocIdSet implementation yourself.* This method will be removed in Lucene 4.0*/+ @Deprecatedprotected final DocIdSet finalResult(OpenBitSetDISI result, int maxDocs) {return result;}diff --git a/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/MultiFieldQueryParserWrapper.java b/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/MultiFieldQueryParserWrapper.javaindex 7997d802480..8ce459f57b9 100644--- a/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/MultiFieldQueryParserWrapper.java+++ b/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/MultiFieldQueryParserWrapper.java@@ -36,6 +36,7 @@ import org.apache.lucene.search.Query;* used along the transition from the old query parser to the new* one*/+@Deprecatedpublic class MultiFieldQueryParserWrapper extends QueryParserWrapper {/**diff --git a/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java b/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.javaindex 61f159aa942..51c6ca865ec 100644--- a/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java+++ b/contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/QueryParserWrapper.java@@ -64,6 +64,7 @@ import org.apache.lucene.search.Query;* used along the transition from the old query parser to the new* one*/+@Deprecatedpublic class QueryParserWrapper {/**diff --git a/contrib/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java b/contrib/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.javaindex 4f2cbf797d7..c015007ab25 100644--- a/contrib/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java+++ b/contrib/snowball/src/java/org/apache/lucene/analysis/snowball/SnowballAnalyzer.java@@ -55,6 +55,7 @@ public final class SnowballAnalyzer extends Analyzer {* Builds the named analyzer with the given stop words.* @deprecated Use {@link #SnowballAnalyzer(Version, String, Set)} instead.*/+ @Deprecatedpublic SnowballAnalyzer(Version matchVersion, String name, String[] stopWords) {this(matchVersion, name);stopSet = StopFilter.makeStopSet(matchVersion, stopWords);diff --git a/contrib/spatial/src/java/org/apache/lucene/spatial/geometry/shape/DistanceApproximation.java b/contrib/spatial/src/java/org/apache/lucene/spatial/geometry/shape/DistanceApproximation.javaindex 316eb639dfe..acf6ab005c3 100644--- a/contrib/spatial/src/java/org/apache/lucene/spatial/geometry/shape/DistanceApproximation.java+++ b/contrib/spatial/src/java/org/apache/lucene/spatial/geometry/shape/DistanceApproximation.java@@ -27,6 +27,7 @@ package org.apache.lucene.spatial.geometry.shape;* @deprecated This has been replaced with more accurate* math in {@link LLRect}. This class will be removed in a future release.*/+@Deprecatedpublic class DistanceApproximation{private double m_testLat;diff --git a/src/demo/org/apache/lucene/demo/html/HTMLParser.java b/src/demo/org/apache/lucene/demo/html/HTMLParser.javaindex 6531854938e..4a8944048ed 100644--- a/src/demo/org/apache/lucene/demo/html/HTMLParser.java+++ b/src/demo/org/apache/lucene/demo/html/HTMLParser.java@@ -43,6 +43,7 @@ public class HTMLParser implements HTMLParserConstants {/*** @deprecated Use HTMLParser(FileInputStream) instead*/+ @Deprecatedpublic HTMLParser(File file) throws FileNotFoundException {this(new FileInputStream(file));}diff --git a/src/demo/org/apache/lucene/demo/html/HTMLParser.jj b/src/demo/org/apache/lucene/demo/html/HTMLParser.jjindex 6cb126ec021..6a3578c213d 100644--- a/src/demo/org/apache/lucene/demo/html/HTMLParser.jj+++ b/src/demo/org/apache/lucene/demo/html/HTMLParser.jj@@ -70,6 +70,7 @@ public class HTMLParser {/*** @deprecated Use HTMLParser(FileInputStream) instead*/+ @Deprecatedpublic HTMLParser(File file) throws FileNotFoundException {this(new FileInputStream(file));}diff --git a/src/java/org/apache/lucene/analysis/Analyzer.java b/src/java/org/apache/lucene/analysis/Analyzer.javaindex 297c8d1e4dc..c52b99e7e3d 100644--- a/src/java/org/apache/lucene/analysis/Analyzer.java+++ b/src/java/org/apache/lucene/analysis/Analyzer.java@@ -85,11 +85,13 @@ public abstract class Analyzer implements Closeable {}/** @deprecated */+ @Deprecatedprotected boolean overridesTokenStreamMethod = false;/** @deprecated This is only present to preserve* back-compat of classes that subclass a core analyzer* and override tokenStream but not reusableTokenStream */+ @Deprecatedprotected void setOverridesTokenStreamMethod(Class<? extends Analyzer> baseClass) {try {Method m = this.getClass().getMethod("tokenStream", String.class, Reader.class);diff --git a/src/java/org/apache/lucene/analysis/CharArraySet.java b/src/java/org/apache/lucene/analysis/CharArraySet.javaindex 7f055c3286d..01a39b0c167 100644--- a/src/java/org/apache/lucene/analysis/CharArraySet.java+++ b/src/java/org/apache/lucene/analysis/CharArraySet.java@@ -117,6 +117,7 @@ public class CharArraySet extends AbstractSet<Object> {* otherwise <code>true</code>.* @deprecated use {@link #CharArraySet(Version, int, boolean)} instead*/+ @Deprecatedpublic CharArraySet(int startSize, boolean ignoreCase) {this(Version.LUCENE_30, startSize, ignoreCase);}@@ -131,6 +132,7 @@ public class CharArraySet extends AbstractSet<Object> {* otherwise <code>true</code>.* @deprecated use {@link #CharArraySet(Version, Collection, boolean)} instead*/+ @Deprecatedpublic CharArraySet(Collection<? extends Object> c, boolean ignoreCase) {this(Version.LUCENE_30, c.size(), ignoreCase);addAll(c);@@ -381,6 +383,7 @@ public class CharArraySet extends AbstractSet<Object> {* preserved.* @deprecated use {@link #copy(Version, Set)} instead.*/+ @Deprecatedpublic static CharArraySet copy(final Set<?> set) {if(set == EMPTY_SET)return EMPTY_SET;diff --git a/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java b/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.javaindex be5794745fd..f9a5c06aa8f 100644--- a/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java+++ b/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java@@ -31,6 +31,7 @@ import org.apache.lucene.analysis.tokenattributes.TermAttribute;* This class is included for use with existing* indexes and will be removed in a future release (possibly Lucene 4.0).*/+@Deprecatedpublic final class ISOLatin1AccentFilter extends TokenFilter {public ISOLatin1AccentFilter(TokenStream input) {super(input);diff --git a/src/java/org/apache/lucene/analysis/LowerCaseFilter.java b/src/java/org/apache/lucene/analysis/LowerCaseFilter.javaindex fa34a68fd06..41093514778 100644--- a/src/java/org/apache/lucene/analysis/LowerCaseFilter.java+++ b/src/java/org/apache/lucene/analysis/LowerCaseFilter.java@@ -50,6 +50,7 @@ public final class LowerCaseFilter extends TokenFilter {/*** @deprecated Use {@link #LowerCaseFilter(Version, TokenStream)} instead.*/+ @Deprecatedpublic LowerCaseFilter(TokenStream in) {this(Version.LUCENE_30, in);}diff --git a/src/java/org/apache/lucene/analysis/StopFilter.java b/src/java/org/apache/lucene/analysis/StopFilter.javaindex a2d62c6cf22..2086773f426 100644--- a/src/java/org/apache/lucene/analysis/StopFilter.java+++ b/src/java/org/apache/lucene/analysis/StopFilter.java@@ -64,6 +64,7 @@ public final class StopFilter extends TokenFilter {* @param ignoreCase if true, all words are lower cased first* @deprecated use {@link #StopFilter(Version, TokenStream, Set, boolean)} instead*/+ @Deprecatedpublic StopFilter(boolean enablePositionIncrements, TokenStream input, Set<?> stopWords, boolean ignoreCase){this(Version.LUCENE_30, enablePositionIncrements, input, stopWords, ignoreCase);@@ -117,6 +118,7 @@ public final class StopFilter extends TokenFilter {* @see #makeStopSet(Version, java.lang.String[])* @deprecated use {@link #StopFilter(Version, TokenStream, Set)} instead*/+ @Deprecatedpublic StopFilter(boolean enablePositionIncrements, TokenStream in, Set<?> stopWords) {this(Version.LUCENE_CURRENT, enablePositionIncrements, in, stopWords, false);}@@ -148,6 +150,7 @@ public final class StopFilter extends TokenFilter {* @see #makeStopSet(Version, java.lang.String[], boolean) passing false to ignoreCase* @deprecated use {@link #makeStopSet(Version, String...)} instead*/+ @Deprecatedpublic static final Set<Object> makeStopSet(String... stopWords) {return makeStopSet(Version.LUCENE_30, stopWords, false);}@@ -176,6 +179,7 @@ public final class StopFilter extends TokenFilter {* @see #makeStopSet(Version, java.lang.String[], boolean) passing false to ignoreCase* @deprecated use {@link #makeStopSet(Version, List)} instead*/+ @Deprecatedpublic static final Set<Object> makeStopSet(List<?> stopWords) {return makeStopSet(Version.LUCENE_30, stopWords, false);}@@ -202,6 +206,7 @@ public final class StopFilter extends TokenFilter {* @return a Set containing the words* @deprecated use {@link #makeStopSet(Version, String[], boolean)} instead;*/+ @Deprecatedpublic static final Set<Object> makeStopSet(String[] stopWords, boolean ignoreCase) {return makeStopSet(Version.LUCENE_30, stopWords, ignoreCase);}@@ -226,6 +231,7 @@ public final class StopFilter extends TokenFilter {* @return A Set ({@link CharArraySet}) containing the words* @deprecated use {@link #makeStopSet(Version, List, boolean)} instead*/+ @Deprecatedpublic static final Set<Object> makeStopSet(List<?> stopWords, boolean ignoreCase){return makeStopSet(Version.LUCENE_30, stopWords, ignoreCase);}@@ -271,6 +277,7 @@ public final class StopFilter extends TokenFilter {* or later, it returns true.* @deprecated use {@link #StopFilter(Version, TokenStream, Set)} instead*/+ @Deprecatedpublic static boolean getEnablePositionIncrementsVersionDefault(Version matchVersion) {return matchVersion.onOrAfter(Version.LUCENE_29);}diff --git a/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java b/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.javaindex e5316b383ae..384e7870f71 100644--- a/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java+++ b/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java@@ -71,6 +71,7 @@ public final class StandardTokenizer extends Tokenizer {* @deprecated this solves a bug where HOSTs that end with '.' are identified* as ACRONYMs.*/+ @Deprecatedpublic static final int ACRONYM_DEP = 8;/** String token types that correspond to token type int constants */@@ -227,6 +228,7 @@ public final class StandardTokenizer extends Tokenizer {** @deprecated Remove in 3.X and make true the only valid value*/+ @Deprecatedpublic boolean isReplaceInvalidAcronym() {return replaceInvalidAcronym;}@@ -238,6 +240,7 @@ public final class StandardTokenizer extends Tokenizer {** See https://issues.apache.org/jira/browse/LUCENE-1068*/+ @Deprecatedpublic void setReplaceInvalidAcronym(boolean replaceInvalidAcronym) {this.replaceInvalidAcronym = replaceInvalidAcronym;}diff --git a/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java b/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.javaindex 8f96b184042..e0167195f8c 100644--- a/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java+++ b/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java@@ -354,6 +354,7 @@ public static final int CJ = StandardTokenizer.CJ;* @deprecated this solves a bug where HOSTs that end with '.' are identified* as ACRONYMs.*/+@Deprecatedpublic static final int ACRONYM_DEP = StandardTokenizer.ACRONYM_DEP;public static final String [] TOKEN_TYPES = StandardTokenizer.TOKEN_TYPES;diff --git a/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex b/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflexindex 0ac120fbd94..30a4d0d0367 100644--- a/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex+++ b/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex@@ -55,6 +55,7 @@ public static final int CJ = StandardTokenizer.CJ;* @deprecated this solves a bug where HOSTs that end with '.' are identified* as ACRONYMs.*/+@Deprecatedpublic static final int ACRONYM_DEP = StandardTokenizer.ACRONYM_DEP;public static final String [] TOKEN_TYPES = StandardTokenizer.TOKEN_TYPES;diff --git a/src/java/org/apache/lucene/document/DateField.java b/src/java/org/apache/lucene/document/DateField.javaindex 5ba9b176eaa..508cc3d97e1 100644--- a/src/java/org/apache/lucene/document/DateField.java+++ b/src/java/org/apache/lucene/document/DateField.java@@ -57,6 +57,7 @@ import java.util.Calendar; // for javadoc* This class is included for use with existing* indices and will be removed in a future release (possibly Lucene 4.0).*/+@Deprecatedpublic class DateField {private DateField() {}diff --git a/src/java/org/apache/lucene/document/NumberTools.java b/src/java/org/apache/lucene/document/NumberTools.javaindex 17ccf4c9689..4f29ae9469f 100644--- a/src/java/org/apache/lucene/document/NumberTools.java+++ b/src/java/org/apache/lucene/document/NumberTools.java@@ -44,6 +44,7 @@ import org.apache.lucene.util.NumericUtils; // for javadocs* This class is included for use with existing* indices and will be removed in a future release (possibly Lucene 4.0).*/+@Deprecatedpublic class NumberTools {private static final int RADIX = 36;diff --git a/src/java/org/apache/lucene/index/FieldsReader.java b/src/java/org/apache/lucene/index/FieldsReader.javaindex b24c8ebd2be..7162b6c984c 100644--- a/src/java/org/apache/lucene/index/FieldsReader.java+++ b/src/java/org/apache/lucene/index/FieldsReader.java@@ -412,6 +412,7 @@ final class FieldsReader implements Cloneable {private int toRead;private long pointer;/** @deprecated Only kept for backward-compatbility with <3.0 indexes. Will be removed in 4.0. */+ @Deprecatedprivate boolean isCompressed;public LazyField(String name, Field.Store store, int toRead, long pointer, boolean isBinary, boolean isCompressed) {diff --git a/src/java/org/apache/lucene/index/FieldsWriter.java b/src/java/org/apache/lucene/index/FieldsWriter.javaindex bc88612deda..7de979c2481 100644--- a/src/java/org/apache/lucene/index/FieldsWriter.java+++ b/src/java/org/apache/lucene/index/FieldsWriter.java@@ -32,6 +32,7 @@ final class FieldsWriterstatic final byte FIELD_IS_BINARY = 0x2;/** @deprecated Kept for backwards-compatibility with <3.0 indexes; will be removed in 4.0 */+ @Deprecatedstatic final byte FIELD_IS_COMPRESSED = 0x4;// Original formatdiff --git a/src/java/org/apache/lucene/index/SegmentReader.java b/src/java/org/apache/lucene/index/SegmentReader.javaindex 6529dd13f13..23f72fd4661 100644--- a/src/java/org/apache/lucene/index/SegmentReader.java+++ b/src/java/org/apache/lucene/index/SegmentReader.java@@ -1276,6 +1276,7 @@ public class SegmentReader extends IndexReader implements Cloneable {* We do it with R/W access for the tests (BW compatibility)* @deprecated Remove this when tests are fixed!*/+ @Deprecatedstatic SegmentReader getOnlySegmentReader(Directory dir) throws IOException {return getOnlySegmentReader(IndexReader.open(dir,false));}diff --git a/src/java/org/apache/lucene/store/FSDirectory.java b/src/java/org/apache/lucene/store/FSDirectory.javaindex b4079c8755b..bd4c8b6b2e3 100644--- a/src/java/org/apache/lucene/store/FSDirectory.java+++ b/src/java/org/apache/lucene/store/FSDirectory.java@@ -373,6 +373,7 @@ public abstract class FSDirectory extends Directory {}/** @deprecated Use {@link #getDirectory} instead. */+ @Deprecatedpublic File getFile() {return getDirectory();}diff --git a/src/java/org/apache/lucene/store/IndexInput.java b/src/java/org/apache/lucene/store/IndexInput.javaindex a45e9837005..1c97dc68865 100644--- a/src/java/org/apache/lucene/store/IndexInput.java+++ b/src/java/org/apache/lucene/store/IndexInput.java@@ -146,6 +146,7 @@ public abstract class IndexInput implements Cloneable,Closeable {* instead, and construct the string* from those utf8 bytes*/+ @Deprecatedpublic void readChars(char[] buffer, int start, int length)throws IOException {final int end = start + length;@@ -174,6 +175,7 @@ public abstract class IndexInput implements Cloneable,Closeable {* @deprecated this method operates on old "modified utf8" encoded* strings*/+ @Deprecatedpublic void skipChars(int length) throws IOException{for (int i = 0; i < length; i++) {byte b = readByte();diff --git a/src/java/org/apache/lucene/store/IndexOutput.java b/src/java/org/apache/lucene/store/IndexOutput.javaindex 12753c50269..bc34b5026d1 100644--- a/src/java/org/apache/lucene/store/IndexOutput.java+++ b/src/java/org/apache/lucene/store/IndexOutput.java@@ -114,6 +114,7 @@ public abstract class IndexOutput implements Closeable {* @deprecated -- please pre-convert to utf8 bytes* instead or use {@link #writeString}*/+ @Deprecatedpublic void writeChars(String s, int start, int length)throws IOException {final int end = start + length;@@ -139,6 +140,7 @@ public abstract class IndexOutput implements Closeable {* @param length the number of characters in the sequence* @deprecated -- please pre-convert to utf8 bytes instead or use {@link #writeString}*/+ @Deprecatedpublic void writeChars(char[] s, int start, int length)throws IOException {final int end = start + length;diff --git a/src/java/org/apache/lucene/store/NoLockFactory.java b/src/java/org/apache/lucene/store/NoLockFactory.javaindex 1b9056888f0..f4d78da7acb 100755--- a/src/java/org/apache/lucene/store/NoLockFactory.java+++ b/src/java/org/apache/lucene/store/NoLockFactory.java@@ -39,6 +39,7 @@ public class NoLockFactory extends LockFactory {* @see #getNoLockFactory()*/// make private in 4.0!+ @Deprecatedpublic NoLockFactory() {}public static NoLockFactory getNoLockFactory() {diff --git a/src/java/org/apache/lucene/util/Parameter.java b/src/java/org/apache/lucene/util/Parameter.javaindex 90b2f515210..c3fe8640e29 100644--- a/src/java/org/apache/lucene/util/Parameter.java+++ b/src/java/org/apache/lucene/util/Parameter.java@@ -27,6 +27,7 @@ import java.util.Map;* A serializable Enum class.* @deprecated Use Java 5 enum, will be removed in a later Lucene 3.x release.*/+@Deprecated@SuppressWarnings("serial")public abstract class Parameter implements Serializable{diff --git a/src/java/org/apache/lucene/util/cache/SimpleLRUCache.java b/src/java/org/apache/lucene/util/cache/SimpleLRUCache.javaindex eb1a66b1d10..1b41c124072 100644--- a/src/java/org/apache/lucene/util/cache/SimpleLRUCache.java+++ b/src/java/org/apache/lucene/util/cache/SimpleLRUCache.java@@ -28,6 +28,7 @@ import java.util.Map;* @deprecated Lucene's internal use of this class has now* switched to {@link DoubleBarrelLRUCache}.*/+@Deprecatedpublic class SimpleLRUCache<K,V> extends SimpleMapCache<K,V> {private final static float LOADFACTOR = 0.75f;diff --git a/src/java/org/apache/lucene/util/cache/SimpleMapCache.java b/src/java/org/apache/lucene/util/cache/SimpleMapCache.javaindex 8d917b5e07d..a8189ff7c48 100644--- a/src/java/org/apache/lucene/util/cache/SimpleMapCache.java+++ b/src/java/org/apache/lucene/util/cache/SimpleMapCache.java@@ -29,6 +29,7 @@ import java.util.Set;* @deprecated Lucene's internal use of this class has now* switched to {@link DoubleBarrelLRUCache}.*/+@Deprecatedpublic class SimpleMapCache<K,V> extends Cache<K,V> {protected Map<K,V> map;diff --git a/src/test/org/apache/lucene/analysis/TestAnalyzers.java b/src/test/org/apache/lucene/analysis/TestAnalyzers.javaindex 915b499e15c..2295f6fc530 100644--- a/src/test/org/apache/lucene/analysis/TestAnalyzers.java+++ b/src/test/org/apache/lucene/analysis/TestAnalyzers.java@@ -154,6 +154,7 @@ public class TestAnalyzers extends BaseTokenStreamTestCase {* @deprecated remove this when lucene 3.0 "broken unicode 4" support* is no longer needed.*/+ @Deprecatedprivate static class LowerCaseWhitespaceAnalyzerBWComp extends Analyzer {@Override@@ -215,6 +216,7 @@ public class TestAnalyzers extends BaseTokenStreamTestCase {* @deprecated remove this test when lucene 3.0 "broken unicode 4" support* is no longer needed.*/+ @Deprecatedpublic void testLowerCaseFilterBWComp() throws IOException {Analyzer a = new LowerCaseWhitespaceAnalyzerBWComp();// BMPdiff --git a/src/test/org/apache/lucene/analysis/TestCharArraySet.java b/src/test/org/apache/lucene/analysis/TestCharArraySet.javaindex 0be6e7d93d3..3cb7f9598e7 100755--- a/src/test/org/apache/lucene/analysis/TestCharArraySet.java+++ b/src/test/org/apache/lucene/analysis/TestCharArraySet.java@@ -254,6 +254,7 @@ public class TestCharArraySet extends LuceneTestCase {* @deprecated remove this test when lucene 3.0 "broken unicode 4" support is* no longer needed.*/+ @Deprecatedpublic void testSupplementaryCharsBWCompat() {String missing = "Term %s is missing in the set";String falsePos = "Term %s is in the set but shouldn't";@@ -285,6 +286,7 @@ public class TestCharArraySet extends LuceneTestCase {* @deprecated remove this test when lucene 3.0 "broken unicode 4" support is* no longer needed.*/+ @Deprecatedpublic void testSingleHighSurrogateBWComapt() {String missing = "Term %s is missing in the set";String falsePos = "Term %s is in the set but shouldn't";diff --git a/src/test/org/apache/lucene/search/CheckHits.java b/src/test/org/apache/lucene/search/CheckHits.javaindex 99d1124bbc4..bd2581d991a 100644--- a/src/test/org/apache/lucene/search/CheckHits.java+++ b/src/test/org/apache/lucene/search/CheckHits.java@@ -456,6 +456,7 @@ public class CheckHits {* @deprecated* @see CheckHits#EXPLAIN_SCORE_TOLERANCE_DELTA*/+ @Deprecatedpublic static float SCORE_TOLERANCE_DELTA = 0.00005f;Query q;diff --git a/src/test/org/apache/lucene/util/_TestUtil.java b/src/test/org/apache/lucene/util/_TestUtil.javaindex ada8c30476a..87e2b3f4530 100644--- a/src/test/org/apache/lucene/util/_TestUtil.java+++ b/src/test/org/apache/lucene/util/_TestUtil.java@@ -84,6 +84,7 @@ public class _TestUtil {/** Use only for testing.* @deprecated -- in 3.0 we can use Arrays.toString* instead */+ @Deprecatedpublic static String arrayToString(int[] array) {StringBuilder buf = new StringBuilder();buf.append("[");@@ -100,6 +101,7 @@ public class _TestUtil {/** Use only for testing.* @deprecated -- in 3.0 we can use Arrays.toString* instead */+ @Deprecatedpublic static String arrayToString(Object[] array) {StringBuilder buf = new StringBuilder();buf.append("[");diff --git a/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java b/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.javaindex 4183046c29f..ef1025c6d4d 100644--- a/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java+++ b/src/test/org/apache/lucene/util/cache/TestSimpleLRUCache.java@@ -18,6 +18,7 @@ package org.apache.lucene.util.cache;*//** @deprecated */+@Deprecatedpublic class TestSimpleLRUCache extends BaseTestLRU {public void testLRUCache() throws Exception {final int n = 100;