[
https://issues.apache.org/jira/browse/HDFS-14078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706912#comment-16706912
]
Elek, Marton edited comment on HDFS-14078 at 12/3/18 9:54 AM:
--------------------------------------------------------------
Thanks the review to both of you.
I uploaded the new patch with improved (simplified) unit tests.
was (Author: elek):
Thanks the review for both of you.
I uploaded the new patch with improved (simplified) unit tests.
> 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: [email protected]
For additional commands, e-mail: [email protected]