[
https://issues.apache.org/jira/browse/HDFS-7538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335972#comment-14335972
]
Binglin Chang commented on HDFS-7538:
-------------------------------------
Hi [~tedyu], the patch is out of date, and I think the bug no longer exists,
should this be resolved?
> 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)