On Thu, 6 Jul 2023 20:07:56 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
> Add a default method `java.io.Closeable::closeUnchecked` which is equivalent > to `Closeable::close` except that it instead throws > `java.io.UncheckedIOException`. src/java.base/share/classes/java/io/Closeable.java line 60: > 58: * with it. If the stream is already closed then invoking this > 59: * method has no effect. > 60: * Can you add an example showing the recommended pattern of use? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14789#discussion_r1254898461