File tree Expand file tree Collapse file tree 4 files changed +0
-55
lines changed
hibernate-core/src/main/java/org/hibernate/bytecode Expand file tree Collapse file tree 4 files changed +0
-55
lines changed Original file line number Diff line number Diff line change 66 */
77package org .hibernate .bytecode .internal .bytebuddy ;
88
9- import org .hibernate .AssertionFailure ;
109import org .hibernate .bytecode .spi .BasicProxyFactory ;
1110import org .hibernate .bytecode .spi .ProxyFactoryFactory ;
1211import 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 );
Original file line number Diff line number Diff line change 1111import org .hibernate .engine .spi .SessionFactoryImplementor ;
1212import 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 );
Original file line number Diff line number Diff line change 66 */
77package org .hibernate .bytecode .internal .none ;
88
9- import org .hibernate .AssertionFailure ;
109import org .hibernate .HibernateException ;
1110import 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 }
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments