shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bing.jj.fly (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SHIRO-649) 内存介质更新Session时不起作用
Date Thu, 12 Jul 2018 10:00:04 GMT
bing.jj.fly created SHIRO-649:
---------------------------------

             Summary: 内存介质更新Session时不起作用
                 Key: SHIRO-649
                 URL: https://issues.apache.org/jira/browse/SHIRO-649
             Project: Shiro
          Issue Type: Bug
          Components: RememberMe
    Affects Versions: 1.4.0-RC2
            Reporter: bing.jj.fly


MemorySessionDAO

private ConcurrentMap<Serializable, Session> sessions;

public MemorySessionDAO() {
	this.sessions = new ConcurrentHashMap<Serializable, Session>();
}

protected Session storeSession(Serializable id, Session session) {
	if (id == null) {
		throw new NullPointerException("id argument cannot be null.");
	}
	return sessions.putIfAbsent(id, session);
}

sessions.putIfAbsent(id, session)不存在的时候才会put值,当更新Session时不起作用



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message