On Fri, 10 Apr 2026 06:25:35 GMT, Jaikiran Pai <[email protected]> wrote:

> Looking briefly at the implementation in the ServiceLoader, this change even 
> impacts services provided by modules.

The attempt to load a provider class from a named module uses the 2-arg 
Class.forName and has always handled the linkage error (SL was one of the first 
users of the 2-arg method). The lookup of the no-arg constructor is "shared" 
with the class path implementation and you are right that maybe further tests 
would be helpful in the future for more of these "broken environment" cases.

For now, the focus here is to get through the behavior change to throw SCE 
consistently.

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

PR Comment: https://git.openjdk.org/jdk/pull/30405#issuecomment-4221760825

Reply via email to