Failure in producer form processing when using array of parameters
------------------------------------------------------------------
Key: JBPORTAL-1095
URL:
http://jira.jboss.com/jira/browse/JBPORTAL-1095
Project: JBoss Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Portal WSRP
Affects Versions: 2.4 Final
Environment: JBoss Portal 2.4
Reporter: Sten Roger Sandvik
Assigned To: Chris Laprun
Priority: Blocker
I encountered an ArrayIndexOutOfBoundsException in processing of form parameters. It only
happens when multiple parameters with same name is submitted. Encountered on line 369 in
org.jboss.portal.wsrp.producer.MarkupHandler.java
Line 364 in org.jboss.portal.wsrp.producer.MarkupHandler.java
---------------------------------------------------------------------------------------
// handle multi-valued parameters...
String[] oldValues = (String[])params.get(paramName);
int valuesLength = oldValues.length;
String[] newValues = new String[valuesLength];
System.arraycopy(oldValues, 0, newValues, 0, valuesLength - 1);
newValues[length] = paramValue;
params.put(paramName, newValues);
Should be:
---------------
// handle multi-valued parameters...
String[] oldValues = (String[])params.get(paramName);
int valuesLength = oldValues.length;
String[] newValues = new String[valuesLength + 1];
System.arraycopy(oldValues, 0, newValues, 0, valuesLength - 1);
newValues[valuesLength] = paramValue;
params.put(paramName, newValues);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira