HHH-17705 Load default bytecode provider using the correct ClassLoader

This commit is contained in:
Marco Belladelli 2024-02-05 12:31:05 +01:00
parent 342ca85c97
commit 0a41fa41f5
No known key found for this signature in database
GPG Key ID: D1D0C3030AE3AA35
1 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,11 @@ public final class BytecodeProviderInitiator implements StandardServiceInitiator
@Internal
public static BytecodeProvider buildDefaultBytecodeProvider() {
return getBytecodeProvider( ServiceLoader.load( BytecodeProvider.class ) );
// Use BytecodeProvider's ClassLoader to ensure we can find the service
return getBytecodeProvider( ServiceLoader.load(
BytecodeProvider.class,
BytecodeProvider.class.getClassLoader()
) );
}
@Internal