[hornetq-commits] JBoss hornetq SVN: r10730 - trunk/hornetq-core/src/main/javacc.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed May 25 13:45:26 EDT 2011
Author: borges
Date: 2011-05-25 13:45:26 -0400 (Wed, 25 May 2011)
New Revision: 10730
Modified:
trunk/hornetq-core/src/main/javacc/FilterParser.jj
Log:
Avoid using raw types.
Modified: trunk/hornetq-core/src/main/javacc/FilterParser.jj
===================================================================
--- trunk/hornetq-core/src/main/javacc/FilterParser.jj 2011-05-25 17:32:12 UTC (rev 10729)
+++ trunk/hornetq-core/src/main/javacc/FilterParser.jj 2011-05-25 17:45:26 UTC (rev 10730)
@@ -34,6 +34,7 @@
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.filter.impl.SimpleStringReader;
+// CHECKSTYLE:OFF
/**
* A JavaCC 2.0 grammar for HornetQ filters
*
@@ -49,7 +50,7 @@
private static final String Ox = "0x";
private static final String ZERRO = "0";
- private Map identifierMap;
+ private Map<SimpleString, Identifier> identifierMap;
public FilterParser()
{
@@ -58,13 +59,13 @@
this(new StringReader(""));
}
- public Object parse(SimpleString selector, Map identifierMap)
+ public Object parse(SimpleString selector, Map<SimpleString, Identifier> identifierMap)
throws ParseException
{
return parse(selector, identifierMap, false);
}
- public Object parse(SimpleString selector, Map identifierMap, boolean trace)
+ public Object parse(SimpleString selector, Map<SimpleString, Identifier> identifierMap, boolean trace)
throws ParseException
{
SimpleStringReader sr = new SimpleStringReader(selector);
@@ -112,13 +113,13 @@
return new SimpleString(result.toString());
}
- public static Object doParse(SimpleString selector, Map identifierMap)
+ public static Object doParse(SimpleString selector, Map<SimpleString, Identifier> identifierMap)
throws ParseException
{
return doParse(selector, identifierMap, false);
}
- public static Object doParse(SimpleString selector, Map identifierMap, boolean trace)
+ public static Object doParse(SimpleString selector, Map<SimpleString, Identifier> identifierMap, boolean trace)
throws ParseException
{
FilterParser parser = new FilterParser();
@@ -334,7 +335,7 @@
}
|
LOOKAHEAD(2147483647)
- id=identifier() [ not=<NOT> ] <IN> <LPAREN> { set = new HashSet(); } stringList(set) <RPAREN>
+ id=identifier() [ not=<NOT> ] <IN> <LPAREN> { set = new HashSet<SimpleString>(); } stringList(set) <RPAREN>
{
if (not == null)
return new Operator(Operator.IN, id, set);
@@ -399,14 +400,14 @@
}
}
-void stringList(Set set) :
+void stringList(Set<SimpleString> set) :
{
}
{
stringToken(set) ( <COMMA> stringToken(set))*
}
-void stringToken(Set set) :
+void stringToken(Set<SimpleString> set) :
{
Token t = null;
}
@@ -626,7 +627,7 @@
id=<IDENTIFIER>
{
SimpleString simage = new SimpleString(id.image);
- Identifier identifier = (Identifier) identifierMap.get(simage);
+ Identifier identifier = identifierMap.get(simage);
if (identifier == null)
{
identifier = new Identifier(simage);
@@ -635,3 +636,4 @@
return identifier;
}
}
+// CHECKSTYLE:ON
More information about the hornetq-commits
mailing list