This is an automated email from the ASF dual-hosted git repository.

aengineer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0cb3316  HDDS-482. NullPointer exception thrown on console when cli 
operation failed. Contributed by Nandakumar.
0cb3316 is described below

commit 0cb3316cec1da5e24398bac3b40bc71c0aab59e1
Author: Anu Engineer <[email protected]>
AuthorDate: Wed Jan 2 11:30:54 2019 -0800

    HDDS-482. NullPointer exception thrown on console when cli operation failed.
    Contributed by Nandakumar.
---
 .../common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java 
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java
index c7ccb66..849aba0 100644
--- 
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java
+++ 
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/cli/GenericCli.java
@@ -51,7 +51,7 @@ public class GenericCli implements Callable<Void>, 
GenericParentCommand {
     try {
       execute(argv);
     } catch (ExecutionException ex) {
-      printError(ex.getCause());
+      printError(ex.getCause() == null ? ex : ex.getCause());
       System.exit(-1);
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to