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

David Beaumont duke at openjdk.org
Wed Nov 26 16:04:12 UTC 2025


On Wed, 26 Nov 2025 15:23:08 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> David Beaumont has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixing duplicate elements
>
> src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java line 112:
> 
>> 110:         private PathNode(String name, List<PathNode> children) {    // dir
>> 111:             super(name, modulesDirAttrs);
>> 112:             this.childNames = children.stream().map(Node::getName).collect(toList());
> 
> How is this different than using `Stream.toList()`?  
> It makes the static import of `toList` unnecessary; (Static imports are hard to follow/read if not using an IDE).

JDK-8 limited source.

toList() is *so* idiomatic and normal with streams, I don't personally see any risk of it not being intuitively obvious what it's doing.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1743#discussion_r2565564754


More information about the valhalla-dev mailing list