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)