You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/06/18 02:56:30 UTC

[hadoop] branch trunk updated: HADOOP-14807. should prevent the possibility of NPE about ReconfigurableBase.java. Contributed by hu xiaodong.

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

weichiu 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 10311c3  HADOOP-14807. should prevent the possibility of NPE about ReconfigurableBase.java. Contributed by hu xiaodong.
10311c3 is described below

commit 10311c30b02d984a11f2cedfd06eb2a766ad1576
Author: Wei-Chiu Chuang <we...@apache.org>
AuthorDate: Mon Jun 17 19:55:56 2019 -0700

    HADOOP-14807. should prevent the possibility of NPE about ReconfigurableBase.java. Contributed by hu xiaodong.
---
 .../src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java
index 23e1fda..8cacbdc 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java
@@ -146,7 +146,8 @@ public abstract class ReconfigurableBase
             oldConf.unset(change.prop);
           }
         } catch (ReconfigurationException e) {
-          errorMessage = e.getCause().getMessage();
+          Throwable cause = e.getCause();
+          errorMessage = cause == null ? e.getMessage() : cause.getMessage();
         }
         results.put(change, Optional.ofNullable(errorMessage));
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org