This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e1840d  NO-JIRA Fixing PagingStore not initialized exception during 
shutdown
     new dd4b89d  This closes #3062
4e1840d is described below

commit 4e1840dce298951280f5c8f0eb671f0e25ee8c9f
Author: Clebert Suconic <[email protected]>
AuthorDate: Fri Apr 3 10:41:27 2020 -0400

    NO-JIRA Fixing PagingStore not initialized exception during shutdown
---
 .../apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java   | 2 +-
 .../artemis/core/persistence/impl/nullpm/NullStorageManager.java    | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
index b0d6433..bc036ad 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
@@ -791,7 +791,7 @@ public class PagingStoreImpl implements PagingStore {
                        final ReadLock managerLock) throws Exception {
 
       if (!running) {
-         throw new IllegalStateException("PagingStore(" + getStoreName() + ") 
not initialized");
+         return false;
       }
 
       boolean full = isFull();
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java
index d1a2ebe..72953fa 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java
@@ -572,7 +572,11 @@ public class NullStorageManager implements StorageManager {
        * <p>
        * The reasoning is that exposing the lock is more explicit and 
therefore `less bad`.
        */
-      return store.page(msg, tx, listCtx, null);
+      if (store != null) {
+         return store.page(msg, tx, listCtx, null);
+      } else {
+         return false;
+      }
    }
 
    @Override

Reply via email to