diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/javassist/ProxyFactoryFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/javassist/ProxyFactoryFactoryImpl.java index 7dffeedd2c..120f092025 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/internal/javassist/ProxyFactoryFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/internal/javassist/ProxyFactoryFactoryImpl.java @@ -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; } diff --git a/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java b/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java index 6318789cc2..b539e71789 100644 --- a/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java +++ b/hibernate-core/src/main/java/org/hibernate/proxy/pojo/javassist/JavassistLazyInitializer.java @@ -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; }