[ https://issues.apache.org/jira/browse/HDFS-7538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated HDFS-7538: ------------------------- Resolution: Not a Problem Status: Resolved (was: Patch Available) > removedDst should be checked against null in the finally block of > FSDirRenameOp#unprotectedRenameTo() > ----------------------------------------------------------------------------------------------------- > > Key: HDFS-7538 > URL: https://issues.apache.org/jira/browse/HDFS-7538 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Ted Yu > Assignee: Ted Yu > Priority: Minor > Attachments: hdfs-7538-001.patch > > > {code} > if (removedDst != null) { > undoRemoveDst = false; > ... > if (undoRemoveDst) { > // Rename failed - restore dst > if (dstParent.isDirectory() && > dstParent.asDirectory().isWithSnapshot()) { > dstParent.asDirectory().undoRename4DstParent(removedDst, > {code} > If the first if check doesn't pass, removedDst would be null and > undoRemoveDst may be true. > This combination would lead to NullPointerException in the finally block. -- This message was sent by Atlassian JIRA (v6.3.4#6332)