parent
e995668d92
commit
090000c3d2
|
@ -132,17 +132,7 @@ public class SessionRegistryImpl implements SessionRegistry,
|
||||||
sessionIds.put(sessionId,
|
sessionIds.put(sessionId,
|
||||||
new SessionInformation(principal, sessionId, new Date()));
|
new SessionInformation(principal, sessionId, new Date()));
|
||||||
|
|
||||||
Set<String> sessionsUsedByPrincipal = principals.get(principal);
|
Set<String> sessionsUsedByPrincipal = principals.computeIfAbsent(principal, key -> new CopyOnWriteArraySet<>());
|
||||||
|
|
||||||
if (sessionsUsedByPrincipal == null) {
|
|
||||||
sessionsUsedByPrincipal = new CopyOnWriteArraySet<>();
|
|
||||||
Set<String> prevSessionsUsedByPrincipal = principals.putIfAbsent(principal,
|
|
||||||
sessionsUsedByPrincipal);
|
|
||||||
if (prevSessionsUsedByPrincipal != null) {
|
|
||||||
sessionsUsedByPrincipal = prevSessionsUsedByPrincipal;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sessionsUsedByPrincipal.add(sessionId);
|
sessionsUsedByPrincipal.add(sessionId);
|
||||||
|
|
||||||
if (logger.isTraceEnabled()) {
|
if (logger.isTraceEnabled()) {
|
||||||
|
|
Loading…
Reference in New Issue