myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sobr...@apache.org
Subject svn commit: r1335819 - /myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
Date Tue, 08 May 2012 23:15:58 GMT
Author: sobryan
Date: Tue May  8 23:15:57 2012
New Revision: 1335819

URL: http://svn.apache.org/viewvc?rev=1335819&view=rev
Log:
TRINIDAD-2112

Modified:
    myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java

Modified: myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java?rev=1335819&r1=1335818&r2=1335819&view=diff
==============================================================================
--- myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
(original)
+++ myfaces/trinidad/branches/2.0.0.x-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RowKeySetAttributeChange.java
Tue May  8 23:15:57 2012
@@ -75,17 +75,6 @@ public final class RowKeySetAttributeCha
 
   private void _updateRowKeySetInPlace(UIComponent component, String attrName, RowKeySet
newValue)
   {
-    // Check whether the remembered RowKeySet object is in a valid state (iterable).
-    try 
-    {
-      newValue.iterator().hasNext();
-    }
-    catch (Exception e) 
-    {
-      _LOG.warning("FAILED_ROWKEYSETATTRIBUTECHANGE", e.getClass());
-      return;
-    }
-
     ValueExpression oldExpression = component.getValueExpression(attrName);
     
     // due to bug in how the trinidad table and tree handle their RowKeySets, always use
@@ -109,7 +98,7 @@ public final class RowKeySetAttributeCha
     {
       _expression = expression;
       _attributeName = attributeName;
-      _newKeySet = newKeySet;
+      _newKeySet  = newKeySet;
     }
     
     public void invokeContextCallback(FacesContext context,
@@ -138,11 +127,19 @@ public final class RowKeySetAttributeCha
         {
           RowKeySet oldKeySet = (RowKeySet)oldValue;
           
-          oldKeySet.clear();
-          
-          if (_newKeySet != null)
+          try
+          {
+            oldKeySet.clear();
+            
+            if (_newKeySet != null)
+            {
+              oldKeySet.addAll(_newKeySet);
+            }
+          }
+          catch (Exception e)
           {
-            oldKeySet.addAll(_newKeySet);
+            _LOG.warning("FAILED_ROWKEYSETATTRIBUTECHANGE", e);
+            return;
           }
         }
         else
@@ -160,6 +157,5 @@ public final class RowKeySetAttributeCha
 
   private static final long serialVersionUID = 1L;
   static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(RowKeySetAttributeChange.class);
-  
   private final String _clientId;
 }



Mime
View raw message