steveloughran commented on code in PR #7428: URL: https://github.com/apache/hadoop/pull/7428#discussion_r2046833230
########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java: ########## @@ -957,9 +1005,22 @@ private static <T extends IOException> T wrapWithMessage( T exception, String msg) throws T { 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)); + try { + DynConstructors.Ctor<T> ctor = Review Comment: nice to see this stuff being used. Lifted from parquet, also in iceberg, so I'd suspect Ryan Blue as the author -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org