You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2006/06/02 16:29:36 UTC
[jira] Assigned: (AXIS2-786) Passing unknown parameters in a GET
from a REST client causes NullPointerException in SchemaUtil.java
[ http://issues.apache.org/jira/browse/AXIS2-786?page=all ]
Deepal Jayasinghe reassigned AXIS2-786:
---------------------------------------
Assign To: Deepal Jayasinghe
> 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
> Assignee: Deepal Jayasinghe
>
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org