From d5813be3608894b015fe1704643076dd07a8afdb Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 9 May 2011 11:08:14 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1100959 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/broker/region/cursors/AbstractStoreCursor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java index 00ca38509e..4d8313c4c8 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/AbstractStoreCursor.java @@ -62,7 +62,9 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i } protected void resetSize() { - this.size = getStoreSize(); + if (isStarted()) { + this.size = getStoreSize(); + } this.storeHasMessages=this.size > 0; }