You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/07/28 21:02:40 UTC

[jira] [Commented] (WW-4318) Logging message when OgnlValueStack fail to set expression is cryptic most of the time

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

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

Commit 5c4874c60bb5331258e4a415af8604afaf1242b5 in struts's branch refs/heads/develop from [~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=5c4874c ]

WW-4318 Uses ErrorMessageBuilder to proper log fail of setting expression


> Logging message when OgnlValueStack fail to set expression is cryptic most of the time
> --------------------------------------------------------------------------------------
>
>                 Key: WW-4318
>                 URL: https://issues.apache.org/jira/browse/WW-4318
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Value Stack
>    Affects Versions: 2.3.16.1
>            Reporter: Brendan Le Ny
>            Assignee: Lukasz Lenart
>            Priority: Trivial
>              Labels: logging
>             Fix For: 2.3.18
>
>         Attachments: WW-4318.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> Most of the time, the logging message printed by OgnlValueStack class is useless because it doesn't show the value that causes the problem.
> Exemple log:
> {quote}
> 2014/03/20 02:23:28  WARN (CommonsLogger.java:64) warn Error setting expression 'myIntField' with value '[Ljava.lang.String;@55227e4a'
> ognl.MethodFailedException: Method "setMyIntField" failed for object fr.my.company.MyAction@df39b8b4 [java.lang.NoSuchMethodException: fr.my.company.MyAction@df39b8b4.setMyIntField([Ljava.lang.String;)]
> {quote}
> I can't find the reason because toString() is on a array show  '[Ljava.lang.String;@55227e4a' but i would like to see the actual value in the array.
> The exact same problem is fixed right in the method above the buggy one: the trivial patch is included.



--
This message was sent by Atlassian JIRA
(v6.2#6252)