struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Cranford (JIRA)" <>
Subject [jira] [Commented] (WW-4066) Submitting form with parameters using brackets while devMode=true yields StringIndexOutOfBoundsException
Date Mon, 20 May 2013 14:33:15 GMT


Chris Cranford commented on WW-4066:

bq. If you take a look on paramsPrepareParamsStack you will spot that the params interceptor
is listed two times - before and after prepare, but there is also modelDriven listed just
before the second params which will put non-null Model onto stack.

I don't recall specifically why the interceptor stack was designed that way beyond perhaps
being backward compatible.  I recall a discussion sometime back where it was decided that
the interceptor stack would be designed this way.  

I just applied to the sample application and with devMode=true, I do see where the
OGNL exceptions are written to the logs, perhaps I had overlooked them prior.  What boggles
me however, is that StringIndexOutOfBoundsException isn't thrown as a side affect.  And the
stack trace related to that exception is coming from {{LocalizedTextUtil}}.  Why is that just
now surfacing but not in prior builds?
> Submitting form with parameters using brackets while devMode=true yields StringIndexOutOfBoundsException
> --------------------------------------------------------------------------------------------------------
>                 Key: WW-4066
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.14
>            Reporter: Chris Cranford
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.15
>         Attachments:
> Our BaseAction which extends ActionSupport overrides the addActionMessage() with the
> {code:java}
> @Override
> public void addActionMessage(String message) {
>   super.addActionMessage(getText(message));
> }
> {code}
> With the above method in place during devMode=true, the following error stack trace occurs:
> {noformat}
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>   at java.lang.String.substring(
>   at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(
>   at com.opensymphony.xwork2.util.LocalizedTextUtil.findText(
>   at com.opensymphony.xwork2.TextProviderSupport.getText(
>   at com.opensymphony.xwork2.TextProviderSupport.getText(
>   at com.opensymphony.xwork2.ActionSupport.getText(
>   at com.setech.dw.common.web.BaseAction.addActionMessage(
>   at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
>   at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(
> {noformat}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message