On Sun, 29 Mar 2026 11:08:03 GMT, Alan Bateman <[email protected]> wrote:

>> David Beaumont has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 12 commits:
>> 
>>  - Merge branch 'master' into jimage_preview_mode
>>  - rename jimage_exists to jimage_is_open
>>  - Feedback tweaks
>>  - Feedback tweaks
>>  - More feedback tweaks
>>  - Updated copyright
>>  - Feedback changes
>>  - Merge branch 'master' into jimage_preview_mode
>>  - Merge branch 'master' into jimage_preview_mode
>>  - undo exploded image changes for now
>>  - ... and 2 more: https://git.openjdk.org/jdk/compare/7695b1f9...0e802079
>
> src/java.base/share/classes/jdk/internal/jimage/ResourceEntries.java line 30:
> 
>> 28: 
>> 29: /**
>> 30:  * Accesses the underlying resource entries in a jimage file.
> 
> This interface is confusing as it provides a way to enumerate the resources 
> in a module, and also get the content/size of resources by "jimage name" that 
> seems to be independent of module name.
> 
> It seems reasonable to introduce an interface for accessing the resources in 
> the jimage ("raw" API as used in some comments). That would have the getSize 
> and getSize methods. A method that enumerates the resources in a module sits 
> above this.

This is a special-case interface used in only 1 place (`JRTArchive`). I'm not 
sure that adding new classes and types is worth it. The docs say:


This API is designed only for use by the jlink classes, which read the raw 
jimage files.


I can add a stronger comment here though.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r3008539913

Reply via email to