myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1621869 - /myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
Date Mon, 01 Sep 2014 19:24:18 GMT
Author: lu4242
Date: Mon Sep  1 19:24:18 2014
New Revision: 1621869

URL: http://svn.apache.org/r1621869
Log:
MYFACES-3921 NullPointerException at SerializedViewCollection

Modified:
    myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java

Modified: myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java?rev=1621869&r1=1621868&r2=1621869&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
(original)
+++ myfaces/core/branches/2.1.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SerializedViewCollection.java
Mon Sep  1 19:24:18 2014
@@ -126,7 +126,12 @@ class SerializedViewCollection implement
                         !ServerSideStateCacheImpl.CACHE_OLD_VIEWS_IN_SESSION_MODE_OFF.
                                 equals( getCacheOldViewsInSessionMode(context)) )
                     {
-                        getOldSerializedViewsMap().put(keyToRemove, _serializedViews.remove(keyToRemove));
+                        Object removedValue = _serializedViews.remove(keyToRemove);
+                        if (removedValue == null)
+                        {
+                            removedValue = EMPTY_STATES;
+                        }
+                        getOldSerializedViewsMap().put(keyToRemove, removedValue);
                     }
                     else
                     {
@@ -158,8 +163,12 @@ class SerializedViewCollection implement
                 !ServerSideStateCacheImpl.CACHE_OLD_VIEWS_IN_SESSION_MODE_OFF.
                         equals( getCacheOldViewsInSessionMode( context )))
             {
-
-                getOldSerializedViewsMap().put(key, _serializedViews.remove(key));
+                Object removedValue = _serializedViews.remove(key);
+                if (removedValue == null)
+                {
+                    removedValue = EMPTY_STATES;
+                }
+                getOldSerializedViewsMap().put(key, removedValue);
             }
             else
             {



Mime
View raw message