From 722258e19664b96e073410f0bd86f4abc75e3d84 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Mon, 1 Feb 2010 18:09:32 +0000 Subject: [PATCH] resolve: https://issues.apache.org/activemq/browse/AMQ-2589 - add null check git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@905349 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/store/kahadb/MessageDatabase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java index 805b5218a6..b5b6279ac6 100644 --- a/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java +++ b/activemq-core/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java @@ -878,7 +878,9 @@ public class MessageDatabase implements BrokerServiceAware { Long sequenceId = sd.messageIdIndex.remove(tx, command.getMessageId()); if (sequenceId != null) { MessageKeys keys = sd.orderIndex.remove(tx, sequenceId); - sd.locationIndex.remove(tx, keys.location); + if (keys != null) { + sd.locationIndex.remove(tx, keys.location); + } } } else { // In the topic case we need remove the message once it's been acked