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

Brian Burkhalter bpb at openjdk.org
Thu Jul 6 20:15:02 UTC 2023


Add a default method `java.io.Closeable::closeUnchecked` which is equivalent to `Closeable::close` except that it instead throws `java.io.UncheckedIOException`.

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

Commit messages:
 - 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException

Changes: https://git.openjdk.org/jdk/pull/14789/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14789&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8066869
  Stats: 107 lines in 2 files changed: 103 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/14789.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14789/head:pull/14789

PR: https://git.openjdk.org/jdk/pull/14789


More information about the core-libs-dev mailing list