You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2020/03/13 12:53:13 UTC

[activemq-artemis] branch master updated: ARTEMIS-2656 NPE with read-whole-page == true

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 2025cbb  ARTEMIS-2656 NPE with read-whole-page == true
     new 64d3cd5  This closes #3016
2025cbb is described below

commit 2025cbbfd036d71e4de8bade47d57ef888d14cf9
Author: Francesco Nigro <ni...@gmail.com>
AuthorDate: Fri Mar 13 13:51:37 2020 +0100

    ARTEMIS-2656 NPE with read-whole-page == true
---
 .../artemis/core/paging/cursor/impl/PageCursorProviderImpl.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
index 8f3987c..1990633 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
@@ -562,7 +562,9 @@ public class PageCursorProviderImpl implements PageCursorProvider {
             synchronized (softCache) {
                long pageId = (long) depagedPage.getPageId();
                softCache.remove(pageId);
-               numberOfMessages.remove(pageId);
+               if (numberOfMessages != null) {
+                  numberOfMessages.remove(pageId);
+               }
             }
             onDeletePage(depagedPage);
          }