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

Hudson commented on HDFS-14078:
-------------------------------

FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #16782 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/16782/])
HDFS-14078. Admin helper fails to prettify NullPointerExceptions. (weichiu: rev 
81ec90941160cc5f75370ee45af22c6b47c3c94b)
* (add) 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestAdminHelper.java
* (edit) 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/AdminHelper.java


> Admin helper fails to prettify NullPointerExceptions
> ----------------------------------------------------
>
>                 Key: HDFS-14078
>                 URL: https://issues.apache.org/jira/browse/HDFS-14078
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>         Attachments: HDFS-14078.001.patch, HDFS-14078.002.patch, 
> HDFS-14078.003.patch
>
>
> org.apache.hadoop.hdfs.tools.AdminHelper has a method to prettifyExceptions:
> {code}
>   static String prettifyException(Exception e) {
>     return e.getClass().getSimpleName() + ": "
>         + e.getLocalizedMessage().split("\n")[0];
>   }
> {code}
> But if e is a NPE the e.getLocalizedMessage() could be null. In that case NPE 
> will be thrown and the original error message will be lost.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to