You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Elek, Marton (JIRA)" <ji...@apache.org> on 2018/11/14 10:43:00 UTC
[jira] [Created] (HDFS-14078) Admin helper fails to prettify
NullPointerExceptions
Elek, Marton created HDFS-14078:
-----------------------------------
Summary: 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
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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org