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;
|
return localTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pool == null) {
|
if (policy == null || pool == null) {
|
||||||
return TargetResult.REFUSED_USE_ANOTHER_RESULT;
|
return TargetResult.REFUSED_USE_ANOTHER_RESULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ public final class ConnectionRouterManager implements ActiveMQComponent {
|
||||||
|
|
||||||
policy.init(policyConfig.getProperties());
|
policy.init(policyConfig.getProperties());
|
||||||
|
|
||||||
if (policy.getTargetProbe() != null) {
|
if (pool != null && policy.getTargetProbe() != null) {
|
||||||
pool.addTargetProbe(policy.getTargetProbe());
|
pool.addTargetProbe(policy.getTargetProbe());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,9 +71,11 @@ public class LocalCache implements Cache, RemovalListener<String, String> {
|
||||||
if (persisted) {
|
if (persisted) {
|
||||||
persistedCacheEntries = storageManager.getPersistedKeyValuePairs(id);
|
persistedCacheEntries = storageManager.getPersistedKeyValuePairs(id);
|
||||||
|
|
||||||
for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : persistedCacheEntries.entrySet()) {
|
if (persistedCacheEntries != null) {
|
||||||
cache.put(cacheEntry.getKey(), cacheEntry.getValue().getValue());
|
for (Map.Entry<String, PersistedKeyValuePair> cacheEntry : persistedCacheEntries.entrySet()) {
|
||||||
logger.info(cacheEntry.toString());
|
cache.put(cacheEntry.getKey(), cacheEntry.getValue().getValue());
|
||||||
|
logger.info(cacheEntry.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue