From b8add9f2c48303cfaaa86bd86624ecf3d9b12627 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Mon, 29 Jun 2020 13:43:06 -0500 Subject: [PATCH] ARTEMIS-2830 NPE in XML exporter --- .../cli/commands/tools/xml/XmlDataExporter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java index 08ffec3690..1daf213627 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/xml/XmlDataExporter.java @@ -276,10 +276,12 @@ public final class XmlDataExporter extends DBOption { for (RecordInfo info : acks) { AckDescribe ack = (AckDescribe) DescribeJournal.newObjectEncoding(info, null); HashMap referenceDescribeHashMap = messageRefs.get(info.id); - referenceDescribeHashMap.remove(ack.refEncoding.queueID); - if (referenceDescribeHashMap.size() == 0) { - messages.remove(info.id); - messageRefs.remove(info.id); + if (referenceDescribeHashMap != null) { + referenceDescribeHashMap.remove(ack.refEncoding.queueID); + if (referenceDescribeHashMap.size() == 0) { + messages.remove(info.id); + messageRefs.remove(info.id); + } } } }