On Fri, 17 Apr 2026 13:51:51 GMT, Severin Gehwolf <[email protected]> wrote:
>> David Beaumont has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Rename ModuleReference to ModuleLink
>> - tweak comments
>
> src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java line
> 395:
>
>> 393: */
>> 394: private static class SystemImage {
>> 395: static final ImageReader READER = SystemImageReader.get();
>
> `SystemImage.reader()` is internally used for `ModuleReader.list()` which
> probably need special casing to list all resources. For example, it would
> **not** `list()` the resource, but
> `mReader.open("META-INF/preview/java/lang/Byte.class")` would return an
> (optional) `InputStream` an inconsistency.
This is where the current proposal differs to multi-release JAR file. The
proposal here is that the URL to say Integer.class
is`jrt:/java.base/java/lang/Integer.class` even if preview features are
enabled. If a connection is opened to this URL then it will be "connected" to
the Integer.class in META-INF/preview when preview features are enabled. Same
thing if ModuleReader::open is used to open an input stream to the resource.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r3101553411