RFR: 8336470: Source launcher should work with service loader SPI in unnamed module [v7]
Christian Stein
cstein at openjdk.org
Fri May 9 09:47:12 UTC 2025
On Fri, 9 May 2025 09:26:29 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hm, if it missing, it was missing before. I moved the line from the former location with a different variable name:
>> `var programPath = programDescriptor.sourceRootPath().resolve(name);` into this new helper method. All tests and manual usages remain "green".
>>
>> Which kind of mapping are you missing here? From `/` to `\` or `.`?
>
> In java.base, look at jdk.internal.module.Resources.toFilePath to see how the built-in class loaders map resource names to relative file paths. I don't think you'll need as much here. My point is that a resource name can't be be used a file path. Also it's okay if you want to separate it to a separate issue, it's just something that jumps out when scanning this.
Right. With `jdk.internal.module.Resources` being already used in the `MemoryModuleFinder` sibling, I'll replace the too simple `.resolve(name)` as suggested and in this PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20193#discussion_r2081327935
More information about the compiler-dev
mailing list