You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2011/05/20 17:58:10 UTC

svn commit: r1125441 - /myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java

Author: martinkoci
Date: Fri May 20 15:58:10 2011
New Revision: 1125441

URL: http://svn.apache.org/viewvc?rev=1125441&view=rev
Log:
MYFACES-3130 [PERF] Avoid unnecessary AbstractList$Itr instances

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java?rev=1125441&r1=1125440&r2=1125441&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIForm.java Fri May 20 15:58:10 2011
@@ -264,11 +264,10 @@ public class UIForm extends UIComponentB
                                     }
                                 }
                             }
-                            if (getChildCount() > 0) {
-                                for (UIComponent child : getChildren()) {
-                                    if (child.visitTree(context, callback)) {
-                                        return true;
-                                    }
+                            for (int i = 0, childCount = getChildCount(); i < childCount; i++) {
+                                UIComponent child = getChildren().get(i);
+                                if (child.visitTree(context, callback)) {
+                                    return true;
                                 }
                             }
                         }