[lworld] RFR: 8373987: [lworld] exploded-image/test broken since disable patching (JDK-8373806)

David Beaumont duke at openjdk.org
Fri Dec 19 16:53:22 UTC 2025


On Fri, 19 Dec 2025 16:21:32 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Hopefully a fix for preview mode with exploded images in classLoader.cpp.
>> 
>> I did a little renaming since now it's clear that "preview mode" isn't a thing that's limited only to a jimage being present.
>
> src/hotspot/share/classfile/classLoader.cpp line 1077:
> 
>> 1075:     if (nullptr == stream) {
>> 1076:       stream = e->open_stream(current, file_name);
>> 1077:     }
> 
> Why not pass in the preview flag to search_module_entries (or use the global) and create and preview file name here?
> Its better encapsulated, with a smaller scope knowing about META-INF.

As I said in the comment, I could. I didn't because search_module_entries is called in two places, and the call for exploded image is the edge case. So passing just a "try this first" path without the logic of accessing the preview mode flag and building the preview path felt simpler for the normal case.
I can't use the global flag inside the method of course, because that triggers it in the non-exploded image case.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1845#discussion_r2635702622


More information about the valhalla-dev mailing list