On 27/03/2020 15:34, Michael Rasmussen wrote:
The ClassLoader used to create the pseudo module-info interface is 
parent-first, so if there are any modules on the classpath, it will try to load 
the module-info.class file from there instead of the synthetic that is being 
generated in the method. This interface is generated if you try to read 
annotations from the Module.

Thanks, I've created JDK-8241770 [1] to track it. The special class loader should never delegate for the generated module-info. Surprised this hasn't come up before now but maybe not too many cases yet where a modular app has a module-info.class on the class path.

-Alan

[1] https://bugs.openjdk.java.net/browse/JDK-8241770

Reply via email to