On Fri, 13 Mar 2026 10:47:09 GMT, David Beaumont <[email protected]> wrote:
>> True ... I think. I'll double check and change it if so (maybe with a >> comment). > > Ahh, I've remembered. It *used* to be true that you only needed to test the > flag, but the changes in the 2nd PR (adding exploded image support) mean that > the flag is now also used for that too, and needs to be usable when no jimage > is opened, but this function is purely about whether the both the jimage and > the flag are present and usable. > > This is why I changed the flag status names from "JIMAGE_XXX" to > "PREVIEW_MODE_XXX" because the flag isn't limited to jimage use now, but the > function stays as "jimage_is_initialized" not "preview_mode_is_initialized". > > See: > https://github.com/openjdk/valhalla/commit/423e6934ad7e50f8c13ec2a79a2f6adf36584856 > for where the semantics changed (slightly). Are you are sure that ClassPathImageEntry::open_stream_for_loader can't use Arguments::enable_preview to test if preview features are enabled? The command line has --enable-preview or it doesn't, so I think I'm missing the sequencing that requires PREVIEW_MODE_UNINITIALIZED. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r2931433534
