yasserzamani commented on a change in pull request #475:
URL: https://github.com/apache/struts/pull/475#discussion_r601425835
##########
File path:
core/src/main/java/org/apache/struts2/components/template/FreemarkerTemplateEngine.java
##########
@@ -144,15 +144,20 @@ public void close() throws IOException {
}
};
+ LOG.debug("Puts action on the top of ValueStack, just before the tag");
+ action = stack.pop();
try {
stack.push(templateContext.getTag());
+ stack.push(action);
Review comment:
Yes sure thanks. I meant the `finally` block is here to undo those two
pushes so consequently those two pushes must be done outside of the
`try...finally`'s `try`. For example currently consider
`stack.push(templateContext.getTag());` fails (it's unlikely but anyway just to
describe) then the `finally` block pops three objects while we've only pushed
two objects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]