activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r1326692 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Date Mon, 16 Apr 2012 17:34:00 GMT
Author: rajdavies
Date: Mon Apr 16 17:34:00 2012
New Revision: 1326692

URL: http://svn.apache.org/viewvc?rev=1326692&view=rev
Log:
Fix for https://issues.apache.org/jira/browse/AMQ-3804

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java?rev=1326692&r1=1326691&r2=1326692&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java
Mon Apr 16 17:34:00 2012
@@ -2002,12 +2002,14 @@ public abstract class MessageDatabase ex
 
                 // Check if the message is reference by any other subscription.
                 Long count = sd.messageReferences.get(messageSequence);
+                if (count != null){
                 long references = count.longValue() - 1;
-                if (references > 0) {
-                    sd.messageReferences.put(messageSequence, Long.valueOf(references));
-                    return;
-                } else {
-                    sd.messageReferences.remove(messageSequence);
+                    if (references > 0) {
+                        sd.messageReferences.put(messageSequence, Long.valueOf(references));
+                        return;
+                    } else {
+                        sd.messageReferences.remove(messageSequence);
+                    }
                 }
 
                 // Find all the entries that need to get deleted.



Mime
View raw message