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

Alan Bateman alanb at openjdk.org
Fri Jan 10 13:28:40 UTC 2025


On Fri, 10 Jan 2025 13:14:36 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> 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?

The jrtfs provider is compiled --release 8 and packaging into jrt-fs.jar to allow tools on JDK 8+ to access the classes/resources in the run-time image.  In any case, it's nothing to do with the topic that this PR is about, see discussion on nio-dev instead.

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

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


More information about the core-libs-dev mailing list