hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Devaraj K (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7440) HttpServer.getParameterValues throws NPE for missing parameters
Date Tue, 05 Jul 2011 11:27:16 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-7440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059842#comment-13059842
] 

Devaraj K commented on HADOOP-7440:
-----------------------------------

Hi Bharath,

    As per the specification, it should return null if the parameter does not exist.

 http://download.oracle.com/javaee/5/api/javax/servlet/ServletRequest.html#getParameterValues(java.lang.String)
h5.getParameterValues

String[] getParameterValues(String name)Returns an array of String objects containing all
of the values the given request parameter has, or null if the parameter does not exist. 
If the parameter has a single value, the array has a length of 1. 

h5.Parameters:
name - a String containing the name of the parameter whose value is requested 
h5.Returns:
an array of String objects containing the parameter's values



> HttpServer.getParameterValues throws NPE for missing parameters
> ---------------------------------------------------------------
>
>                 Key: HADOOP-7440
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7440
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.23.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>             Fix For: 0.23.0
>
>         Attachments: hadoop-7440.txt
>
>
> If the requested parameter was not specified in the request, the raw request's getParameterValues
function returns null. Thus, trying to access {{unquoteValue.length}} throws NPE.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message