HHH-8748 replace Javassist's ProxyObject with Proxy
Conflicts: hibernate-core/src/main/java/org/hibernate/bytecode/internal/javassist/ProxyFactoryFactoryImpl.java hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java
This commit is contained in:
parent
50a73150da
commit
e38cb21ef2
|
@ -28,7 +28,7 @@ import java.util.HashMap;
|
||||||
|
|
||||||
import javassist.util.proxy.MethodFilter;
|
import javassist.util.proxy.MethodFilter;
|
||||||
import javassist.util.proxy.MethodHandler;
|
import javassist.util.proxy.MethodHandler;
|
||||||
import javassist.util.proxy.ProxyObject;
|
import javassist.util.proxy.Proxy;
|
||||||
|
|
||||||
import org.hibernate.AssertionFailure;
|
import org.hibernate.AssertionFailure;
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
|
@ -77,7 +77,7 @@ public class ProxyFactoryFactoryImpl implements ProxyFactoryFactory {
|
||||||
|
|
||||||
public Object getProxy() {
|
public Object getProxy() {
|
||||||
try {
|
try {
|
||||||
ProxyObject proxy = ( ProxyObject ) proxyClass.newInstance();
|
final Proxy proxy = (Proxy) proxyClass.newInstance();
|
||||||
proxy.setHandler( new PassThroughHandler( proxy, proxyClass.getName() ) );
|
proxy.setHandler( new PassThroughHandler( proxy, proxyClass.getName() ) );
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,8 @@ import java.lang.reflect.Method;
|
||||||
|
|
||||||
import javassist.util.proxy.MethodFilter;
|
import javassist.util.proxy.MethodFilter;
|
||||||
import javassist.util.proxy.MethodHandler;
|
import javassist.util.proxy.MethodHandler;
|
||||||
|
import javassist.util.proxy.Proxy;
|
||||||
import javassist.util.proxy.ProxyFactory;
|
import javassist.util.proxy.ProxyFactory;
|
||||||
import javassist.util.proxy.ProxyObject;
|
|
||||||
import org.jboss.logging.Logger;
|
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.engine.spi.SessionImplementor;
|
import org.hibernate.engine.spi.SessionImplementor;
|
||||||
|
@ -40,6 +39,7 @@ import org.hibernate.internal.util.ReflectHelper;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import org.hibernate.proxy.HibernateProxy;
|
||||||
import org.hibernate.proxy.pojo.BasicLazyInitializer;
|
import org.hibernate.proxy.pojo.BasicLazyInitializer;
|
||||||
import org.hibernate.type.CompositeType;
|
import org.hibernate.type.CompositeType;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Javassist-based lazy initializer proxy.
|
* A Javassist-based lazy initializer proxy.
|
||||||
|
@ -102,7 +102,7 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me
|
||||||
factory.setFilter( FINALIZE_FILTER );
|
factory.setFilter( FINALIZE_FILTER );
|
||||||
Class cl = factory.createClass();
|
Class cl = factory.createClass();
|
||||||
final HibernateProxy proxy = ( HibernateProxy ) cl.newInstance();
|
final HibernateProxy proxy = ( HibernateProxy ) cl.newInstance();
|
||||||
( ( ProxyObject ) proxy ).setHandler( instance );
|
( ( Proxy ) proxy ).setHandler( instance );
|
||||||
instance.constructed = true;
|
instance.constructed = true;
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me
|
||||||
+ persistentClass.getName(), e
|
+ persistentClass.getName(), e
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
( ( ProxyObject ) proxy ).setHandler( instance );
|
( ( Proxy ) proxy ).setHandler( instance );
|
||||||
instance.constructed = true;
|
instance.constructed = true;
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue