You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Haohui Mai (JIRA)" <ji...@apache.org> on 2014/12/24 01:17:13 UTC

[jira] [Resolved] (HDFS-7567) Potential null dereference in FSEditLogLoader#applyEditLogOp()

     [ https://issues.apache.org/jira/browse/HDFS-7567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Haohui Mai resolved HDFS-7567.
------------------------------
    Resolution: Invalid

I don't think it can happen after taking both branches into consideration.

> Potential null dereference in FSEditLogLoader#applyEditLogOp()
> --------------------------------------------------------------
>
>                 Key: HDFS-7567
>                 URL: https://issues.apache.org/jira/browse/HDFS-7567
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>       INodeFile oldFile = INodeFile.valueOf(iip.getLastINode(), path, true);
>       if (oldFile != null && addCloseOp.overwrite) {
> ...
>       INodeFile newFile = oldFile;
> ...
>       // Update the salient file attributes.
>       newFile.setAccessTime(addCloseOp.atime, Snapshot.CURRENT_STATE_ID);
>       newFile.setModificationTime(addCloseOp.mtime, Snapshot.CURRENT_STATE_ID);
> {code}
> The last two lines are not protected by null check.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)