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 "Eran Chinthaka (JIRA)" <ji...@apache.org> on 2006/06/06 11:30:30 UTC

[jira] Resolved: (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 ]
     
Eran Chinthaka resolved AXIS2-786:
----------------------------------

    Resolution: Fixed
     Assign To: Eran Chinthaka  (was: Deepal Jayasinghe)

Fixed the code to not to throw NPE. Thanks Kent for pointing this out.

> 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: Eran Chinthaka

>
> 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