You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Lisheng Sun (JIRA)" <ji...@apache.org> on 2019/07/24 01:39:00 UTC

[jira] [Created] (HADOOP-16453) Remove useless trace log in NetUtils.java

Lisheng Sun created HADOOP-16453:
------------------------------------

             Summary: Remove useless trace log in NetUtils.java
                 Key: HADOOP-16453
                 URL: https://issues.apache.org/jira/browse/HADOOP-16453
             Project: Hadoop Common
          Issue Type: Improvement
            Reporter: Lisheng Sun
            Assignee: Lisheng Sun


private static <T extends IOException> T wrapWithMessage(
  T exception, String msg) {  Class<? extends Throwable> clazz = exception.getClass();  try {
    Constructor<? extends Throwable> ctor =
      clazz.getConstructor(String.class);
    Throwable t = ctor.newInstance(msg);    return (T) (t.initCause(exception));
  } catch (Throwable e) {
    LOG.trace("Unable to wrap exception of type " +
             clazz + ": it has no (String) constructor", e);    return exception;
  }
}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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