On Fri, 17 Apr 2026 15:49:05 GMT, Alan Bateman <[email protected]> wrote:
>> 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.
Are you saying that `ModuleReader.list()` should not list both (preview classes
and non-preview if both exist)? That's not what the javadocs say, fwiw.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r3101662247