From 703b7b151017fe117363e5598146e157bad78265 Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Fri, 16 Feb 2018 14:32:24 -0500 Subject: [PATCH] AMQ-6901 - Add NPE check inside DestinationMap filter --- .../main/java/org/apache/activemq/filter/DestinationMap.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java b/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java index 208ed670c1..624b10fa7e 100644 --- a/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java +++ b/activemq-client/src/main/java/org/apache/activemq/filter/DestinationMap.java @@ -231,6 +231,10 @@ public class DestinationMap { @SuppressWarnings("rawtypes") //Used to filter out any child/unmatching entries private boolean isMatchOrParent(final ActiveMQDestination destination, final DestinationMapEntry entry) { + //If destination not set then do not filter out + if (entry.getDestination() == null) { + return true; + } final DestinationFilter filter = DestinationFilter.parseFilter(entry.getDestination()); return destination.equals(entry.getDestination()) || filter.matches(destination); }