AMQ-6901 - Add NPE check inside DestinationMap filter

This commit is contained in:
Christopher L. Shannon (cshannon) 2018-02-16 14:32:24 -05:00
parent 2ce1c1352f
commit 703b7b1510
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}