SEC-543: sessionsUsedByPrincipal only needs to be added to "principals" map when it is first created.

This commit is contained in:
Luke Taylor 2008-01-29 16:28:17 +00:00
parent 379b7ab337
commit e37d0b0bb1
1 changed files with 3 additions and 4 deletions

View File

@ -132,12 +132,11 @@ public class SessionRegistryImpl implements SessionRegistry, ApplicationListener
Set sessionsUsedByPrincipal = (Set) principals.get(principal);
if (sessionsUsedByPrincipal == null) {
sessionsUsedByPrincipal = Collections.synchronizedSet(new HashSet());
}
sessionsUsedByPrincipal = Collections.synchronizedSet(new HashSet(4));
principals.put(principal, sessionsUsedByPrincipal);
}
sessionsUsedByPrincipal.add(sessionId);
principals.put(principal, sessionsUsedByPrincipal);
}
public void removeSessionInformation(String sessionId) {