Author: hlship
Date: Tue Jan 13 09:54:26 2009
New Revision: 734198

URL: http://svn.apache.org/viewvc?rev=734198&view=rev
Log:
TAP5-449: @CleanupRender Render phase methods not always invoked

Added:
    
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RenderPhaseCheck.java
Modified:
    tapestry/tapestry5/branches/5.0/quickstart/quickstart.iml
    
tapestry/tapestry5/branches/5.0/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
    
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/log4j.properties
    tapestry/tapestry5/branches/5.0/tapestry-project.ipr
    tapestry/tapestry5/branches/5.0/tapestry-tutorial1/tutorial1.iml

Modified: tapestry/tapestry5/branches/5.0/quickstart/quickstart.iml
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/quickstart/quickstart.iml?rev=734198&r1=734197&r2=734198&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.0/quickstart/quickstart.iml (original)
+++ tapestry/tapestry5/branches/5.0/quickstart/quickstart.iml Tue Jan 13 
09:54:26 2009
@@ -9,6 +9,5 @@
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
-  <component name="SvnBranchConfigurationManager" />
 </module>
 

Modified: 
tapestry/tapestry5/branches/5.0/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java?rev=734198&r1=734197&r2=734198&view=diff
==============================================================================
--- 
tapestry/tapestry5/branches/5.0/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
 (original)
+++ 
tapestry/tapestry5/branches/5.0/tapestry-core/src/main/java/org/apache/tapestry5/internal/structure/ComponentPageElementImpl.java
 Tue Jan 13 09:54:26 2009
@@ -211,8 +211,8 @@
     }
 
     /**
-     * Replaces {...@link 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.BeginRenderPhase}
 when there a
-     * handler for AfterRender but not BeginRender.
+     * Replaces {...@link 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.BeginRenderPhase}
 when there is
+     * a handler for AfterRender but not BeginRender.
      */
     private class OptimizedBeginRenderPhase implements RenderCommand
     {
@@ -615,7 +615,7 @@
 
         if (!handled.contains(BeginRender.class))
         {
-            RenderCommand replacement = handled.contains(AfterRender.class)
+            RenderCommand replacement = afterRenderPhase != null
                                         ? new OptimizedBeginRenderPhase()
                                         : beforeRenderTemplatePhase;
 

Added: 
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RenderPhaseCheck.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RenderPhaseCheck.java?rev=734198&view=auto
==============================================================================
--- 
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RenderPhaseCheck.java
 (added)
+++ 
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RenderPhaseCheck.java
 Tue Jan 13 09:54:26 2009
@@ -0,0 +1,29 @@
+// Copyright 2009 The Apache Software Foundation
+//
+// Licensed 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 KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry5.integration.app1.pages;
+
+import org.apache.tapestry5.annotations.CleanupRender;
+import org.apache.tapestry5.annotations.Log;
+
+public class RenderPhaseCheck
+{
+
+    @Log
+    @CleanupRender
+    void cleanup()
+    {
+
+    }
+}

Modified: 
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/log4j.properties?rev=734198&r1=734197&r2=734198&view=diff
==============================================================================
--- 
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/log4j.properties
 (original)
+++ 
tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/log4j.properties
 Tue Jan 13 09:54:26 2009
@@ -28,3 +28,4 @@
 
 # log4j.category.org.apache.tapestry5.corelib.components=debug
 
+log4j.category.org.apache.tapestry5.integration.app1.pages.RenderPhaseCheck=debug

Modified: tapestry/tapestry5/branches/5.0/tapestry-project.ipr
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-project.ipr?rev=734198&r1=734197&r2=734198&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-project.ipr (original)
+++ tapestry/tapestry5/branches/5.0/tapestry-project.ipr Tue Jan 13 09:54:26 
2009
@@ -152,7 +152,6 @@
       <facet-type id="Spring" />
     </autodetection-disabled>
   </component>
-  <component name="FacetManager" />
   <component name="IdProvider" IDEtalkID="5869BD07806E60386FB39DF824C84757" />
   <component name="InspectionProjectProfileManager">
     <option name="PROJECT_PROFILE" value="Project Default" />
@@ -244,7 +243,6 @@
       </list>
     </option>
   </component>
-  <component name="NewModuleRootManager" />
   <component name="Palette2">
     <group name="Swing">
       <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal 
Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" 
auto-create-binding="false" can-attach-label="false">

Modified: tapestry/tapestry5/branches/5.0/tapestry-tutorial1/tutorial1.iml
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-tutorial1/tutorial1.iml?rev=734198&r1=734197&r2=734198&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-tutorial1/tutorial1.iml (original)
+++ tapestry/tapestry5/branches/5.0/tapestry-tutorial1/tutorial1.iml Tue Jan 13 
09:54:26 2009
@@ -159,6 +159,5 @@
     <orderEntry type="library" name="Maven: junit:junit:3.8.1" level="project" 
/>
     <orderEntry type="library" name="Maven: org.easymock:easymock:2.4" 
level="project" />
   </component>
-  <component name="SvnBranchConfigurationManager" />
 </module>
 


Reply via email to