You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2012/09/02 00:25:19 UTC

svn commit: r1379878 - /myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java

Author: lu4242
Date: Sat Sep  1 22:25:19 2012
New Revision: 1379878

URL: http://svn.apache.org/viewvc?rev=1379878&view=rev
Log:
small improvement remove unused var componentFoundInserted

Modified:
    myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java

Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java?rev=1379878&r1=1379877&r2=1379878&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java (original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java Sat Sep  1 22:25:19 2012
@@ -87,7 +87,6 @@ final class UIInstructionHandler extends
             // grab our component
             UIComponent c = null;
             FaceletCompositionContext mctx= FaceletCompositionContext.getCurrentInstance(ctx);
-            boolean componentFoundInserted = false;
             
             if (mctx.isRefreshingSection())
             {
@@ -151,31 +150,25 @@ final class UIInstructionHandler extends
             if (componentFound)
             {
                 mctx.finalizeForDeletion(c);
-                if (!componentFoundInserted)
-                {
-                    if (mctx.isRefreshingSection())
-                    {
-                        ctx.getFacesContext().setProcessingEvents(false); 
-                    }
-                    parent.getChildren().remove(c);
-                    if (mctx.isRefreshingSection())
-                    {
-                        ctx.getFacesContext().setProcessingEvents(oldProcessingEvents);
-                    }
-                }
-            }
-            if (!componentFoundInserted)
-            {
-                if (componentFound && mctx.isRefreshingSection())
+                if (mctx.isRefreshingSection())
                 {
                     ctx.getFacesContext().setProcessingEvents(false); 
                 }
-                this.addComponent(ctx, parent, c);
-                if (componentFound && mctx.isRefreshingSection())
+                parent.getChildren().remove(c);
+                if (mctx.isRefreshingSection())
                 {
                     ctx.getFacesContext().setProcessingEvents(oldProcessingEvents);
                 }
             }
+            if (componentFound && mctx.isRefreshingSection())
+            {
+                ctx.getFacesContext().setProcessingEvents(false); 
+            }
+            this.addComponent(ctx, parent, c);
+            if (componentFound && mctx.isRefreshingSection())
+            {
+                ctx.getFacesContext().setProcessingEvents(oldProcessingEvents);
+            }
         }
     }