On Tue, 14 Apr 2026 11:29:06 GMT, David Beaumont <[email protected]> wrote:
>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java
>> line 158:
>>
>>> 156: // may also get
>>> "/mod-name/META-INF/preview/pkg-path/resource-name"
>>> 157: String name = res.path();
>>> 158: if (name.charAt(0) == '/') {
>>
>> All CLASS_OR_RESOURCE resources should be prefixed with `/<module-name>` so
>> I'm wondering about it checks for a leading "/" here. It's benign of course
>> but I'm wondering if there is some scenario where it happens.
>
> I don't think there is, but again this comes back to my unfamiliarity with
> the overarching semantics of some of this code.
I suspect that someone assumed at one point that it might be possible to
include an unnamed module or other random resources in the run-time image,
which isn't the case.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r3084806235