hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Isaacson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8698) Do not call unneceseary setConf(null) in Configured constructor
Date Thu, 06 Dec 2012 23:31:25 GMT

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

Andy Isaacson commented on HADOOP-8698:

bq. because java do not generates no arg constructor for you if constructor with argument

Ah, my incremental test build succeeded for irrelevant reasons; when I did "mvn clean test"
it failed as expected.  Thanks for enlightening me!

Are you planning to post a patch with the proposed cleanup?
> Do not call unneceseary setConf(null) in Configured constructor
> ---------------------------------------------------------------
>                 Key: HADOOP-8698
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8698
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 0.23.3, 3.0.0
>            Reporter: Radim Kolar
>            Priority: Minor
>             Fix For: 0.24.0, 3.0.0
>         Attachments: setconf-null.txt
> no-arg constructor of /org/apache/hadoop/conf/Configured calls setConf(null). This is
unnecessary and it increases complexity of setConf() code because you have to check for not
null object reference before using it. Under normal conditions setConf() is never called with
null reference, so not null check is unnecessary.  

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message