ARTEMIS-332 Fixing possible NPE on Paging
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b8280879 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b8280879 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b8280879 Branch: refs/heads/master Commit: b82808797ea9fd9d49426fd27aaf8b7819ca630f Parents: 74245a5 Author: Clebert Suconic <clebertsuco...@apache.org> Authored: Wed Jan 13 14:07:07 2016 -0500 Committer: Clebert Suconic <clebertsuco...@apache.org> Committed: Wed Jan 13 15:04:11 2016 -0500 ---------------------------------------------------------------------- .../artemis/core/paging/cursor/impl/PageSubscriptionImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b8280879/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java index 243dcb6..3b74b76 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java @@ -1271,9 +1271,9 @@ final class PageSubscriptionImpl implements PageSubscription { deliveredCount.incrementAndGet(); PagedReference delivery = currentDelivery; if (delivery != null) { - PageCursorInfo info = PageSubscriptionImpl.this.getPageInfo(currentDelivery.getPosition()); + PageCursorInfo info = PageSubscriptionImpl.this.getPageInfo(delivery.getPosition()); if (info != null) { - info.remove(currentDelivery.getPosition()); + info.remove(delivery.getPosition()); } } }