You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2011/05/09 13:08:15 UTC

svn commit: r1100959 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java

Author: gtully
Date: Mon May  9 11:08:14 2011
New Revision: 1100959

URL: http://svn.apache.org/viewvc?rev=1100959&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3305 - fix regression, only ask store for size while we are active, such that we don't get errors on stop

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java?rev=1100959&r1=1100958&r2=1100959&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java Mon May  9 11:08:14 2011
@@ -62,7 +62,9 @@ public abstract class AbstractStoreCurso
     }
 
     protected void resetSize() {
-        this.size = getStoreSize();
+        if (isStarted()) {
+            this.size = getStoreSize();
+        }
         this.storeHasMessages=this.size > 0;
     }