Author: hlship
Date: Thu Jul 21 18:21:07 2011
New Revision: 1149301
URL: http://svn.apache.org/viewvc?rev=1149301&view=rev
Log:
TAP5-1508: Properly check the render phase event to see if it was aborted by
the super-class implementation of the render phase method
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RenderPhaseMethodWorker.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RenderPhaseMethodWorker.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RenderPhaseMethodWorker.java?rev=1149301&r1=1149300&r2=1149301&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RenderPhaseMethodWorker.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/RenderPhaseMethodWorker.java
Thu Jul 21 18:21:07 2011
@@ -221,11 +221,8 @@ public class RenderPhaseMethodWorker imp
{
private void addSuperCall(InstructionBuilder builder)
{
- // At the top of the inheritance, there's no need to call
super (this is a pretty standard case).
- if (!isRoot)
- {
-
builder.loadThis().loadArguments().invokeSpecial(plasticClass.getSuperClassName(),
interfaceMethodDescription);
- }
+
builder.loadThis().loadArguments().invokeSpecial(plasticClass.getSuperClassName(),
interfaceMethodDescription);
+
}
private void invokeMethod(InstructionBuilder builder,
PlasticMethod method)
@@ -264,9 +261,13 @@ public class RenderPhaseMethodWorker imp
public void doBuild(InstructionBuilder builder)
{
- if (!reverse)
+ if (!reverse && !isRoot)
{
addSuperCall(builder);
+
+ builder.loadArgument(1).invoke(Event.class, boolean.class,
"isAborted");
+
+ builder.when(Condition.NON_ZERO, JUST_RETURN);
}
for (PlasticMethod invokedMethod : orderedMethods)
@@ -274,7 +275,7 @@ public class RenderPhaseMethodWorker imp
invokeMethod(builder, invokedMethod);
}
- if (reverse)
+ if (reverse && !isRoot)
{
addSuperCall(builder);
}