sessionsUsedByPrincipal.remove(sessionId);  if (sessionsUsedByPrincipal.size() == 0) {  principals.remove(info.getPrincipal());
synchronized (sessionsUsedByPrincipal) { sessionsUsedByPrincipal.remove(sessionId);  if (sessionsUsedByPrincipal.size() == 0) {  principals.remove(info.getPrincipal()); }
    public void removeSessionInformation(String sessionId) {        Assert.hasText(sessionId, "SessionId required as per interface contract");        SessionInformation info = getSessionInformation(sessionId);        if (info != null) {            sessionIds.remove(sessionId);            Set sessionsUsedByPrincipal = (Set) principals.get(info                    .getPrincipal());            if (sessionsUsedByPrincipal != null) {                sessionsUsedByPrincipal.remove(sessionId);                                if (sessionsUsedByPrincipal.size() == 0) {                	// No need to keep pbject in principals Map anymore                 	principals.remove(info.getPrincipal());                }            }        }    }