mirror of https://github.com/apache/activemq.git
AMQ-8012 - Move synchronized block after null check
This commit is contained in:
parent
62f5576fe5
commit
0a189f833e
|
@ -276,8 +276,8 @@ public class SubQueueSelectorCacheBroker extends BrokerFilter implements Runnabl
|
|||
@SuppressWarnings("unchecked")
|
||||
public Set<String> getSelectorsForDestination(String destinationName) {
|
||||
final Set<String> cachedSelectors = subSelectorCache.get(destinationName);
|
||||
synchronized(cachedSelectors) {
|
||||
if (cachedSelectors != null) {
|
||||
if (cachedSelectors != null) {
|
||||
synchronized(cachedSelectors) {
|
||||
return new HashSet<>(cachedSelectors);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue