You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Wei-Chiu Chuang (JIRA)" <ji...@apache.org> on 2019/06/18 19:02:00 UTC

[jira] [Updated] (HDFS-14078) Admin helper fails to prettify NullPointerExceptions

     [ https://issues.apache.org/jira/browse/HDFS-14078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wei-Chiu Chuang updated HDFS-14078:
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.1.3
                   3.2.1
                   3.3.0
           Status: Resolved  (was: Patch Available)

Pushed to trunk, branch-3.2 and branch-3.1

Thanks [~elek] and the team for review!

> 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
>             Fix For: 3.3.0, 3.2.1, 3.1.3
>
>         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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org