HHH-12786 Only define the default constructor
We don't need the others, better not create them in the proxy.
This commit is contained in:
parent
ed53fd5346
commit
f722db367e
|
@ -14,6 +14,7 @@ import org.hibernate.proxy.ProxyConfiguration;
|
|||
|
||||
import net.bytebuddy.NamingStrategy;
|
||||
import net.bytebuddy.description.modifier.Visibility;
|
||||
import net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy;
|
||||
import net.bytebuddy.implementation.FieldAccessor;
|
||||
import net.bytebuddy.implementation.MethodDelegation;
|
||||
import net.bytebuddy.implementation.bytecode.assign.Assigner;
|
||||
|
@ -36,7 +37,7 @@ public class BasicProxyFactoryImpl implements BasicProxyFactory {
|
|||
|
||||
this.proxyClass = bytebuddy.getCurrentyByteBuddy()
|
||||
.with( new NamingStrategy.SuffixingRandom( PROXY_NAMING_SUFFIX, new NamingStrategy.SuffixingRandom.BaseNameResolver.ForFixedValue( superClassOrMainInterface.getName() ) ) )
|
||||
.subclass( superClass == null ? Object.class : superClass )
|
||||
.subclass( superClass == null ? Object.class : superClass, ConstructorStrategy.Default.DEFAULT_CONSTRUCTOR )
|
||||
.implement( interfaces == null ? NO_INTERFACES : interfaces )
|
||||
.defineField( ProxyConfiguration.INTERCEPTOR_FIELD_NAME, ProxyConfiguration.Interceptor.class, Visibility.PRIVATE )
|
||||
.method( ElementMatchers.isVirtual().and( ElementMatchers.not( ElementMatchers.isFinalizer() ) ) )
|
||||
|
|
Loading…
Reference in New Issue