You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2010/05/20 18:06:48 UTC
svn commit: r946681 -
/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
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();
}