HHH-8748 replace Javassist's ProxyObject with Proxy

This commit is contained in:
Brett Meyer 2013-11-26 13:56:20 -05:00
parent 17a58ae033
commit 88c811bead
2 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@ import java.util.HashMap;
import javassist.util.proxy.MethodFilter;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyObject;
import javassist.util.proxy.Proxy;
import org.hibernate.AssertionFailure;
import org.hibernate.HibernateException;
@ -86,7 +86,7 @@ public class ProxyFactoryFactoryImpl implements ProxyFactoryFactory {
public Object getProxy() {
try {
final ProxyObject proxy = (ProxyObject) proxyClass.newInstance();
final Proxy proxy = (Proxy) proxyClass.newInstance();
proxy.setHandler( new PassThroughHandler( proxy, proxyClass.getName() ) );
return proxy;
}

View File

@ -29,8 +29,8 @@ import java.lang.reflect.Method;
import javassist.util.proxy.MethodFilter;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.Proxy;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
import org.hibernate.HibernateException;
import org.hibernate.engine.spi.SessionImplementor;
@ -101,7 +101,7 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me
factory.setFilter( FINALIZE_FILTER );
Class cl = factory.createClass();
final HibernateProxy proxy = ( HibernateProxy ) cl.newInstance();
( ( ProxyObject ) proxy ).setHandler( instance );
( ( Proxy ) proxy ).setHandler( instance );
instance.constructed = true;
return proxy;
}
@ -144,7 +144,7 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me
+ persistentClass.getName(), e
);
}
( ( ProxyObject ) proxy ).setHandler( instance );
( ( Proxy ) proxy ).setHandler( instance );
instance.constructed = true;
return proxy;
}