RFR: 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException

Brian Burkhalter bpb at openjdk.org
Fri Jul 7 16:40:53 UTC 2023


On Fri, 7 Jul 2023 16:23:37 GMT, Remi Forax <forax at univ-mlv.fr> wrote:

> I'm not a big fan of hiding exceptions, why not wrapping the IOException in an UncheckedIOException ?
> 
> So closeUnchecked() means close and throw an unchecked exception if an exception occurs.

I am confused by this comment. That is what `closeUnchecked()` is specified to do.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14789#issuecomment-1625669306


More information about the core-libs-dev mailing list