hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harsh J (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8362) Improve exception message when Configuration.set() is called with a null key or value
Date Tue, 29 May 2012 11:38:25 GMT

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

Harsh J commented on HADOOP-8362:
---------------------------------

Hi,

Sorry for the late response here. I failed to add another comment earlier:

Can you separate the key==null and value==null checks? We shouldn't have the users determine
which one of them being null caused the exception as is currently the case anyway. Two preconditions
would be good (same for tests).

Thanks!
                
> Improve exception message when Configuration.set() is called with a null key or value
> -------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8362
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8362
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>    Affects Versions: 2.0.0-alpha
>            Reporter: Todd Lipcon
>            Priority: Trivial
>              Labels: newbie
>         Attachments: HADOOP-8362-1.patch, HADOOP-8362-2.patch, HADOOP-8362-3.patch, HADOOP-8362.patch
>
>
> Currently, calling Configuration.set(...) with a null value results in a NullPointerException
within Properties.setProperty. We should check for null key/value and throw a better exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message