On Tue, 16 Jun 2026 12:36:50 GMT, Alan Bateman <[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).
>
> src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java line 120:
> 
>> 118:             super(name, modulesDirAttrs);
>> 119:             this.resolution = null;
>> 120:             this.childNames = 
>> children.stream().map(Node::getName).sorted().collect(Collectors.toList());
> 
> None of APIs require the list of entries to be sorted.

The other assignments to `childNames` all ensure the list is sorted, such as in 
the lazy computation. I find it weird that we sort inconsistently; I am open to 
removing the sort in the lazy computation method if that is better.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2545#discussion_r3420908958

Reply via email to