fix Session#finishInvalidate throwsConcurrentModificationException (#4036)
* fix Session#finishInvalidate throws java.util.ConcurrentModificationException * Change constructor _attribute field must assigned to ConcurrentHashMap Signed-off-by: tomoya-yokota <tomoya-yokota@cybozu.co.jp>
This commit is contained in:
parent
5f83f0a599
commit
c904a14d6a
|
@ -161,11 +161,6 @@ public class SessionData implements Serializable
|
|||
}
|
||||
|
||||
public SessionData(String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs)
|
||||
{
|
||||
this(id, cpath, vhost, created, accessed, lastAccessed, maxInactiveMs, new ConcurrentHashMap<String, Object>());
|
||||
}
|
||||
|
||||
public SessionData(String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs, Map<String, Object> attributes)
|
||||
{
|
||||
_id = id;
|
||||
setContextPath(cpath);
|
||||
|
@ -175,7 +170,13 @@ public class SessionData implements Serializable
|
|||
_lastAccessed = lastAccessed;
|
||||
_maxInactiveMs = maxInactiveMs;
|
||||
calcAndSetExpiry();
|
||||
_attributes = attributes;
|
||||
_attributes = new ConcurrentHashMap<>();
|
||||
}
|
||||
|
||||
public SessionData(String id, String cpath, String vhost, long created, long accessed, long lastAccessed, long maxInactiveMs, Map<String, Object> attributes)
|
||||
{
|
||||
this(id, cpath, vhost, created, accessed, lastAccessed, maxInactiveMs);
|
||||
putAllAttributes(attributes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue