diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ProxyFactoryFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ProxyFactoryFactoryImpl.java index 6f05d8a00f..ecb02e2fe1 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ProxyFactoryFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ProxyFactoryFactoryImpl.java @@ -6,7 +6,6 @@ */ package org.hibernate.bytecode.internal.bytebuddy; -import org.hibernate.AssertionFailure; import org.hibernate.bytecode.spi.BasicProxyFactory; import org.hibernate.bytecode.spi.ProxyFactoryFactory; import org.hibernate.engine.spi.SessionFactoryImplementor; @@ -30,21 +29,6 @@ public class ProxyFactoryFactoryImpl implements ProxyFactoryFactory { return new ByteBuddyProxyFactory( byteBuddyProxyHelper ); } - @Override - @Deprecated - public BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces) { - if ( superClass == null && ( interfaces == null || interfaces.length == 0 ) ) { - throw new AssertionFailure( "Attempting to build proxy without any superclass or interfaces" ); - } - if ( superClass != null && ( interfaces != null && interfaces.length > 0 ) ) { - throw new AssertionFailure( "Ambiguous call: this method can only be invoked with either a superClass or interfaces, not both" ); - } - if ( interfaces != null && interfaces.length > 1 ) { - throw new AssertionFailure( "Ambiguous call: this method can only accept a single interfaces, not multiple in the array (legacy expectation)" ); - } - return buildBasicProxyFactory( superClass == null ? interfaces[0] : superClass ); - } - public BasicProxyFactory buildBasicProxyFactory(Class superClassOrInterface) { if ( superClassOrInterface.isInterface() ) { return new BasicProxyFactoryImpl( null, superClassOrInterface, byteBuddyState ); diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoProxyFactoryFactory.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoProxyFactoryFactory.java index e01d97ac87..7713a6db52 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoProxyFactoryFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoProxyFactoryFactory.java @@ -11,7 +11,6 @@ import org.hibernate.bytecode.spi.ProxyFactoryFactory; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.proxy.ProxyFactory; - /** * When entities are enhanced in advance, proxies are not needed. */ @@ -22,11 +21,6 @@ final class NoProxyFactoryFactory implements ProxyFactoryFactory { return DisallowedProxyFactory.INSTANCE; } - @Override - public BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces) { - return new NoneBasicProxyFactory( superClass, interfaces ); - } - @Override public BasicProxyFactory buildBasicProxyFactory(Class superClassOrInterface) { return new NoneBasicProxyFactory( superClassOrInterface ); diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoneBasicProxyFactory.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoneBasicProxyFactory.java index bd440c8170..4a2e206d5f 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoneBasicProxyFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoneBasicProxyFactory.java @@ -6,7 +6,6 @@ */ package org.hibernate.bytecode.internal.none; -import org.hibernate.AssertionFailure; import org.hibernate.HibernateException; import org.hibernate.bytecode.spi.BasicProxyFactory; @@ -17,20 +16,6 @@ final class NoneBasicProxyFactory implements BasicProxyFactory { private final Class superClassOrInterface; - @Deprecated - public NoneBasicProxyFactory(Class superClass, Class[] interfaces) { - if ( superClass == null && ( interfaces == null || interfaces.length == 0 ) ) { - throw new AssertionFailure( "Attempting to build proxy without any superclass or interfaces" ); - } - if ( superClass != null && ( interfaces != null && interfaces.length > 0 ) ) { - throw new AssertionFailure( "Ambiguous call: this method can only be invoked with either a superClass or interfaces, not both" ); - } - if ( interfaces != null && interfaces.length > 1 ) { - throw new AssertionFailure( "Ambiguous call: this method can only accept a single interface, not multiple in the array (legacy expectation now being enforced)" ); - } - this.superClassOrInterface = superClass != null ? superClass : interfaces[0]; - } - public NoneBasicProxyFactory(Class superClassOrInterface) { this.superClassOrInterface = superClassOrInterface; } diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/spi/ProxyFactoryFactory.java b/hibernate-core/src/main/java/org/hibernate/bytecode/spi/ProxyFactoryFactory.java index 48aeef4b51..34c31efc16 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/spi/ProxyFactoryFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/spi/ProxyFactoryFactory.java @@ -27,24 +27,6 @@ public interface ProxyFactoryFactory extends Service { */ ProxyFactory buildProxyFactory(SessionFactoryImplementor sessionFactory); - /** - * Build a proxy factory for basic proxy concerns. The return - * should be capable of properly handling newInstance() calls. - *
- * Should build basic proxies essentially equivalent to JDK proxies in - * terms of capabilities, but should be able to deal with abstract super - * classes in addition to proxy interfaces. - * - * Must pass in either superClass or interfaces (or both). - * - * @param superClass The abstract super class (or null if none). - * @param interfaces Interfaces to be proxied (or null if none). - * @deprecated Use {@link #buildBasicProxyFactory(Class)} instead. - * @return The proxy class - */ - @Deprecated - BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces); - /** * Build a proxy factory for basic proxy concerns. The return * should be capable of properly handling newInstance() calls.