_SharedRendererUtils.getConvertedUISelectManyValue converting values with no
valuebinding
-----------------------------------------------------------------------------------------
Key: MYFACES-461
URL: http://issues.apache.org/jira/browse/MYFACES-461
Project: MyFaces
Type: Bug
Components: General
Versions: Nightly Build
Environment: win xp pro, jdk 1.4.2_06
Reporter: Eric Hsieh
When trying to get the values from a SelectManyListbox that has no
valuebinding, a null pointer occurs when the renderer util tries to convert the
list of values.
In _SharedRenderedUtils.java, this section gets called if there is no value
binding for the component
// Now, we have a converter...
if (valueType == null)
{
// ...but have no idea of expected type
// --> so let's convert it to an Object array
int len = submittedValue.length;
Object [] convertedValues = (Object [])
Array.newInstance(arrayComponentType, len);
for (int i = 0; i < len; i++)
{
convertedValues[i]
= converter.getAsObject(facesContext, component,
submittedValue[i]);
}
return convertedValues;
}
Since valueType is null, arrayComponentType is also null and never initialized
to a value. The Array.newInstance() call fails due to arrayComponentType being
null.
Should this array be initialized with Object.class since the array is of
Objects?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira