struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4999) Can't get OgnlValueStack log even if enable logMissingProperties
Date Mon, 03 Jun 2019 06:26:01 GMT

    [ https://issues.apache.org/jira/browse/WW-4999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16854258#comment-16854258
] 

ASF subversion and git services commented on WW-4999:
-----------------------------------------------------

Commit 3ac6835c5ca71cc5ee085680ade48aac6883d2fa in struts's branch refs/heads/struts-2-5-x
from Yasser Zamani
[ https://gitbox.apache.org/repos/asf?p=struts.git;h=3ac6835 ]

fix logMissingProperties (WW-4999)

Moves checking OgnlValueStack.THROW_EXCEPTION_ON_FAILURE outside loop because it shouldn't
throw exception on first failure while is trying all root objects.

Returns on first successful call because it's not rational and is confusing user to skip when
user method successfully returns null as an actual result.

Fixes WW-4999 via honoring (devMode && logMissingProperties) for OgnlValueStack.THROW_EXCEPTION_ON_FAILURE
and REPORT_ERRORS_ON_NO_PROP.


> Can't get OgnlValueStack log even if enable logMissingProperties
> ----------------------------------------------------------------
>
>                 Key: WW-4999
>                 URL: https://issues.apache.org/jira/browse/WW-4999
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.5.17
>            Reporter: Quincy Qu
>            Assignee: Yasser Zamani
>            Priority: Major
>             Fix For: 2.5.21, 2.6
>
>
> I'm in devMode, enabled logMissingProperties and expect to see missing property warning
in the log. I was surprised that I can't get the missing property log even if logMissingProperties
is set true. The application run smoothly and skip the missing property - as expected though.
> In another run, I enabled both logMissingProperties and throwExceptionOnFailure. This
time the application crash at the missing property and I can get both logs and exception.
> After I dive deeper using debugger, I convince myself the config is good, since devMode
and logMissingProperties are true at runtime in OgnlValueStack.
> I was confused, why we can't get missing property log without throwing OgnlException? 
> Are we able to enter handleOgnlException(String expr, boolean throwExceptionOnFailure,
OgnlException e)  at all if throwExceptionOnFailure is false, in which my expected log is
written?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message