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

Daryn Sharp commented on HADOOP-8179:
-------------------------------------

Which file/line is making your IDE unhappy?  I don't see the exact line, but I 
think you are referring to the copymerge command?  I see that it's opening the 
file inside of a try block with a finally clause that closes the stream.  It 
looks like the open - the first line of the try - should be moved to line 
before the try.
                
> risk of NPE in CopyCommands processArguments()
> ----------------------------------------------
>
>                 Key: HADOOP-8179
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8179
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.24.0
>            Reporter: Steve Loughran
>            Priority: Minor
>
> My IDE is warning me that the {{is.close()}} method will NPE if the {{is = 
> src.fs.open(src.path);}} call raises an exception, which could happen if the 
> source path could not be opened. There should be an if (is!=null) wrapper

--
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

        

Reply via email to