myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1379878 - /myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java
Date Sat, 01 Sep 2012 22:25:19 GMT
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);
+            }
         }
     }
 



Mime
View raw message