Removed deprecated methods in ProxyFactoryFactory and NoneBasicProxyFactory
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
9fc2b3dea5
commit
291e755686
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
* <p/>
|
||||
* 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.
|
||||
* <p/>
|
||||
* 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.
|
||||
|
|
Loading…
Reference in New Issue