ARTEMIS-2830 NPE in XML exporter

This commit is contained in:
Justin Bertram 2020-06-29 13:43:06 -05:00 committed by Clebert Suconic
parent 3250e5b954
commit b8add9f2c4
1 changed files with 6 additions and 4 deletions

View File

@ -276,10 +276,12 @@ public final class XmlDataExporter extends DBOption {
for (RecordInfo info : acks) {
AckDescribe ack = (AckDescribe) DescribeJournal.newObjectEncoding(info, null);
HashMap<Long, ReferenceDescribe> 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);
}
}
}
}