hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6415) Missing null check in FSImageSerialization#writePermissionStatus()
Date Fri, 30 May 2014 22:06:09 GMT

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

Brandon Li commented on HDFS-6415:
----------------------------------

How could getUserName() / getGroupName() return null? Maybe I missed something but I couldn't
find a case in current code which can make the inode have null user or group names. 
Are we proposing the code change just to prevent future errors (e.g., future code change might
introduce a null reference)?

> Missing null check in FSImageSerialization#writePermissionStatus()
> ------------------------------------------------------------------
>
>                 Key: HDFS-6415
>                 URL: https://issues.apache.org/jira/browse/HDFS-6415
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Chen He
>            Priority: Minor
>         Attachments: HDFS-6415.patch
>
>
> {code}
>     PermissionStatus.write(out, inode.getUserName(), inode.getGroupName(), p);
> {code}
> getUserName() / getGroupName() may return null.
> null check should be added for these two calls.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message