RFR: 8316882: Add NOT_INTERRUPTIBLE OpenOption and use it in ZipFS

Sean Mullan mullan at openjdk.org
Fri Jan 10 13:17:36 UTC 2025


On Fri, 10 Jan 2025 08:22:37 GMT, Chen Liang <liach 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.

Why catch the `SecurityException` - why do we need to make JDK 25+ code work on older releases?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22882#discussion_r1910363981


More information about the core-libs-dev mailing list