You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/01/13 09:25:26 UTC

[struts] 01/04: WW-5117 Restores previous behavior where tag was before action on stack

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5117-evaluate-dynamic-attributes-cherrypick
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 3d39fba0db128093e04111e00cda96f9d1bcd6eb
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Jan 4 20:20:28 2022 +0100

    WW-5117 Restores previous behavior where tag was before action on stack
---
 .../struts2/components/template/FreemarkerTemplateEngine.java    | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
index 3bbd219..91e1558 100644
--- a/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
+++ b/core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
@@ -148,16 +148,13 @@ public class FreemarkerTemplateEngine extends BaseTemplateEngine {
             }
         };
 
-        LOG.debug("Puts action on the top of ValueStack, just before the tag");
-        action = stack.pop();
+        LOG.debug("Push tag on top of the stack");
         stack.push(templateContext.getTag());
-        stack.push(action);
         try {
             template.process(model, writer);
         } finally {
-            stack.pop(); // removes action
-            stack.pop(); // removes tag
-            stack.push(action); // puts back action
+            LOG.debug("Removes tag from top of the stack");
+            stack.pop();
         }
     }