HHH-9037 Simplified debugging by improving the ClassCastException message from JavassistLazyInitializer.
This commit is contained in:
parent
552301bdc4
commit
a69c6c7dff
|
@ -187,7 +187,11 @@ public class JavassistLazyInitializer extends BasicLazyInitializer implements Me
|
|||
try {
|
||||
if ( ReflectHelper.isPublic( persistentClass, thisMethod ) ) {
|
||||
if ( !thisMethod.getDeclaringClass().isInstance( target ) ) {
|
||||
throw new ClassCastException( target.getClass().getName() );
|
||||
throw new ClassCastException(
|
||||
target.getClass().getName()
|
||||
+ " incompatible with "
|
||||
+ thisMethod.getDeclaringClass().getName()
|
||||
);
|
||||
}
|
||||
returnValue = thisMethod.invoke( target, args );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue