[ 
https://issues.apache.org/jira/browse/WW-5379?focusedWorklogId=897290&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-897290
 ]

ASF GitHub Bot logged work on WW-5379:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Dec/23 21:39
            Start Date: 27/Dec/23 21:39
    Worklog Time Spent: 10m 
      Work Description: kusalk commented on code in PR #822:
URL: https://github.com/apache/struts/pull/822#discussion_r1437263299


##########
plugins/velocity/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java:
##########
@@ -57,8 +59,11 @@ public int getType() {
     protected abstract Component getBean(ValueStack stack, HttpServletRequest 
req, HttpServletResponse res);
 
     public boolean render(InternalContextAdapter ctx, Writer writer, Node 
node) throws IOException, ResourceNotFoundException, ParseErrorException, 
MethodInvocationException {
-        // get the bean
-        ValueStack stack = (ValueStack) ctx.get("stack");
+        ValueStack stack = extractValueStack(ctx);
+        if (stack == null) {

Review Comment:
   This shouldn't occur but left it for backwards compatibility in case there 
is a scenario I didn't foresee





Issue Time Tracking
-------------------

    Worklog Id:     (was: 897290)
    Time Spent: 1h 10m  (was: 1h)

> Implement alternative mechanism for Velocity directives to obtain stack
> -----------------------------------------------------------------------
>
>                 Key: WW-5379
>                 URL: https://issues.apache.org/jira/browse/WW-5379
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Velocity
>            Reporter: Kusal Kithul-Godage
>            Priority: Minor
>             Fix For: 6.4.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to