Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646
This commit is contained in:
committed by
Juergen Hoeller
parent
224d52e032
commit
4aae6a6dda
@@ -196,8 +196,8 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
|
||||
return allMatches;
|
||||
}
|
||||
MultiValueMap<String, String> result = new LinkedMultiValueMap<>(allMatches.size());
|
||||
for (String sessionId : allMatches.keySet()) {
|
||||
for (String subId : allMatches.get(sessionId)) {
|
||||
allMatches.forEach((sessionId, subIds) -> {
|
||||
for (String subId : subIds) {
|
||||
SessionSubscriptionInfo info = this.subscriptionRegistry.getSubscriptions(sessionId);
|
||||
if (info == null) {
|
||||
continue;
|
||||
@@ -225,7 +225,7 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
|
||||
logger.debug("Failed to evaluate selector", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user