RFR: 8368333: [lworld] Add preview mode to ImageReader and JRT file-system [v3]
David Beaumont
duke at openjdk.org
Wed Oct 8 23:26:57 UTC 2025
On Wed, 8 Oct 2025 19:35:33 GMT, David Beaumont <duke at openjdk.org> wrote:
>> 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.
This also entails a small (temporary) change to image writing code (until the next PR).
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1619#discussion_r2415223171
More information about the valhalla-dev
mailing list