struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Himanshu (JIRA)" <>
Subject [jira] Commented: (WW-2713) ParametersInterceptor: IndexOutOfBoundsException while logging parameters
Date Tue, 07 Oct 2008 23:17:36 GMT


Himanshu commented on WW-2713:

By Default logging I mean DEBUG Logging level

> ParametersInterceptor: IndexOutOfBoundsException while logging parameters
> -------------------------------------------------------------------------
>                 Key: WW-2713
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions:
>         Environment: Struts, Eclipse, Unit Test
>            Reporter: Eduard Papa
>            Priority: Minor
> I had written a unit test which was running successfully until I turned on DEBUG level
in log4j. This caused the unit test to fail and I tracked down the problem to the ParametersInterceptor,
line 241 in xwork-2.0.4.jar: 
> logEntry.append(String.valueOf(valueArray[valueArray.length - 1]));
> The value array there can be empty (0-length) and that line will try to access valueArray[-1]
which causes the exception. 
> I don't know if the user can submit input that would result in a request parameter with
an empty array, so this might not be an issue in production applications, but I think it should
be fixed for the sake of making the ParametersInterceptor more robust, in case anyone wants
to test request parameters with empty arrays.  

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message