diff --git a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/SinusoidalProjector.java b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/SinusoidalProjector.java index 42ed3cea239..ea7694b7b91 100644 --- a/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/SinusoidalProjector.java +++ b/lucene/contrib/spatial/src/java/org/apache/lucene/spatial/tier/projections/SinusoidalProjector.java @@ -30,6 +30,7 @@ package org.apache.lucene.spatial.tier.projections; * * @deprecated Until we can put in place proper tests and a proper fix. */ +@Deprecated public class SinusoidalProjector implements IProjector { diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java index b48b97b390e..ca8b0e55430 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriter.java @@ -3860,6 +3860,7 @@ public class TestIndexWriter extends LuceneTestCase { break; case 3: writer2.optimize(); + break; case 4: writer2.commit(); } diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java index b3c3d36e865..b254362ee28 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/TernaryTree.java @@ -258,7 +258,7 @@ public class TernaryTree implements Cloneable, Serializable { } } if (a[start + i] != 0) { - return (int) -a[start + i]; + return -a[start + i]; } return 0; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro index 3dcd8a3df6f..b30dc206383 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ASCIITLD.jflex-macro @@ -15,8 +15,8 @@ */ // Generated from IANA Root Zone Database -// file version from Tuesday, September 14, 2010 11:34:20 AM UTC -// generated on Wednesday, September 15, 2010 7:00:44 AM UTC +// file version from Saturday, October 2, 2010 11:34:09 AM UTC +// generated on Saturday, October 2, 2010 10:07:09 PM UTC // by org.apache.lucene.analysis.standard.GenerateJflexTLDMacros ASCIITLD = "." ( diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java index 26c21791c47..6bf093bef72 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/15/10 3:01 AM */ +/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 10/2/10 6:07 PM */ package org.apache.lucene.analysis.standard; @@ -33,8 +33,8 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; /** * This class is a scanner generated by * JFlex 1.5.0-SNAPSHOT - * on 9/15/10 3:01 AM from the specification file - * c:/Users/us/IdeaProjects/lucene/test-dev-trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex + * on 10/2/10 6:07 PM from the specification file + * C:/Users/rmuir/workspace/lucene-clean/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex */ class ClassicTokenizerImpl implements StandardTokenizerInterface { @@ -359,6 +359,7 @@ public static final int CJ = StandardTokenizer.CJ; * @deprecated this solves a bug where HOSTs that end with '.' are identified * as ACRONYMs. */ +@Deprecated public static final int ACRONYM_DEP = StandardTokenizer.ACRONYM_DEP; public static final String [] TOKEN_TYPES = StandardTokenizer.TOKEN_TYPES; @@ -680,45 +681,45 @@ public final void getText(CharTermAttribute t) { zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 5: - { return NUM; - } - case 11: break; - case 9: - { return ACRONYM; - } - case 12: break; - case 7: - { return COMPANY; - } - case 13: break; case 10: { return EMAIL; } - case 14: break; - case 1: - { /* ignore */ - } - case 15: break; - case 6: - { return APOSTROPHE; - } - case 16: break; - case 3: - { return CJ; - } - case 17: break; - case 8: - { return ACRONYM_DEP; - } - case 18: break; + case 11: break; case 2: { return ALPHANUM; } - case 19: break; + case 12: break; case 4: { return HOST; } + case 13: break; + case 1: + { /* ignore */ + } + case 14: break; + case 8: + { return ACRONYM_DEP; + } + case 15: break; + case 5: + { return NUM; + } + case 16: break; + case 9: + { return ACRONYM; + } + case 17: break; + case 7: + { return COMPANY; + } + case 18: break; + case 6: + { return APOSTROPHE; + } + case 19: break; + case 3: + { return CJ; + } case 20: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex index fa78a19d769..037b71a68c8 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/ClassicTokenizerImpl.jflex @@ -51,6 +51,7 @@ public static final int CJ = StandardTokenizer.CJ; * @deprecated this solves a bug where HOSTs that end with '.' are identified * as ACRONYMs. */ +@Deprecated public static final int ACRONYM_DEP = StandardTokenizer.ACRONYM_DEP; public static final String [] TOKEN_TYPES = StandardTokenizer.TOKEN_TYPES; diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java index 5335cb60a12..f9744361f20 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/15/10 3:01 AM */ +/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 10/2/10 6:07 PM */ package org.apache.lucene.analysis.standard; @@ -2712,36 +2712,36 @@ public final class StandardTokenizerImpl implements StandardTokenizerInterface { zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 1: - { /* Not numeric, word, ideographic, hiragana, or SE Asian -- ignore it. */ - } - case 9: break; - case 6: - { return HIRAGANA_TYPE; - } - case 10: break; case 2: { return WORD_TYPE; } - case 11: break; + case 9: break; + case 4: + { return SOUTH_EAST_ASIAN_TYPE; + } + case 10: break; case 8: { return URL_TYPE; } + case 11: break; + case 7: + { return EMAIL_TYPE; + } case 12: break; case 5: { return IDEOGRAPHIC_TYPE; } case 13: break; - case 7: - { return EMAIL_TYPE; + case 1: + { /* Not numeric, word, ideographic, hiragana, or SE Asian -- ignore it. */ } case 14: break; case 3: { return NUMERIC_TYPE; } case 15: break; - case 4: - { return SOUTH_EAST_ASIAN_TYPE; + case 6: + { return HIRAGANA_TYPE; } case 16: break; default: diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29Tokenizer.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29Tokenizer.java index 76b46a9f177..b5a8575b180 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29Tokenizer.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/standard/UAX29Tokenizer.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 9/15/10 3:01 AM */ +/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 10/2/10 6:07 PM */ package org.apache.lucene.analysis.standard; @@ -802,28 +802,28 @@ public final class UAX29Tokenizer extends Tokenizer { zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { - case 5: - { if (populateAttributes(IDEOGRAPHIC_TYPE)) return true; + case 2: + { if (populateAttributes(WORD_TYPE)) return true; } case 7: break; - case 1: - { /* Not numeric, word, ideographic, hiragana, or SE Asian -- ignore it. */ - } - case 8: break; - case 3: - { if (populateAttributes(NUMERIC_TYPE)) return true; - } - case 9: break; case 6: { if (populateAttributes(HIRAGANA_TYPE)) return true; } - case 10: break; + case 8: break; + case 5: + { if (populateAttributes(IDEOGRAPHIC_TYPE)) return true; + } + case 9: break; case 4: { if (populateAttributes(SOUTH_EAST_ASIAN_TYPE)) return true; } + case 10: break; + case 3: + { if (populateAttributes(NUMERIC_TYPE)) return true; + } case 11: break; - case 2: - { if (populateAttributes(WORD_TYPE)) return true; + case 1: + { /* Not numeric, word, ideographic, hiragana, or SE Asian -- ignore it. */ } case 12: break; default: diff --git a/modules/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java b/modules/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java index 34735b05e08..88cc43ed415 100644 --- a/modules/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java +++ b/modules/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java @@ -1,4 +1,4 @@ -/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 5/31/10 3:11 PM */ +/* The following code was generated by JFlex 1.5.0-SNAPSHOT on 10/2/10 6:07 PM */ package org.apache.lucene.analysis.wikipedia; @@ -25,8 +25,8 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; /** * This class is a scanner generated by * JFlex 1.5.0-SNAPSHOT - * on 5/31/10 3:11 PM from the specification file - * C:/Users/rmuir/workspace/solrcene/modules/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex + * on 10/2/10 6:07 PM from the specification file + * C:/Users/rmuir/workspace/lucene-clean/modules/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex */ class WikipediaTokenizerImpl { diff --git a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/AbstractDictionary.java b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/AbstractDictionary.java index 7e616a41a18..663a6b5b30c 100644 --- a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/AbstractDictionary.java +++ b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/AbstractDictionary.java @@ -113,8 +113,8 @@ abstract class AbstractDictionary { // Should be a two-byte character return -1; } - int b0 = (int) (buffer[0] & 0x0FF) - 161; // Code starts from A1, therefore subtract 0xA1=161 - int b1 = (int) (buffer[1] & 0x0FF) - 161; // There is no Chinese char for the first and last symbol. + int b0 = (buffer[0] & 0x0FF) - 161; // Code starts from A1, therefore subtract 0xA1=161 + int b1 = (buffer[1] & 0x0FF) - 161; // There is no Chinese char for the first and last symbol. // Therefore, each code page only has 16*6-2=94 characters. return (short) (b0 * 94 + b1); } catch (UnsupportedEncodingException e) { diff --git a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/BiSegGraph.java b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/BiSegGraph.java index 9dd83e91b19..e35741483ca 100644 --- a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/BiSegGraph.java +++ b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/BiSegGraph.java @@ -208,7 +208,7 @@ class BiSegGraph { current = preNode; } for (int j = rpath.size() - 1; j >= 0; j--) { - Integer idInteger = (Integer) rpath.get(j); + Integer idInteger = rpath.get(j); int id = idInteger.intValue(); SegToken t = segTokenList.get(id); resultPath.add(t); diff --git a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/HHMMSegmenter.java b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/HHMMSegmenter.java index 6e74d1cd8f9..a40dcb53100 100644 --- a/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/HHMMSegmenter.java +++ b/modules/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/HHMMSegmenter.java @@ -38,6 +38,7 @@ public class HHMMSegmenter { * @param sentence input sentence, without start and end markers * @return {@link SegGraph} corresponding to the input sentence. */ + @SuppressWarnings("fallthrough") private SegGraph createSegGraph(String sentence) { int i = 0, j; int length = sentence.length(); @@ -100,7 +101,7 @@ public class HHMMSegmenter { i++; break; case CharType.FULLWIDTH_LETTER: - hasFullWidth = true; + hasFullWidth = true; /* intentional fallthrough */ case CharType.LETTER: j = i + 1; while (j < length @@ -118,7 +119,7 @@ public class HHMMSegmenter { i = j; break; case CharType.FULLWIDTH_DIGIT: - hasFullWidth = true; + hasFullWidth = true; /* intentional fallthrough */ case CharType.DIGIT: j = i + 1; while (j < length diff --git a/modules/analysis/stempel/src/java/org/egothor/stemmer/MultiTrie2.java b/modules/analysis/stempel/src/java/org/egothor/stemmer/MultiTrie2.java index cbb0235b91b..15571dc3162 100644 --- a/modules/analysis/stempel/src/java/org/egothor/stemmer/MultiTrie2.java +++ b/modules/analysis/stempel/src/java/org/egothor/stemmer/MultiTrie2.java @@ -314,6 +314,7 @@ public class MultiTrie2 extends MultiTrie { return -1; } + @SuppressWarnings("fallthrough") private int lengthPP(CharSequence cmd) { int len = 0; for (int i = 0; i < cmd.length(); i++) { @@ -323,7 +324,7 @@ public class MultiTrie2 extends MultiTrie { len += cmd.charAt(i) - 'a' + 1; break; case 'R': - len++; + len++; /* intentional fallthrough */ case 'I': break; }