steveloughran commented on pull request #3171: URL: https://github.com/apache/hadoop/pull/3171#issuecomment-874299709
@aajisaka > To fix deprecation warning, I perfer using try-with-resources rather than replacing with our internal replacement. Mixed feelings there. I went through a lot of grief in HADOOP-16998/#2073 related to exceptions being raised in try with resources while a prior exception has been raised. The JVM will attach any ex raised in the resource closed to the initial ex via addSuppressed(), but if somehow it's the same exception you get an IllegalArgumentException with all stack traces lost. so, good * exception gets retained and passed up bad * none of our code (e.g. marshalling of exceptions, junit logging, log4j... does anything with these ugly * any attempt to be clever with caching and rethrowing exceptions can trigger failures -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
