[
https://issues.apache.org/jira/browse/WW-4264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857497#comment-13857497
]
Bruce Phillips commented on WW-4264:
------------------------------------
Johno - Thanks for the feedback - I think I understand the issue you're
reporting. Let me summarize:
In class ParametersIntercepter there are two notifyDeveloper methods with the
following signatures
1. notifyDeveloper(String message, String... parameters)
2. notifyDevelopers(Object action, String property, String message)
Note the somewhat ambiguous parameter list for the two methods.
In the first notifyDeveloper method there is a logic check for devMode but in
the second notifyDeveloper there is no logic check for devMode
At runtime method isWithinLengthLimit is calling the 2nd notifyDeveloper method
if the length of the parameter is > parameter name max length. Since there is
no check of the devMode value in the second notifyDeveloper method the LOG
message is written whether devMode is true or false
You believe that isWithinLengthLimit should call the first notifyDeveloper
method so that the exception is only logged if devMode is true or if logging is
set to DEBUG level for com.opensymphony package.
Your proposed correction is to rename the second notifyDeveloper method so that
method isWithinLengthLimit will then call the first notifyDeveloper method
since the ambiguous parameter list for the two notifyDeveloper methods would be
eliminated.
Is the above correct?
> notifyDeveloper method logs error even when devMode is set false
> ----------------------------------------------------------------
>
> Key: WW-4264
> URL: https://issues.apache.org/jira/browse/WW-4264
> Project: Struts 2
> Issue Type: Bug
> Reporter: Johno Crawford
> Assignee: Bruce Phillips
> Priority: Minor
> Attachments: WW-4264.patch
>
>
> notifyDeveloper(Object action, String property, String message) is called
> from com.opensymphony.xwork2.interceptor.ParametersInterceptor#acceptableName
> without checking devMode boolean.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)