[lworld] RFR: 8372038: [lworld] Update ExplodedImage to use preview mode correctly

David Beaumont duke at openjdk.org
Thu Nov 20 20:49:34 UTC 2025


On Tue, 18 Nov 2025 00:10:39 GMT, David Beaumont <duke at openjdk.org> wrote:

> Adds preview mode support for ExplodedImage.
> 
> Adds tests so both ExplodedImage and ImageReader implementations of SystemImage are tested with exactly the same test data and assertions.

src/java.base/share/classes/jdk/internal/jrtfs/SystemImage.java line 52:

> 50:  */
> 51: @SuppressWarnings({"removal", "suppression"})
> 52: public abstract class SystemImage implements AutoCloseable {

This is the cost of not using whitebox testing, we're making SystemImage and its methods and two static factory methods public.

test/jdk/jdk/internal/jimage/ImageReaderTest.java line 1:

> 1: /*

A lot (but not all) or this is now covered by SystemImageTest, but I'm also happy to leave it here.
The methods taking (<module>, <resource-path>) are NOT tested by SystemImageTest, so at least they would always need to be kept here.

test/jdk/jdk/internal/jrtfs/SystemImageTest.java line 1:

> 1: /*

Almost entirely a duplicate of ImageReaderTest in terms of the test data and assertions being made, but this obviously also tests ExplodedImage for parity.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1743#discussion_r2547584036
PR Review Comment: https://git.openjdk.org/valhalla/pull/1743#discussion_r2547590626
PR Review Comment: https://git.openjdk.org/valhalla/pull/1743#discussion_r2547593885


More information about the valhalla-dev mailing list