[hornetq-commits] JBoss hornetq SVN: r12209 - in branches/Branch_2_2_AS7/src/main/org/hornetq/core: config/impl and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Feb 27 15:35:45 EST 2012
Author: clebert.suconic at jboss.com
Date: 2012-02-27 15:35:44 -0500 (Mon, 27 Feb 2012)
New Revision: 12209
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java
Log:
JBPAPP-8246 - Possible (unlikely though) NPE on validators
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:32:06 UTC (rev 12208)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-02-27 20:35:44 UTC (rev 12209)
@@ -1909,7 +1909,7 @@
private void doCleanup(boolean failingOver)
{
- if (remotingConnection == null)
+ if (remotingConnection != null)
{
remotingConnection.removeFailureListener(this);
}
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java 2012-02-27 20:32:06 UTC (rev 12208)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/config/impl/Validators.java 2012-02-27 20:35:44 UTC (rev 12209)
@@ -69,7 +69,7 @@
public void validate(final String name, final Object value)
{
Number val = (Number)value;
- if (val != null && val.intValue() < 0 || val.intValue() > 100)
+ if (val != null && (val.intValue() < 0 || val.intValue() > 100))
{
throw new IllegalArgumentException(String.format("%s must be a valid percentual value between 0 and 100 (actual value: %s)",
name,
More information about the hornetq-commits
mailing list