Author: borges
Date: 2012-01-09 06:18:48 -0500 (Mon, 09 Jan 2012)
New Revision: 12003
Modified:
trunk/etc/findbugs-exclude.xml
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/OperationContext.java
trunk/hornetq-core/src/main/javacc/FilterParser.jj
Log:
Fix and filter findbugs warnings
Modified: trunk/etc/findbugs-exclude.xml
===================================================================
--- trunk/etc/findbugs-exclude.xml 2012-01-09 11:18:25 UTC (rev 12002)
+++ trunk/etc/findbugs-exclude.xml 2012-01-09 11:18:48 UTC (rev 12003)
@@ -38,4 +38,10 @@
<Class name="org.hornetq.utils.MemorySize"/>
<bug pattern="DM_GC"/>
</Match>
+
+ <match>
+ <!-- Ignore naming convention violations in generated code -->
+ <class name="org.hornetq.core.filter.impl.FilterParser"/>
+ <bug pattern="NM_METHOD_NAMING_CONVENTION"/>
+ </match>
</FindBugsFilter>
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/OperationContext.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/OperationContext.java 2012-01-09
11:18:25 UTC (rev 12002)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/OperationContext.java 2012-01-09
11:18:48 UTC (rev 12003)
@@ -17,12 +17,10 @@
import org.hornetq.core.journal.IOCompletion;
/**
- * This represents a set of operations done as part of replication.
- * When the entire set is done a group of Runnables can be executed.
- *
+ * This represents a set of operations done as part of replication.
+ * <p>
+ * When the entire set is done, a group of Runnables can be executed.
* @author <mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
- *
- *
*/
public interface OperationContext extends IOCompletion
{
@@ -34,9 +32,9 @@
void replicationLineUp();
void replicationDone();
-
+
void pageSyncLineUp();
-
+
void pageSyncDone();
void waitCompletion() throws Exception;
Modified: trunk/hornetq-core/src/main/javacc/FilterParser.jj
===================================================================
--- trunk/hornetq-core/src/main/javacc/FilterParser.jj 2012-01-09 11:18:25 UTC (rev
12002)
+++ trunk/hornetq-core/src/main/javacc/FilterParser.jj 2012-01-09 11:18:48 UTC (rev
12003)
@@ -570,7 +570,7 @@
{
literal=<FLOATING_POINT_LITERAL>
{
- return new Double(literal.image);
+ return Double.valueOf(literal.image);
}
|
literal=<INTEGER_LITERAL>
@@ -581,7 +581,7 @@
if (number.endsWith(LOFFER_L) || number.endsWith(UPPER_L))
{
// chop off the suffix
- return new Long(number.substring(0, number.length() - 1));
+ return Long.valueOf(number.substring(0, number.length() - 1));
}
// hex
@@ -596,7 +596,7 @@
if (first >= 8)
{
number = Ox + (first - 8) + number.substring(3);
- return new Long(Long.decode(number).longValue() - Long.MAX_VALUE - 1);
+ return Long.valueOf(Long.decode(number).longValue() - Long.MAX_VALUE -
1);
}
}
}
@@ -612,7 +612,7 @@
if (number.charAt(1) == '1')
{
number = ZERRO + number.substring(2);
- return new Long(Long.decode(number).longValue() - Long.MAX_VALUE - 1);
+ return Long.valueOf(Long.decode(number).longValue() - Long.MAX_VALUE -
1);
}
}
}