From bb231dd378888aefe99b3ff387ee871028420ba4 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Mon, 25 Mar 2013 16:20:52 -0400 Subject: [PATCH] HHH-6496 Added LOG --- .../pojo/javassist/JavassistLazyInitializer.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 7659362473..51c47e1bef 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 @@ -197,7 +197,16 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me } returnValue = thisMethod.invoke( target, args ); } - return returnValue == target && returnValue.getClass().isInstance(proxy) ? proxy : returnValue; + + if ( returnValue == target ) { + if ( returnValue.getClass().isInstance(proxy) ) { + return proxy; + } + else { + LOG.narrowingProxy( returnValue.getClass() ); + } + } + return returnValue; } catch ( InvocationTargetException ite ) { throw ite.getTargetException();