gianm opened a new pull request #10247:
URL: https://github.com/apache/druid/pull/10247


   These other methods include:
   
   1) New method CloseableUtils.closeAndWrapExceptions, which wraps IOExceptions
      in RuntimeExceptions for callers that just want to avoid dealing with
      checked exceptions. Most usages were migrated to this method, because it
      looks like they were mainly attempts to avoid declaring a throws clause,
      and perhaps were unintentionally suppressing IOExceptions.
   2) New method CloseableUtils.closeInCatch, designed to properly close 
something
      in a catch block without losing exceptions. Some usages from catch blocks
      were migrated here, when it seemed that they were intended to avoid 
checked
      exception handling, and did not really intend to also suppress 
IOExceptions.
   3) New method CloseableUtils.closeAndSuppressExceptions, which sends all
      exceptions to a "chomper" that consumes them. Nothing is thrown or 
returned.
      The behavior is slightly different: with this method, _all_ exceptions are
      suppressed, not just IOExceptions. Calls that seemed like they had good
      reason to suppress exceptions were migrated here.
   4) Some calls were migrated to try-with-resources, in cases where it appeared
      that CloseQuietly was being used to avoid throwing an exception in a 
finally
      block.
   
   🎵 You don't have to go home, but you can't stay here... 🎵


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to