mirror of https://github.com/apache/activemq.git
[AMQ-9233] Prevent NPE in SubQueueSelectorCacheBroker
(cherry picked from commit 95e3c2a1aa
)
This commit is contained in:
parent
9f32f98eff
commit
2383a06b20
|
@ -180,7 +180,7 @@ public class SubQueueSelectorCacheBroker extends BrokerFilter implements Runnabl
|
|||
if (singleSelectorPerDestination) {
|
||||
String destinationName = info.getDestination().getQualifiedName();
|
||||
Set<String> selectors = subSelectorCache.get(destinationName);
|
||||
if (info.getSelector() == null && selectors.size() > 1) {
|
||||
if (info.getSelector() == null && (selectors != null && selectors.size() > 1)) {
|
||||
boolean removed = selectors.remove(MATCH_EVERYTHING);
|
||||
LOG.debug("A non-selector consumer has dropped. Removing the catchall matching pattern 'TRUE'. Successful? " + removed);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue