Protect against NPE in DefaultSubscriptionRegistry
Follow-up fix on the recent commit: https://github.com/spring-projects/spring-framework/commit/44c31a Issue: SPR-15543
This commit is contained in:
parent
b64de87a6b
commit
b6e252495a
|
|
@ -293,7 +293,8 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
|
||||||
if (getPathMatcher().match(destination, cachedDestination)) {
|
if (getPathMatcher().match(destination, cachedDestination)) {
|
||||||
LinkedMultiValueMap<String, String> subs = entry.getValue();
|
LinkedMultiValueMap<String, String> subs = entry.getValue();
|
||||||
// Subscription id's may also be populated via getSubscriptions()
|
// Subscription id's may also be populated via getSubscriptions()
|
||||||
if (!subs.containsKey(sessionId) || !subs.get(sessionId).contains(subsId)) {
|
List<String> subsForSession = subs.get(sessionId);
|
||||||
|
if (subsForSession == null || !subsForSession.contains(subsId)) {
|
||||||
subs.add(sessionId, subsId);
|
subs.add(sessionId, subsId);
|
||||||
this.accessCache.put(cachedDestination, subs.deepCopy());
|
this.accessCache.put(cachedDestination, subs.deepCopy());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue