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

Konstantin Shvachko commented on HADOOP-9415:
---------------------------------------------

Both {{FileContext.getLinkTarget()}} and {{ClientProtocol.getLinkTarget()}} 
claim it should throw "IOException - If the given path does not refer to a 
symlink". Not returning null as in your patch.
Why don't we start committing obvious bugs rather than merging them into big 
jira.
                
> Fix NullPointerException in getLinkTarget
> -----------------------------------------
>
>                 Key: HADOOP-9415
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9415
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>            Priority: Minor
>         Attachments: hadoop-9415-1.patch
>
>
> {{HdfsFileStatus#getLinkTarget}} can throw a NPE in {{DFSUtil#bytes2String}} 
> if {{symlink}} is null. Better to instead return null and propagate this to 
> the client.

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

Reply via email to