diff --git a/core/src/main/java/org/springframework/security/core/session/SessionRegistryImpl.java b/core/src/main/java/org/springframework/security/core/session/SessionRegistryImpl.java index 809eb0c370..e4464bdf45 100644 --- a/core/src/main/java/org/springframework/security/core/session/SessionRegistryImpl.java +++ b/core/src/main/java/org/springframework/security/core/session/SessionRegistryImpl.java @@ -48,13 +48,23 @@ public class SessionRegistryImpl implements SessionRegistry, protected final Log logger = LogFactory.getLog(SessionRegistryImpl.class); /** */ - private final ConcurrentMap> principals = new ConcurrentHashMap>(); + private final ConcurrentMap> principals; /** */ - private final Map sessionIds = new ConcurrentHashMap(); + private final Map sessionIds; // ~ Methods // ======================================================================================================== + public SessionRegistryImpl() { + this.principals = new ConcurrentHashMap>(); + this.sessionIds = new ConcurrentHashMap(); + } + + public SessionRegistryImpl(ConcurrentMap> principals,Map sessionIds) { + this.principals=principals; + this.sessionIds=sessionIds; + } + public List getAllPrincipals() { return new ArrayList(principals.keySet()); }