hadoop-common-issues mailing list archives

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

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

Bharath Mundlapudi commented on HADOOP-7440:

Hi Todd,

One minor comment: instead of returning null for this function, can we return empty string
array? This was the cleanup we have done in the past with couple of JDK APIs. 
The answer was never return null for the array return types. One reason is all the client
code needs to check for null condition everywhere. So we should avoid returning null for array
types. Do you agree?

Otherwise, patch looks good.

> 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


View raw message