[ 
https://issues.apache.org/jira/browse/HDFS-8043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14500254#comment-14500254
 ] 

Tsuyoshi Ozawa commented on HDFS-8043:
--------------------------------------

[~brahmareddy] thanks for your updating.
{code}
-    if (deleteDfsDir) {
+    if (deleteDfsDir && base_dir != null) {
         base_dir.delete();
     } else {
+      if (base_dir != null) {
         base_dir.deleteOnExit();
+      }
     }
{code}

The condition statements look complex. Could you fix it not to use nested 
if-else statement?

> NPE in MiniDFSCluster teardown
> ------------------------------
>
>                 Key: HDFS-8043
>                 URL: https://issues.apache.org/jira/browse/HDFS-8043
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0
>         Environment: jenkins
>            Reporter: Steve Loughran
>            Assignee: Brahma Reddy Battula
>         Attachments: HDFS-8043-002.patch, HDFS-8043.patch
>
>
> NPE surfacing in {{MiniDFSCluster.shutdown}} during test teardown 



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

Reply via email to