[hornetq-commits] JBoss hornetq SVN: r10633 - in branches/Branch_2_2_EAP/src/main/org/hornetq: utils and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed May 11 12:46:49 EDT 2011
Author: borges
Date: 2011-05-11 12:46:49 -0400 (Wed, 11 May 2011)
New Revision: 10633
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java
Log:
Fix .equals(o) which didn't check for null argument, and another findbugs warning.
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-05-11 16:22:51 UTC (rev 10632)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/QueueImpl.java 2011-05-11 16:46:49 UTC (rev 10633)
@@ -1362,6 +1362,7 @@
{
return true;
}
+ if (!(other instanceof QueueImpl)) return false;
QueueImpl qother = (QueueImpl)other;
@@ -1932,7 +1933,7 @@
if (count == 0)
{
- // Note - we MUST store the delete after the preceeding ack has been committed to storage, we cannot combine
+ // Note - we MUST store the delete after the preceding ack has been committed to storage, we cannot combine
// the last ack and delete into a single delete.
// This is because otherwise we could have a situation where the same message is being acked concurrently
// from two different queues on different sessions.
@@ -1940,8 +1941,8 @@
// ack isn't committed, then the server crashes and on
// recovery the message is deleted even though the other ack never committed
- // also note then when this happens as part of a trasaction its the tx commt of the ack that is important
- // not this
+ // also note then when this happens as part of a transaction it is the tx commit of the ack that is
+ // important not this
// Also note that this delete shouldn't sync to disk, or else we would build up the executor's queue
// as we can't delete each messaging with sync=true while adding messages transactionally.
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java 2011-05-11 16:22:51 UTC (rev 10632)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/utils/TypedProperties.java 2011-05-11 16:46:49 UTC (rev 10633)
@@ -354,10 +354,6 @@
public Float getFloatProperty(final SimpleString key) throws PropertyConversionException
{
Object value = doGetProperty(key);
- if (value == null)
- {
- return Float.valueOf(null);
- }
if (value instanceof Float)
{
@@ -369,7 +365,7 @@
}
else
{
- throw new PropertyConversionException("Invalid conversion");
+ throw new PropertyConversionException("Invalid conversion " + key);
}
}
More information about the hornetq-commits
mailing list