RFR: 8368333: [lworld] Add preview mode to ImageReader and JRT file-system [v3]

David Beaumont duke at openjdk.org
Wed Oct 8 19:38:13 UTC 2025


On Wed, 24 Sep 2025 18:36:18 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Manually deleting ImageReaderFactory (it returned somehow)
>
> src/java.base/share/classes/jdk/internal/jimage/ModuleReference.java line 66:
> 
>> 64:     private static final int FLAGS_HAS_NORMAL_VERSION = 0x2;
>> 65:     /** If set, this package exists in preview mode. */
>> 66:     private static final int FLAGS_HAS_PREVIEW_VERSION = 0x4;
> 
> The flags should be aligned with ImageLocation to avoid confusion. Even if in different contexts the meaning (and bits) should be the same to carry-over the concepts.
> 
> The encapsulation of tests for flags helps. It might help in ImageLocation too.

Yes, by making the ImageReader *not* import the flags I can make them private too (thanks for the suggestion).
I will reorder the HAS_PREVIEW_VERSION flag in ModuleReference to have the same value/name.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1619#discussion_r2414838314


More information about the valhalla-dev mailing list