Passing unknown parameters in a GET from a REST client causes
NullPointerException in SchemaUtil.java
-----------------------------------------------------------------------------------------------------
Key: AXIS2-786
URL: http://issues.apache.org/jira/browse/AXIS2-786
Project: Apache Axis 2.0 (Axis2)
Type: Bug
Components: core
Versions: 1.0
Environment: Tomcat 5.5.7. Win XP.
Reporter: Kent Tong
In SchemaUtil.java, line 104:
String[] parameterValuesArray = (String[])
parameterMap.get(name);
if (parameterValuesArray.length > 0 &&
!"".equals(parameterValuesArray[0]) &&
parameterValuesArray[0] != null)
{
...
}
If there is no query parameter with this name, then parameterMap.get() will
return null. Trying to get the length field of null will cause a
NullPointerException. The correct code should be:
String[] parameterValuesArray = (String[])
parameterMap.get(name);
if (parameterValuesArray != null &&
!"".equals(parameterValuesArray[0]) &&
parameterValuesArray[0] != null)
{
...
}
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]