RFR: 8316882: Add NOT_INTERRUPTIBLE OpenOption and use it in ZipFS
Chen Liang
liach at openjdk.org
Fri Jan 10 08:25:36 UTC 2025
On Wed, 25 Dec 2024 23:55:18 GMT, Bruno Ploumhans <duke at openjdk.org> wrote:
> Here is a fix for https://bugs.openjdk.org/browse/JDK-8316882.
>
> Following discussion in nio-dev a while ago, I have opted to add a new `NOT_INTERRUPTIBLE` open option, superseding `FileChannelImpl#setUninterruptible`.
src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java line 112:
> 110: opts.add(StandardOpenOption.READ);
> 111: // No lambdas during bootstrap
> 112: AccessController.doPrivileged(new PrivilegedAction<Void>() {
Can probably remove this AccessController wrapping on JDK 25+, and just additionally catch SecurityException in case this fails in older releases where security manager exists.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22882#discussion_r1909985130
More information about the nio-dev
mailing list