RFR: 8336470: Source launcher should work with service loader SPI in unnamed module [v4]
Jaikiran Pai
jpai at openjdk.org
Fri Jul 19 15:35:36 UTC 2024
On Fri, 19 Jul 2024 06:36:03 GMT, Christian Stein <cstein at openjdk.org> wrote:
>> Please review this change adding a missing resource file test to the `MemoryClassLoader::findResource` override in order to resolve all files beneath the source root path in source launch mode - analog to what was already implemented for `MemoryClassLoader::getResource`.
>>
>> With this change applied, files in `META-INF/services/` are resolved; allowing services providers being supplied in source form.
>
> Christian Stein has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixup line endings
src/jdk.compiler/share/classes/com/sun/tools/javac/launcher/MemoryClassLoader.java line 277:
> 275: * @return the URL of the resource, or null
> 276: */
> 277: private URL toResourceInRootPath(String name) {
Is this method expected to return `URL` to a `.class` file too? The reason I ask this is, I notice that for classes that belong within the source java file we use a different protocol scheme for the URIs. Is that `sourcelauncher-` protocol meant only for classes that are part of the source file that is launched?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20193#discussion_r1684549504
More information about the compiler-dev
mailing list