activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r946681 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
Date Thu, 20 May 2010 16:06:48 GMT
Author: rajdavies
Date: Thu May 20 16:06:48 2010
New Revision: 946681

URL: http://svn.apache.org/viewvc?rev=946681&view=rev
Log:
Fix null pointer exception in doStop()

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java?rev=946681&r1=946680&r2=946681&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
Thu May 20 16:06:48 2010
@@ -182,8 +182,12 @@ public class KahaDBStore extends Message
 
     @Override
     public void doStop(ServiceStopper stopper) throws Exception {
-        this.queueSemaphore.drainPermits();
-        this.topicSemaphore.drainPermits();
+        if (this.queueSemaphore != null) {
+            this.queueSemaphore.drainPermits();
+        }
+        if (this.topicSemaphore != null) {
+            this.topicSemaphore.drainPermits();
+        }
         if (this.queueExecutor != null) {
             this.queueExecutor.shutdownNow();
         }



Mime
View raw message