Skip to content

Commit 291e755

Browse files
jrenaatsebersole
authored andcommitted
Removed deprecated methods in ProxyFactoryFactory and NoneBasicProxyFactory
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
1 parent 9fc2b3d commit 291e755

File tree

4 files changed

+0
-55
lines changed

4 files changed

+0
-55
lines changed

hibernate-core/src/main/java/org/hibernate/bytecode/internal/bytebuddy/ProxyFactoryFactoryImpl.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
package org.hibernate.bytecode.internal.bytebuddy;
88

9-
import org.hibernate.AssertionFailure;
109
import org.hibernate.bytecode.spi.BasicProxyFactory;
1110
import org.hibernate.bytecode.spi.ProxyFactoryFactory;
1211
import org.hibernate.engine.spi.SessionFactoryImplementor;
@@ -30,21 +29,6 @@ public ProxyFactory buildProxyFactory(SessionFactoryImplementor sessionFactory)
3029
return new ByteBuddyProxyFactory( byteBuddyProxyHelper );
3130
}
3231

33-
@Override
34-
@Deprecated
35-
public BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces) {
36-
if ( superClass == null && ( interfaces == null || interfaces.length == 0 ) ) {
37-
throw new AssertionFailure( "Attempting to build proxy without any superclass or interfaces" );
38-
}
39-
if ( superClass != null && ( interfaces != null && interfaces.length > 0 ) ) {
40-
throw new AssertionFailure( "Ambiguous call: this method can only be invoked with either a superClass or interfaces, not both" );
41-
}
42-
if ( interfaces != null && interfaces.length > 1 ) {
43-
throw new AssertionFailure( "Ambiguous call: this method can only accept a single interfaces, not multiple in the array (legacy expectation)" );
44-
}
45-
return buildBasicProxyFactory( superClass == null ? interfaces[0] : superClass );
46-
}
47-
4832
public BasicProxyFactory buildBasicProxyFactory(Class superClassOrInterface) {
4933
if ( superClassOrInterface.isInterface() ) {
5034
return new BasicProxyFactoryImpl( null, superClassOrInterface, byteBuddyState );

hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoProxyFactoryFactory.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.hibernate.engine.spi.SessionFactoryImplementor;
1212
import org.hibernate.proxy.ProxyFactory;
1313

14-
1514
/**
1615
* When entities are enhanced in advance, proxies are not needed.
1716
*/
@@ -22,11 +21,6 @@ public ProxyFactory buildProxyFactory(SessionFactoryImplementor sessionFactory)
2221
return DisallowedProxyFactory.INSTANCE;
2322
}
2423

25-
@Override
26-
public BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces) {
27-
return new NoneBasicProxyFactory( superClass, interfaces );
28-
}
29-
3024
@Override
3125
public BasicProxyFactory buildBasicProxyFactory(Class superClassOrInterface) {
3226
return new NoneBasicProxyFactory( superClassOrInterface );

hibernate-core/src/main/java/org/hibernate/bytecode/internal/none/NoneBasicProxyFactory.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
*/
77
package org.hibernate.bytecode.internal.none;
88

9-
import org.hibernate.AssertionFailure;
109
import org.hibernate.HibernateException;
1110
import org.hibernate.bytecode.spi.BasicProxyFactory;
1211

@@ -17,20 +16,6 @@ final class NoneBasicProxyFactory implements BasicProxyFactory {
1716

1817
private final Class superClassOrInterface;
1918

20-
@Deprecated
21-
public NoneBasicProxyFactory(Class superClass, Class[] interfaces) {
22-
if ( superClass == null && ( interfaces == null || interfaces.length == 0 ) ) {
23-
throw new AssertionFailure( "Attempting to build proxy without any superclass or interfaces" );
24-
}
25-
if ( superClass != null && ( interfaces != null && interfaces.length > 0 ) ) {
26-
throw new AssertionFailure( "Ambiguous call: this method can only be invoked with either a superClass or interfaces, not both" );
27-
}
28-
if ( interfaces != null && interfaces.length > 1 ) {
29-
throw new AssertionFailure( "Ambiguous call: this method can only accept a single interface, not multiple in the array (legacy expectation now being enforced)" );
30-
}
31-
this.superClassOrInterface = superClass != null ? superClass : interfaces[0];
32-
}
33-
3419
public NoneBasicProxyFactory(Class superClassOrInterface) {
3520
this.superClassOrInterface = superClassOrInterface;
3621
}

hibernate-core/src/main/java/org/hibernate/bytecode/spi/ProxyFactoryFactory.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,6 @@ public interface ProxyFactoryFactory extends Service {
2727
*/
2828
ProxyFactory buildProxyFactory(SessionFactoryImplementor sessionFactory);
2929

30-
/**
31-
* Build a proxy factory for basic proxy concerns. The return
32-
* should be capable of properly handling newInstance() calls.
33-
* <p/>
34-
* Should build basic proxies essentially equivalent to JDK proxies in
35-
* terms of capabilities, but should be able to deal with abstract super
36-
* classes in addition to proxy interfaces.
37-
* <p/>
38-
* Must pass in either superClass or interfaces (or both).
39-
*
40-
* @param superClass The abstract super class (or null if none).
41-
* @param interfaces Interfaces to be proxied (or null if none).
42-
* @deprecated Use {@link #buildBasicProxyFactory(Class)} instead.
43-
* @return The proxy class
44-
*/
45-
@Deprecated
46-
BasicProxyFactory buildBasicProxyFactory(Class superClass, Class[] interfaces);
47-
4830
/**
4931
* Build a proxy factory for basic proxy concerns. The return
5032
* should be capable of properly handling newInstance() calls.

0 commit comments

Comments
 (0)