hadoop-hdfs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-7493) removedDst should be checked against null in finally block of FSDirRenameOp#unprotectedRenameTo()
Date Mon, 08 Dec 2014 22:23:12 GMT
Ted Yu created HDFS-7493:
----------------------------

             Summary: removedDst should be checked against null in finally block of FSDirRenameOp#unprotectedRenameTo()
                 Key: HDFS-7493
                 URL: https://issues.apache.org/jira/browse/HDFS-7493
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


{code}
          removedDst = dstIIP.getLastINode();
          undoRemoveDst = true;
{code}
If removedDst is null, the following code in finally block may result in NPE:
{code}
        if (dstParent.isDirectory() &&
            dstParent.asDirectory().isWithSnapshot()) {
          dstParent.asDirectory().undoRename4DstParent(removedDst,
              dstIIP.getLatestSnapshotId());
{code}



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

Mime
View raw message