[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4063) MultipartRequestImpl implementation of getPerameterMap violates ServletRequests API.
Chris Rudd (JIRA)
jira-events at lists.jboss.org
Tue Mar 31 19:15:35 EDT 2009
MultipartRequestImpl implementation of getPerameterMap violates ServletRequests API.
------------------------------------------------------------------------------------
Key: JBSEAM-4063
URL: https://jira.jboss.org/jira/browse/JBSEAM-4063
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Reporter: Chris Rudd
MultipartRequestImpl.getParameterMap returns a map whose values may be String or String[]. According to the javaee 5 API :
Returns:
an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
The source of the problem is the following code (in getParameterMap) which clearly puts a String into the map instead of a String[].
ValueParam vp = (ValueParam)p;
if( vp.getValue() instanceof String )
{
params.put( name, vp.getValue() );
}
else if( vp.getValue() instanceof List )
{
params.put( name, getParameterValues(name) );
}
it should be doing either :
params.put( name, new String[] { vp.getValue() } );
or
params.put( name, getParameterValues(name) );
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list