On Thu, 18 Jun 2026 03:59:49 GMT, Chen Liang <[email protected]> wrote:
>> Introduce a `PathResolution` to `ExplodedImage` to remove a lot of ad-hoc >> treatments of preview path discovery. Also some general comments and test >> additions. >> >> One interesting thing is the mainline jimage is not mapping >> `META-INF/preview/file` to `file` when preview is enabled; it does map >> `META-INF/preview/dir/file` to `dir/file`. Don't know if this is intended; >> exploded image performs the first mapping, which differs from jimage. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains seven additional commits since > the last revision: > > - Structural revision per Sherman > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into > cleanup/lw-jrtfs > - Review comments > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into > cleanup/lw-jrtfs > - Review remarks > - Merge branch 'lworld' of https://github.com/openjdk/valhalla into > cleanup/lw-jrtfs > - Cleanup ExplodedImage and enhance SystemImageTest src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java line 324: > 322: node = new PathNode(name, selected, attrs); > 323: } else if (attrs.isDirectory()) { > 324: List<Path> directories = Stream.of(regularPath, previewPath) Should we handle file-vs-directory conflicts like the following here? modules/m/foo/ // regular directory modules/m/META-INF/preview/foo // preview regular file or the reverse case: modules/m/foo // regular file modules/m/META-INF/preview/foo/ // preview directory For example, should we reject these as an invalid layout during node creation, instead of letting `Files.newDirectoryStream(absPath)` throw later from `collectChildNodeNames()`? I would expect us to detect and handle this earlier. Not a blocker, though. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2545#discussion_r3437732335
