[
https://issues.apache.org/jira/browse/HADOOP-12117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602134#comment-14602134
]
Ravi Prakash commented on HADOOP-12117:
---------------------------------------
Thanks for the contribution Zhihai! setAllowNullValueProperties seems to have
been added to support unit test cases downstream. Is there a unit test case you
can point me to which is causing this?
I'd be wary of opening up the access level of a Configuration method (even if
it is labeled @VisibleForTesting) . Are you sure we can't unit test without
changing the access level?
Also please log the exception in testLoadProperty().
> Potential NPE from Configuration#loadProperty with allowNullValueProperties
> set.
> --------------------------------------------------------------------------------
>
> Key: HADOOP-12117
> URL: https://issues.apache.org/jira/browse/HADOOP-12117
> Project: Hadoop Common
> Issue Type: Bug
> Components: conf
> Affects Versions: 2.7.1
> Reporter: zhihai xu
> Assignee: zhihai xu
> Attachments: HADOOP-12117.000.patch
>
>
> Potential NPE from Configuration#loadProperty with allowNullValueProperties
> set.
> The following code will cause NPE:
> {code}
> } else if (!value.equals(properties.getProperty(attr))) {
> {code}
> Because if {{allowNullValueProperties}} is true, {{value}} is null and
> {{finalParameters}} contains {{attr}}, NullPointerException will happen
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)