diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeProviderInitiator.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeProviderInitiator.java index 9bcfd20a9c..4e2487540c 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeProviderInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeProviderInitiator.java @@ -15,11 +15,8 @@ import org.hibernate.Internal; import org.hibernate.boot.registry.StandardServiceInitiator; import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; import org.hibernate.bytecode.spi.BytecodeProvider; -import org.hibernate.internal.CoreMessageLogger; import org.hibernate.service.spi.ServiceRegistryImplementor; -import org.jboss.logging.Logger; - import static org.hibernate.internal.util.NullnessUtil.castNonNull; public final class BytecodeProviderInitiator implements StandardServiceInitiator { @@ -78,30 +75,4 @@ public final class BytecodeProviderInitiator implements StandardServiceInitiator } return provider; } - - @Internal - public static BytecodeProvider buildBytecodeProvider(String providerName) { - CoreMessageLogger LOG = Logger.getMessageLogger( CoreMessageLogger.class, BytecodeProviderInitiator.class.getName() ); - LOG.bytecodeProvider( providerName ); - - if ( BYTECODE_PROVIDER_NAME_NONE.equals( providerName ) ) { - return new org.hibernate.bytecode.internal.none.BytecodeProviderImpl(); - } - if ( BYTECODE_PROVIDER_NAME_BYTEBUDDY.equals( providerName ) ) { - return new org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl(); - } - - // There is no need to support plugging in a custom BytecodeProvider via FQCN - // as it's possible to plug a custom BytecodeProviderInitiator into the bootstrap. - // - // This also allows integrators to inject a BytecodeProvider instance which has some - // state: particularly useful to inject proxy definitions which have been prepared in - // advance. - // See also https://hibernate.atlassian.net/browse/HHH-13804 and how this was solved in - // Quarkus. - - LOG.unknownBytecodeProvider( providerName, BYTECODE_PROVIDER_NAME_DEFAULT ); - return new org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl(); - } - }