From 88c811bead4f261ac7ba8207235ecc6f03aa8391 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Tue, 26 Nov 2013 13:56:20 -0500 Subject: [PATCH] HHH-8748 replace Javassist's ProxyObject with Proxy --- .../internal/javassist/ProxyFactoryFactoryImpl.java | 4 ++-- .../proxy/pojo/javassist/JavassistLazyInitializer.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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; }