[ https://issues.apache.org/jira/browse/WW-4066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13666716#comment-13666716 ]
Chris Cranford commented on WW-4066: ------------------------------------ In doing a bit more of my own testing, I found under 2.3.4.1 the {{OgnlException}} exceptions are thrown even during the first {{params}} portion of the {{paramsPrepareParamsStack}} as seen here: {code} WARNING: Error setting expression 'itemSearchTypes[3]' with value '[Ljava.lang.String;@63336706' ognl.OgnlException: target is null for setProperty(null, "3", [Ljava.lang.String;@63336706) {code} It appears then to me the only visible difference here is that no action messages were ever being generated and added to the action's message list for either case of the invocation of the {{params}} portion of the interceptor stack in the older builds; where-as in the later builds these exceptions are actually triggering developer warnings. Because these warnings included a '[' character, that is what provoked the {{getText()}} method to throw an exception with our original base action implementation. But I don't see how the {{ModelDrivenCreateAware}} interface solves the problem of where the property exists on the model but not the action, as seen in the demo application added. - First {{ParametersInterceptor}} call populates the action instance. - The {{ModelDrivenInterceptor}} simply pushes model from {{getModel}} onto the top of the stack - Second {{ParametersInterceptor}} call populates the model instance. If we alter this above functionality in anyway, would it not have a wider impact on those using that particular interceptor stack, right? > Submitting form with parameters using brackets while devMode=true yields > StringIndexOutOfBoundsException > -------------------------------------------------------------------------------------------------------- > > Key: WW-4066 > URL: https://issues.apache.org/jira/browse/WW-4066 > Project: Struts 2 > Issue Type: Bug > Components: Core Actions > Affects Versions: 2.3.14 > Reporter: Chris Cranford > Assignee: Lukasz Lenart > Fix For: 2.3.16 > > Attachments: testcase.zip > > > Our BaseAction which extends ActionSupport overrides the addActionMessage() > with the following: > {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(String.java:1871) > at > com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:426) > at > com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:362) > at > com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:208) > at > com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:123) > at com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:103) > at com.setech.dw.common.web.BaseAction.addActionMessage(BaseAction.java:209) > at > com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:337) > at > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:241) > {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: http://www.atlassian.com/software/jira