clear up more warnings in modules/contrib

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1003990 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-10-03 16:27:34 +00:00
parent 0789e5f4e7
commit afad8123d2
11 changed files with 62 additions and 72 deletions

View File

@ -319,7 +319,7 @@ public class Config {
String t = st.nextToken(); String t = st.nextToken();
a.add(t); a.add(t);
} }
return (String[]) a.toArray(new String[a.size()]); return a.toArray(new String[a.size()]);
} }
// extract properties to array, e.g. for "10:100:5" return int[]{10,100,5}. // extract properties to array, e.g. for "10:100:5" return int[]{10,100,5}.

View File

@ -72,12 +72,7 @@ import org.apache.lucene.util.AttributeSource;
* href="../../../../../../../queryparsersyntax.html">query syntax * href="../../../../../../../queryparsersyntax.html">query syntax
* documentation</a>. * documentation</a>.
* </p> * </p>
*
* @author Brian Goetz
* @author Peter Halacsy
* @author Tatu Saloranta
*/ */
public class PrecedenceQueryParser implements PrecedenceQueryParserConstants { public class PrecedenceQueryParser implements PrecedenceQueryParserConstants {
private static final int CONJ_NONE = 0; private static final int CONJ_NONE = 0;

View File

@ -96,12 +96,7 @@ import org.apache.lucene.util.AttributeSource;
* href="../../../../../../../queryparsersyntax.html">query syntax * href="../../../../../../../queryparsersyntax.html">query syntax
* documentation</a>. * documentation</a>.
* </p> * </p>
*
* @author Brian Goetz
* @author Peter Halacsy
* @author Tatu Saloranta
*/ */
public class PrecedenceQueryParser { public class PrecedenceQueryParser {
private static final int CONJ_NONE = 0; private static final int CONJ_NONE = 0;

View File

@ -48,7 +48,6 @@ import org.apache.lucene.queryParser.core.nodes.QueryNodeImpl;
import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode; import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode;
import org.apache.lucene.queryParser.core.parser.SyntaxParser; import org.apache.lucene.queryParser.core.parser.SyntaxParser;
@SuppressWarnings("all")
public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserConstants { public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserConstants {
private static final int CONJ_NONE =0; private static final int CONJ_NONE =0;
@ -167,7 +166,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
// ConjQuery ::= Clause ( AND Clause )* // ConjQuery ::= Clause ( AND Clause )*
// Clause ::= [ Modifier ] ... // Clause ::= [ Modifier ] ...
final public QueryNode Query(CharSequence field) throws ParseException { final public QueryNode Query(CharSequence field) throws ParseException {
Vector clauses = null; Vector<QueryNode> clauses = null;
QueryNode c, first=null; QueryNode c, first=null;
first = DisjQuery(field); first = DisjQuery(field);
label_1: label_1:
@ -191,7 +190,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
} }
c = DisjQuery(field); c = DisjQuery(field);
if (clauses == null) { if (clauses == null) {
clauses = new Vector(); clauses = new Vector<QueryNode>();
clauses.addElement(first); clauses.addElement(first);
} }
clauses.addElement(c); clauses.addElement(c);
@ -206,7 +205,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
final public QueryNode DisjQuery(CharSequence field) throws ParseException { final public QueryNode DisjQuery(CharSequence field) throws ParseException {
QueryNode first, c; QueryNode first, c;
Vector clauses = null; Vector<QueryNode> clauses = null;
first = ConjQuery(field); first = ConjQuery(field);
label_2: label_2:
while (true) { while (true) {
@ -221,7 +220,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
jj_consume_token(OR); jj_consume_token(OR);
c = ConjQuery(field); c = ConjQuery(field);
if (clauses == null) { if (clauses == null) {
clauses = new Vector(); clauses = new Vector<QueryNode>();
clauses.addElement(first); clauses.addElement(first);
} }
clauses.addElement(c); clauses.addElement(c);
@ -236,7 +235,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
final public QueryNode ConjQuery(CharSequence field) throws ParseException { final public QueryNode ConjQuery(CharSequence field) throws ParseException {
QueryNode first, c; QueryNode first, c;
Vector clauses = null; Vector<QueryNode> clauses = null;
first = ModClause(field); first = ModClause(field);
label_3: label_3:
while (true) { while (true) {
@ -251,7 +250,7 @@ public class StandardSyntaxParser implements SyntaxParser, StandardSyntaxParserC
jj_consume_token(AND); jj_consume_token(AND);
c = ModClause(field); c = ModClause(field);
if (clauses == null) { if (clauses == null) {
clauses = new Vector(); clauses = new Vector<QueryNode>();
clauses.addElement(first); clauses.addElement(first);
} }
clauses.addElement(c); clauses.addElement(c);

View File

@ -60,7 +60,6 @@ import org.apache.lucene.queryParser.core.nodes.QueryNodeImpl;
import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode; import org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode;
import org.apache.lucene.queryParser.core.parser.SyntaxParser; import org.apache.lucene.queryParser.core.parser.SyntaxParser;
@SuppressWarnings("all")
public class StandardSyntaxParser implements SyntaxParser { public class StandardSyntaxParser implements SyntaxParser {
private static final int CONJ_NONE =0; private static final int CONJ_NONE =0;
@ -208,7 +207,7 @@ QueryNode TopLevelQuery(CharSequence field) :
QueryNode Query(CharSequence field) : QueryNode Query(CharSequence field) :
{ {
Vector clauses = null; Vector<QueryNode> clauses = null;
QueryNode c, first=null; QueryNode c, first=null;
} }
{ {
@ -217,7 +216,7 @@ QueryNode Query(CharSequence field) :
c=DisjQuery(field) c=DisjQuery(field)
{ {
if (clauses == null) { if (clauses == null) {
clauses = new Vector(); clauses = new Vector<QueryNode>();
clauses.addElement(first); clauses.addElement(first);
} }
clauses.addElement(c); clauses.addElement(c);
@ -234,7 +233,7 @@ QueryNode Query(CharSequence field) :
QueryNode DisjQuery(CharSequence field) : { QueryNode DisjQuery(CharSequence field) : {
QueryNode first, c; QueryNode first, c;
Vector clauses = null; Vector<QueryNode> clauses = null;
} }
{ {
first = ConjQuery(field) first = ConjQuery(field)
@ -242,7 +241,7 @@ QueryNode DisjQuery(CharSequence field) : {
<OR> c=ConjQuery(field) <OR> c=ConjQuery(field)
{ {
if (clauses == null) { if (clauses == null) {
clauses = new Vector(); clauses = new Vector<QueryNode>();
clauses.addElement(first); clauses.addElement(first);
} }
clauses.addElement(c); clauses.addElement(c);
@ -259,7 +258,7 @@ QueryNode DisjQuery(CharSequence field) : {
QueryNode ConjQuery(CharSequence field) : { QueryNode ConjQuery(CharSequence field) : {
QueryNode first, c; QueryNode first, c;
Vector clauses = null; Vector<QueryNode> clauses = null;
} }
{ {
first = ModClause(field) first = ModClause(field)
@ -267,7 +266,7 @@ QueryNode ConjQuery(CharSequence field) : {
<AND> c=ModClause(field) <AND> c=ModClause(field)
{ {
if (clauses == null) { if (clauses == null) {
clauses = new Vector(); clauses = new Vector<QueryNode>();
clauses.addElement(first); clauses.addElement(first);
} }
clauses.addElement(c); clauses.addElement(c);

View File

@ -56,22 +56,22 @@ public class QueryParser implements QueryParserConstants {
} }
protected SrndQuery getFieldsQuery( protected SrndQuery getFieldsQuery(
SrndQuery q, ArrayList fieldNames) { SrndQuery q, ArrayList<String> fieldNames) {
/* FIXME: check acceptable subquery: at least one subquery should not be /* FIXME: check acceptable subquery: at least one subquery should not be
* a fields query. * a fields query.
*/ */
return new FieldsQuery(q, fieldNames, fieldOperator); return new FieldsQuery(q, fieldNames, fieldOperator);
} }
protected SrndQuery getOrQuery(List queries, boolean infix, Token orToken) { protected SrndQuery getOrQuery(List<SrndQuery> queries, boolean infix, Token orToken) {
return new OrQuery(queries, infix, orToken.image); return new OrQuery(queries, infix, orToken.image);
} }
protected SrndQuery getAndQuery(List queries, boolean infix, Token andToken) { protected SrndQuery getAndQuery(List<SrndQuery> queries, boolean infix, Token andToken) {
return new AndQuery( queries, infix, andToken.image); return new AndQuery( queries, infix, andToken.image);
} }
protected SrndQuery getNotQuery(List queries, Token notToken) { protected SrndQuery getNotQuery(List<SrndQuery> queries, Token notToken) {
return new NotQuery( queries, notToken.image); return new NotQuery( queries, notToken.image);
} }
@ -91,7 +91,7 @@ public class QueryParser implements QueryParserConstants {
} }
protected SrndQuery getDistanceQuery( protected SrndQuery getDistanceQuery(
List queries, List<SrndQuery> queries,
boolean infix, boolean infix,
Token dToken, Token dToken,
boolean ordered) throws ParseException { boolean ordered) throws ParseException {
@ -144,16 +144,16 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery FieldsQuery() throws ParseException { final public SrndQuery FieldsQuery() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList fieldNames; ArrayList<String> fieldNames;
fieldNames = OptionalFields(); fieldNames = OptionalFields();
q = OrQuery(); q = OrQuery();
{if (true) return (fieldNames == null) ? q : getFieldsQuery(q, fieldNames);} {if (true) return (fieldNames == null) ? q : getFieldsQuery(q, fieldNames);}
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }
final public ArrayList OptionalFields() throws ParseException { final public ArrayList<String> OptionalFields() throws ParseException {
Token fieldName; Token fieldName;
ArrayList fieldNames = null; ArrayList<String> fieldNames = null;
label_1: label_1:
while (true) { while (true) {
if (jj_2_1(2)) { if (jj_2_1(2)) {
@ -165,7 +165,7 @@ public class QueryParser implements QueryParserConstants {
fieldName = jj_consume_token(TERM); fieldName = jj_consume_token(TERM);
jj_consume_token(COLON); jj_consume_token(COLON);
if (fieldNames == null) { if (fieldNames == null) {
fieldNames = new ArrayList(); fieldNames = new ArrayList<String>();
} }
fieldNames.add(fieldName.image); fieldNames.add(fieldName.image);
} }
@ -175,7 +175,7 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery OrQuery() throws ParseException { final public SrndQuery OrQuery() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList queries = null; ArrayList<SrndQuery> queries = null;
Token oprt = null; Token oprt = null;
q = AndQuery(); q = AndQuery();
label_2: label_2:
@ -191,7 +191,7 @@ public class QueryParser implements QueryParserConstants {
oprt = jj_consume_token(OR); oprt = jj_consume_token(OR);
/* keep only last used operator */ /* keep only last used operator */
if (queries == null) { if (queries == null) {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); queries.add(q);
} }
q = AndQuery(); q = AndQuery();
@ -203,7 +203,7 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery AndQuery() throws ParseException { final public SrndQuery AndQuery() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList queries = null; ArrayList<SrndQuery> queries = null;
Token oprt = null; Token oprt = null;
q = NotQuery(); q = NotQuery();
label_3: label_3:
@ -219,7 +219,7 @@ public class QueryParser implements QueryParserConstants {
oprt = jj_consume_token(AND); oprt = jj_consume_token(AND);
/* keep only last used operator */ /* keep only last used operator */
if (queries == null) { if (queries == null) {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); queries.add(q);
} }
q = NotQuery(); q = NotQuery();
@ -231,7 +231,7 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery NotQuery() throws ParseException { final public SrndQuery NotQuery() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList queries = null; ArrayList<SrndQuery> queries = null;
Token oprt = null; Token oprt = null;
q = NQuery(); q = NQuery();
label_4: label_4:
@ -247,7 +247,7 @@ public class QueryParser implements QueryParserConstants {
oprt = jj_consume_token(NOT); oprt = jj_consume_token(NOT);
/* keep only last used operator */ /* keep only last used operator */
if (queries == null) { if (queries == null) {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); queries.add(q);
} }
q = NQuery(); q = NQuery();
@ -259,7 +259,7 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery NQuery() throws ParseException { final public SrndQuery NQuery() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList queries; ArrayList<SrndQuery> queries;
Token dt; Token dt;
q = WQuery(); q = WQuery();
label_5: label_5:
@ -273,7 +273,7 @@ public class QueryParser implements QueryParserConstants {
break label_5; break label_5;
} }
dt = jj_consume_token(N); dt = jj_consume_token(N);
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); /* left associative */ queries.add(q); /* left associative */
q = WQuery(); q = WQuery();
@ -286,7 +286,7 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery WQuery() throws ParseException { final public SrndQuery WQuery() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList queries; ArrayList<SrndQuery> queries;
Token wt; Token wt;
q = PrimaryQuery(); q = PrimaryQuery();
label_6: label_6:
@ -300,7 +300,7 @@ public class QueryParser implements QueryParserConstants {
break label_6; break label_6;
} }
wt = jj_consume_token(W); wt = jj_consume_token(W);
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); /* left associative */ queries.add(q); /* left associative */
q = PrimaryQuery(); q = PrimaryQuery();
@ -345,7 +345,7 @@ public class QueryParser implements QueryParserConstants {
final public SrndQuery PrefixOperatorQuery() throws ParseException { final public SrndQuery PrefixOperatorQuery() throws ParseException {
Token oprt; Token oprt;
List queries; List<SrndQuery> queries;
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case OR: case OR:
oprt = jj_consume_token(OR); oprt = jj_consume_token(OR);
@ -379,9 +379,9 @@ public class QueryParser implements QueryParserConstants {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }
final public List FieldsQueryList() throws ParseException { final public List<SrndQuery> FieldsQueryList() throws ParseException {
SrndQuery q; SrndQuery q;
ArrayList queries = new ArrayList(); ArrayList<SrndQuery> queries = new ArrayList<SrndQuery>();
jj_consume_token(LPAREN); jj_consume_token(LPAREN);
q = FieldsQuery(); q = FieldsQuery();
queries.add(q); queries.add(q);

View File

@ -85,22 +85,22 @@ public class QueryParser {
} }
protected SrndQuery getFieldsQuery( protected SrndQuery getFieldsQuery(
SrndQuery q, ArrayList fieldNames) { SrndQuery q, ArrayList<String> fieldNames) {
/* FIXME: check acceptable subquery: at least one subquery should not be /* FIXME: check acceptable subquery: at least one subquery should not be
* a fields query. * a fields query.
*/ */
return new FieldsQuery(q, fieldNames, fieldOperator); return new FieldsQuery(q, fieldNames, fieldOperator);
} }
protected SrndQuery getOrQuery(List queries, boolean infix, Token orToken) { protected SrndQuery getOrQuery(List<SrndQuery> queries, boolean infix, Token orToken) {
return new OrQuery(queries, infix, orToken.image); return new OrQuery(queries, infix, orToken.image);
} }
protected SrndQuery getAndQuery(List queries, boolean infix, Token andToken) { protected SrndQuery getAndQuery(List<SrndQuery> queries, boolean infix, Token andToken) {
return new AndQuery( queries, infix, andToken.image); return new AndQuery( queries, infix, andToken.image);
} }
protected SrndQuery getNotQuery(List queries, Token notToken) { protected SrndQuery getNotQuery(List<SrndQuery> queries, Token notToken) {
return new NotQuery( queries, notToken.image); return new NotQuery( queries, notToken.image);
} }
@ -120,7 +120,7 @@ public class QueryParser {
} }
protected SrndQuery getDistanceQuery( protected SrndQuery getDistanceQuery(
List queries, List<SrndQuery> queries,
boolean infix, boolean infix,
Token dToken, Token dToken,
boolean ordered) throws ParseException { boolean ordered) throws ParseException {
@ -231,7 +231,7 @@ SrndQuery TopSrndQuery() : {
SrndQuery FieldsQuery() : { SrndQuery FieldsQuery() : {
SrndQuery q; SrndQuery q;
ArrayList fieldNames; ArrayList<String> fieldNames;
}{ }{
fieldNames = OptionalFields() fieldNames = OptionalFields()
q = OrQuery() q = OrQuery()
@ -239,15 +239,15 @@ SrndQuery FieldsQuery() : {
} }
ArrayList OptionalFields() : { ArrayList<String> OptionalFields() : {
Token fieldName; Token fieldName;
ArrayList fieldNames = null; ArrayList<String> fieldNames = null;
}{ }{
( LOOKAHEAD(2) // to the colon ( LOOKAHEAD(2) // to the colon
fieldName = <TERM> fieldName = <TERM>
<COLON> { <COLON> {
if (fieldNames == null) { if (fieldNames == null) {
fieldNames = new ArrayList(); fieldNames = new ArrayList<String>();
} }
fieldNames.add(fieldName.image); fieldNames.add(fieldName.image);
} }
@ -258,13 +258,13 @@ ArrayList OptionalFields() : {
SrndQuery OrQuery() : { SrndQuery OrQuery() : {
SrndQuery q; SrndQuery q;
ArrayList queries = null; ArrayList<SrndQuery> queries = null;
Token oprt = null; Token oprt = null;
}{ }{
q = AndQuery() q = AndQuery()
( oprt = <OR> { /* keep only last used operator */ ( oprt = <OR> { /* keep only last used operator */
if (queries == null) { if (queries == null) {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); queries.add(q);
} }
} }
@ -278,13 +278,13 @@ SrndQuery OrQuery() : {
SrndQuery AndQuery() : { SrndQuery AndQuery() : {
SrndQuery q; SrndQuery q;
ArrayList queries = null; ArrayList<SrndQuery> queries = null;
Token oprt = null; Token oprt = null;
}{ }{
q = NotQuery() q = NotQuery()
( oprt = <AND> { /* keep only last used operator */ ( oprt = <AND> { /* keep only last used operator */
if (queries == null) { if (queries == null) {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); queries.add(q);
} }
} }
@ -298,13 +298,13 @@ SrndQuery AndQuery() : {
SrndQuery NotQuery() : { SrndQuery NotQuery() : {
SrndQuery q; SrndQuery q;
ArrayList queries = null; ArrayList<SrndQuery> queries = null;
Token oprt = null; Token oprt = null;
}{ }{
q = NQuery() q = NQuery()
( oprt = <NOT> { /* keep only last used operator */ ( oprt = <NOT> { /* keep only last used operator */
if (queries == null) { if (queries == null) {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); queries.add(q);
} }
} }
@ -318,12 +318,12 @@ SrndQuery NotQuery() : {
SrndQuery NQuery() : { SrndQuery NQuery() : {
SrndQuery q; SrndQuery q;
ArrayList queries; ArrayList<SrndQuery> queries;
Token dt; Token dt;
}{ }{
q = WQuery() q = WQuery()
( dt = <N> { ( dt = <N> {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); /* left associative */ queries.add(q); /* left associative */
} }
q = WQuery() { q = WQuery() {
@ -337,12 +337,12 @@ SrndQuery NQuery() : {
SrndQuery WQuery() : { SrndQuery WQuery() : {
SrndQuery q; SrndQuery q;
ArrayList queries; ArrayList<SrndQuery> queries;
Token wt; Token wt;
}{ }{
q = PrimaryQuery() q = PrimaryQuery()
( wt = <W> { ( wt = <W> {
queries = new ArrayList(); queries = new ArrayList<SrndQuery>();
queries.add(q); /* left associative */ queries.add(q); /* left associative */
} }
q = PrimaryQuery() { q = PrimaryQuery() {
@ -368,7 +368,7 @@ SrndQuery PrimaryQuery() : { /* bracketed weighted query or weighted term */
SrndQuery PrefixOperatorQuery() : { SrndQuery PrefixOperatorQuery() : {
Token oprt; Token oprt;
List queries; List<SrndQuery> queries;
}{ }{
( oprt = <OR> /* prefix OR */ ( oprt = <OR> /* prefix OR */
queries = FieldsQueryList() queries = FieldsQueryList()
@ -389,9 +389,9 @@ SrndQuery PrefixOperatorQuery() : {
} }
List FieldsQueryList() : { List<SrndQuery> FieldsQueryList() : {
SrndQuery q; SrndQuery q;
ArrayList queries = new ArrayList(); ArrayList<SrndQuery> queries = new ArrayList<SrndQuery>();
}{ }{
<LPAREN> <LPAREN>
q = FieldsQuery() {queries.add(q);} q = FieldsQuery() {queries.add(q);}

View File

@ -45,6 +45,7 @@ import org.apache.lucene.util.LuceneTestCase;
* @deprecated this tests test the deprecated MultiFieldQueryParserWrapper, so * @deprecated this tests test the deprecated MultiFieldQueryParserWrapper, so
* when the latter is gone, so should this test. * when the latter is gone, so should this test.
*/ */
@Deprecated
public class TestMultiFieldQueryParserWrapper extends LuceneTestCase { public class TestMultiFieldQueryParserWrapper extends LuceneTestCase {
/** /**

View File

@ -84,6 +84,7 @@ import org.junit.runner.RunWith;
* deprecated. When QPW is gone, so will the test. * deprecated. When QPW is gone, so will the test.
*/ */
@RunWith(LuceneTestCase.LocalizedTestCaseRunner.class) @RunWith(LuceneTestCase.LocalizedTestCaseRunner.class)
@Deprecated
public class TestQueryParserWrapper extends LuceneTestCase { public class TestQueryParserWrapper extends LuceneTestCase {
public static Analyzer qpAnalyzer = new QPTestAnalyzer(); public static Analyzer qpAnalyzer = new QPTestAnalyzer();

View File

@ -394,7 +394,7 @@ public class TernaryTree implements Cloneable, Serializable {
Iterator iter = new Iterator(); Iterator iter = new Iterator();
while (iter.hasMoreElements()) { while (iter.hasMoreElements()) {
v[i] = iter.getValue(); v[i] = iter.getValue();
k[i++] = (String) iter.nextElement(); k[i++] = iter.nextElement();
} }
init(); init();
insertBalanced(k, v, 0, n); insertBalanced(k, v, 0, n);
@ -551,7 +551,7 @@ public class TernaryTree implements Cloneable, Serializable {
boolean climb = true; boolean climb = true;
while (climb) { while (climb) {
i = (Item) ns.pop(); i = ns.pop();
i.child++; i.child++;
switch (i.child) { switch (i.child) {
case 1: case 1:

View File

@ -73,7 +73,7 @@ public class SynonymMap {
} }
List<Token> superset = currMap.synonyms==null ? replacement : List<Token> superset = currMap.synonyms==null ? replacement :
mergeTokens(Arrays.asList(currMap.synonyms), replacement); mergeTokens(Arrays.asList(currMap.synonyms), replacement);
currMap.synonyms = (Token[])superset.toArray(new Token[superset.size()]); currMap.synonyms = superset.toArray(new Token[superset.size()]);
if (includeOrig) currMap.flags |= INCLUDE_ORIG; if (includeOrig) currMap.flags |= INCLUDE_ORIG;
} }