ARTEMIS-3816 Fix connection router null pointer dereferences
This commit is contained in:
parent
d433f3bc3f
commit
7a03f58be9
|
@ -176,7 +176,7 @@ public class ConnectionRouter implements ActiveMQComponent {
|
|||
return localTarget;
|
||||
}
|
||||
|
||||
if (pool == null) {
|
||||
if (policy == null || pool == null) {
|
||||
return TargetResult.REFUSED_USE_ANOTHER_RESULT;
|
||||
}
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ public final class ConnectionRouterManager implements ActiveMQComponent {
|
|||
|
||||
policy.init(policyConfig.getProperties());
|
||||
|
||||
if (policy.getTargetProbe() != null) {
|
||||
if (pool != null && policy.getTargetProbe() != null) {
|
||||
pool.addTargetProbe(policy.getTargetProbe());
|
||||
}
|
||||
|
||||
|
|
|
@ -71,11 +71,13 @@ public class LocalCache implements Cache, RemovalListener<String, String> {
|
|||
if (persisted) {
|
||||
persistedCacheEntries = storageManager.getPersistedKeyValuePairs(id);
|
||||
|
||||
if (persistedCacheEntries != null) {
|
||||
for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : persistedCacheEntries.entrySet()) {
|
||||
cache.put(cacheEntry.getKey(), cacheEntry.getValue().getValue());
|
||||
logger.info(cacheEntry.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
running = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue