Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
Merged revision(s) 1696080 from lucene/dev/trunk:
Browse files Browse the repository at this point in the history
LUCENE-6740: Reduce warnings emitted by javac #6

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/branch_5x@1696081 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
uschindler committed Aug 15, 2015
1 parent 6a30569 commit 898b327
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ private CharsRef newStem(char buffer[], int length, IntsRef forms, int formID) {

// some state for traversing FSTs
final FST.BytesReader prefixReaders[] = new FST.BytesReader[3];
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked","rawtypes"})
final FST.Arc<IntsRef> prefixArcs[] = new FST.Arc[3];

final FST.BytesReader suffixReaders[] = new FST.BytesReader[3];
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked","rawtypes"})
final FST.Arc<IntsRef> suffixArcs[] = new FST.Arc[3];


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public Query makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)

@Override
public String distanceSubQueryNotAllowed() {
Iterator sqi = getSubQueriesIterator();
Iterator<SrndQuery> sqi = getSubQueriesIterator();
while (sqi.hasNext()) {
SrndQuery leq = (SrndQuery) sqi.next();
SrndQuery leq = sqi.next();
if (leq instanceof DistanceSubQuery) {
String m = ((DistanceSubQuery)leq).distanceSubQueryNotAllowed();
if (m != null) {
Expand All @@ -57,9 +57,10 @@ public String distanceSubQueryNotAllowed() {

@Override
public void addSpanQueries(SpanNearClauseFactory sncf) throws IOException {
Iterator sqi = getSubQueriesIterator();
Iterator<SrndQuery> sqi = getSubQueriesIterator();
while (sqi.hasNext()) {
((DistanceSubQuery)sqi.next()).addSpanQueries(sncf);
SrndQuery s = sqi.next();
((DistanceSubQuery) s).addSpanQueries(sncf);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public boolean equals(Object obj) {
return false;
if (! getClass().equals(obj.getClass()))
return false;
RewriteQuery other = (RewriteQuery)obj;
@SuppressWarnings("unchecked") RewriteQuery<SQ> other = (RewriteQuery<SQ>)obj;
return super.equals(obj)
&& fieldName.equals(other.fieldName)
&& qf.equals(other.qf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ public static void transformCriteria(Properties formProperties, Transformer tran
Element root = doc.createElement("Document");
doc.appendChild(root);

Enumeration keysEnum = formProperties.keys();
Enumeration<?> keysEnum = formProperties.propertyNames();
while (keysEnum.hasMoreElements()) {
String propName = (String) keysEnum.nextElement();
String propName = keysEnum.nextElement().toString();
String value = formProperties.getProperty(propName);
if ((value != null) && (value.length() > 0)) {
DOMUtils.insertChild(root, propName, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,13 @@ public void testDefaultOperator() throws Exception {
@SuppressWarnings("rawtype")
public void testProtectedCtors() throws Exception {
try {
QueryParser.class.getConstructor(new Class[] {CharStream.class});
QueryParser.class.getConstructor(CharStream.class);
fail("please switch public QueryParser(CharStream) to be protected");
} catch (NoSuchMethodException nsme) {
// expected
}
try {
QueryParser.class
.getConstructor(new Class[] {QueryParserTokenManager.class});
QueryParser.class.getConstructor(QueryParserTokenManager.class);
fail("please switch public QueryParser(QueryParserTokenManager) to be protected");
} catch (NoSuchMethodException nsme) {
// expected
Expand Down

0 comments on commit 898b327

Please sign in to comment.