Session attributes were only partially changed from Hashtable to ConcurrentHashMap.
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 9 Mar 2011 17:09:50 +0000 (17:09 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 9 Mar 2011 17:09:50 +0000 (17:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1079891 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/ha/session/DeltaSession.java
java/org/apache/catalina/session/StandardSession.java

index 161e784..6ec35ee 100644 (file)
@@ -28,6 +28,7 @@ import java.io.Serializable;
 import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Hashtable;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -674,7 +675,7 @@ public class DeltaSession extends StandardSession implements Externalizable,Clus
         if (log.isDebugEnabled()) log.debug(sm.getString("deltaSession.readSession", id));
 
         // Deserialize the attribute count and attribute values
-        if (attributes == null) attributes = new Hashtable<String, Object>();
+        if (attributes == null) attributes = new ConcurrentHashMap<String, Object>();
         int n = ( (Integer) stream.readObject()).intValue();
         boolean isValidSave = isValid;
         isValid = true;
index 72063b7..a418ce5 100644 (file)
@@ -1578,7 +1578,7 @@ public class StandardSession implements HttpSession, Session, Serializable {
 
         // Deserialize the attribute count and attribute values
         if (attributes == null)
-            attributes = new Hashtable<String, Object>();
+            attributes = new ConcurrentHashMap<String, Object>();
         int n = ((Integer) stream.readObject()).intValue();
         boolean isValidSave = isValid;
         isValid = true;