You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Chandesris (JIRA)" <ji...@apache.org> on 2019/02/12 10:49:00 UTC

[jira] [Commented] (SHIRO-649) 内存介质更新Session时不起作用

    [ https://issues.apache.org/jira/browse/SHIRO-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765919#comment-16765919 ] 

Chandesris commented on SHIRO-649:
----------------------------------

Memory media does not work when updating Session

不 - not

> 内存介质更新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
>            Priority: Major
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> 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)