Add Null check when CHANGE_SESSION_ID message received.
authorkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 6 Aug 2010 05:56:21 +0000 (05:56 +0000)
committerkfujino <kfujino@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 6 Aug 2010 05:56:21 +0000 (05:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@982877 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/ha/session/DeltaManager.java
webapps/docs/changelog.xml

index 90c28f1..59f0ecc 100644 (file)
@@ -1436,13 +1436,15 @@ public class DeltaManager extends ClusterManagerBase{
     protected void handleCHANGE_SESSION_ID(SessionMessage msg,Member sender) throws IOException {
         counterReceive_EVT_CHANGE_SESSION_ID++;
         DeltaSession session = (DeltaSession) findSession(msg.getSessionID());
-        String newSessionID = deserializeSessionId(msg.getSession());
-        session.setPrimarySession(false);
-        if(notifySessionListenersOnReplication) {
-            session.setId(newSessionID);
-        } else {
-            session.setIdInternal(newSessionID);
-            add(session);
+        if (session != null) {
+            String newSessionID = deserializeSessionId(msg.getSession());
+            session.setPrimarySession(false);
+            if (notifySessionListenersOnReplication) {
+                session.setId(newSessionID);
+            } else {
+                session.setIdInternal(newSessionID);
+                add(session);
+            }
         }
     }
 
index 166dd06..8a02c41 100644 (file)
@@ -63,6 +63,9 @@
         If you send session to only same domain, use DomainFilterInterceptor. 
         (kfujino)
       </fix>
+      <fix>
+        Add Null check when CHANGE_SESSION_ID message received. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Web applications">