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

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

                Author: ASF GitHub Bot
            Created on: 04/Oct/23 10:26
            Start Date: 04/Oct/23 10:26
    Worklog Time Spent: 10m 
      Work Description: kusalk commented on code in PR #758:
URL: https://github.com/apache/struts/pull/758#discussion_r1345567133


##########
core/src/main/java/org/apache/struts2/util/StrutsUtil.java:
##########
@@ -125,12 +120,10 @@ public Object findValue(String expression, String 
className) throws ClassNotFoun
 
     public Object findValue(String expr, Object context) {
         try {
-            return ognl.getValue(expr, 
ActionContext.getContext().getContextMap(), context);
-        } catch (OgnlException e) {
-            if (e.getReason() instanceof SecurityException) {
-                LOG.error(format("Could not evaluate this expression due to 
security constraints: [{0}]", expr), e);
-            }
-            return null;
+            stack.push(context);

Review Comment:
   Should be outside the try block so that we don't pop unless successfully 
pushed





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

    Worklog Id:     (was: 883285)
    Time Spent: 0.5h  (was: 20m)

> Remove deprecated OgnlTool
> --------------------------
>
>                 Key: WW-5338
>                 URL: https://issues.apache.org/jira/browse/WW-5338
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>            Reporter: Lukasz Lenart
>            Priority: Major
>             Fix For: 6.4.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>




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

Reply via email to