RFR: 8280881: (fs) UnixNativeDispatcher.close0 may throw UnixException [v2]
Jaikiran Pai
jpai at openjdk.java.net
Thu Feb 17 04:05:03 UTC 2022
On Wed, 16 Feb 2022 00:44:37 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.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8280881: Correct previous version; make Linux changes
src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java line 308:
> 306: UnixNativeDispatcher.close(socketpair[1]);
> 307: UnixNativeDispatcher.close(ifd);
> 308: } catch (UnixException ignore) {
Hello Brian,
Do you think it would be better for each of these `close` calls to have a try/catch/ignore block of its own? That way, for example, if the close for `socketpair[0]` fails, then we at least attempt closing the other open ones (`socketpair[1]` and `ifd`)?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7467
More information about the nio-dev
mailing list