RFR: 8280881: (fs) UnixNativeDispatcher.close0 may throw UnixException

Jaikiran Pai jpai at openjdk.java.net
Tue Feb 15 05:19:18 UTC 2022


On Mon, 14 Feb 2022 21:21:14 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Re-specify `sun.nio.fs.UnixNativeDispatcher.close0()` to throw `sun.nio.fs.UnixException` and modify callers either to ignore it or to rethrow it as an `IOException`, as appropriate.

Additionally the GitHub actions job on Linux system seems to have caught a few other places where the call to `close` now needs to catch the `UnixException`:


2022-02-14T21:24:09.6575143Z Compiling 3090 files for java.base
2022-02-14T21:24:37.0964078Z /home/runner/work/jdk/jdk/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxDosFileAttributeView.java:185: error: unreported exception UnixException; must be caught or declared to be thrown
2022-02-14T21:24:37.0964759Z             close(fd);
2022-02-14T21:24:37.0964944Z                  ^
2022-02-14T21:24:37.0965316Z /home/runner/work/jdk/jdk/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxDosFileAttributeView.java:280: error: unreported exception UnixException; must be caught or declared to be thrown
2022-02-14T21:24:37.0965679Z             close(fd);
2022-02-14T21:24:37.0965857Z                  ^
2022-02-14T21:24:37.0966014Z 2 errors

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

PR: https://git.openjdk.java.net/jdk/pull/7467


More information about the nio-dev mailing list