myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sobr...@apache.org
Subject svn commit: r1078869 - /myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/BaseChangeManager.java
Date Mon, 07 Mar 2011 17:58:04 GMT
Author: sobryan
Date: Mon Mar  7 17:58:04 2011
New Revision: 1078869

URL: http://svn.apache.org/viewvc?rev=1078869&view=rev
Log:
TRINIDAD-2051: Committed path by Marcus Dreher.

Thanks Marcus!

Modified:
    myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/BaseChangeManager.java

Modified: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/BaseChangeManager.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/BaseChangeManager.java?rev=1078869&r1=1078868&r2=1078869&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/BaseChangeManager.java
(original)
+++ myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/BaseChangeManager.java
Mon Mar  7 17:58:04 2011
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -49,20 +49,20 @@ abstract class BaseChangeManager extends
     UIComponent uiComponent,
     ComponentChange change)
   {
-    // if our component is a stamped component by UIXIterator, we 
-    // don't want to persist the changes 
+    // if our component is a stamped component by UIXIterator, we
+    // don't want to persist the changes
     UIComponent parent = uiComponent.getParent();
     UIComponent root = facesContext.getViewRoot();
-    while (parent != root) 
+    while (parent != null && parent != root)
     {
-      if (parent.getClass() == UIXIterator.class) 
+      if (parent.getClass() == UIXIterator.class)
       {
-        _LOG.info("DONT_PERSIST_STAMPED_COMPONENT_INSIDE_ITERATOR");      
+        _LOG.info("DONT_PERSIST_STAMPED_COMPONENT_INSIDE_ITERATOR");
         return;
       }
-      parent = parent.getParent();      
+      parent = parent.getParent();
     }
-    
+
     if (facesContext == null || uiComponent == null || change == null)
       throw new IllegalArgumentException(_LOG.getMessage(
         "CANNOT_ADD_CHANGE_WITH_FACECONTEXT_OR_UICOMPONENT_OR_NULL"));
@@ -95,7 +95,7 @@ abstract class BaseChangeManager extends
    * A no-op implementation of adding a ComponentChange. Sub-classers should
    * override and provide an implementation if they support component changes.
    * @param facesContext The FacesContext for this request.
-   * @param targetComponent The target component against which this change needs 
+   * @param targetComponent The target component against which this change needs
    * to be registered and applied later on.
    * @param componentChange The ComponentChange to add
    */
@@ -123,7 +123,7 @@ abstract class BaseChangeManager extends
    * in order to enable  Document-based Persistence
    */
   protected abstract Document getDocument(FacesContext context);
-  
+
   /**
    *  Returns true if we can support Document-based Persistence
    *  in this ChangeManager.  Subclassers adding Document-based Persistence



Mime
View raw message