On Mon, 15 Jun 2026 04:06:11 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).

src/java.base/share/classes/jdk/internal/jrtfs/ExplodedImage.java line 247:

> 245:      * path does not reference a file.
> 246:      */
> 247:     private PathResolution resolveModulesPath(String name) {

Some of the naming is a bit confusing. This method locates a file in an 
exploded module. The parameter is jrt file path of the form 
"/modules/$MODULE/$PATH". I think find a better name, like findFile, as 
"modules path" is too close to "module path".

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

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

Reply via email to