mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-13 22:54:51 +00:00
HHH-9037 Simplified debugging by improving the ClassCastException message from JavassistLazyInitializer.
This commit is contained in:
parent
b755206924
commit
d8e4c51235
@ -187,7 +187,11 @@ public Object invoke(
|
|||||||
try {
|
try {
|
||||||
if ( ReflectHelper.isPublic( persistentClass, thisMethod ) ) {
|
if ( ReflectHelper.isPublic( persistentClass, thisMethod ) ) {
|
||||||
if ( !thisMethod.getDeclaringClass().isInstance( target ) ) {
|
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 );
|
returnValue = thisMethod.invoke( target, args );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user