Merge pull request #1034 from jbonofre/AMQ-9233

[AMQ-9233] Prevent NPE in SubQueueSelectorCacheBroker
This commit is contained in:
JB Onofré 2023-06-24 06:22:04 +02:00 committed by GitHub
commit 251577cf61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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