SEC-543: sessionsUsedByPrincipal only needs to be added to "principals" map when it is first created.
This commit is contained in:
parent
379b7ab337
commit
e37d0b0bb1
|
@ -132,12 +132,11 @@ public class SessionRegistryImpl implements SessionRegistry, ApplicationListener
|
||||||
Set sessionsUsedByPrincipal = (Set) principals.get(principal);
|
Set sessionsUsedByPrincipal = (Set) principals.get(principal);
|
||||||
|
|
||||||
if (sessionsUsedByPrincipal == null) {
|
if (sessionsUsedByPrincipal == null) {
|
||||||
sessionsUsedByPrincipal = Collections.synchronizedSet(new HashSet());
|
sessionsUsedByPrincipal = Collections.synchronizedSet(new HashSet(4));
|
||||||
}
|
principals.put(principal, sessionsUsedByPrincipal);
|
||||||
|
}
|
||||||
|
|
||||||
sessionsUsedByPrincipal.add(sessionId);
|
sessionsUsedByPrincipal.add(sessionId);
|
||||||
|
|
||||||
principals.put(principal, sessionsUsedByPrincipal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeSessionInformation(String sessionId) {
|
public void removeSessionInformation(String sessionId) {
|
||||||
|
|
Loading…
Reference in New Issue