HHH-12328 ByteBuddyInterceptor#intercept should not wrap Exception types

This commit is contained in:
Sanne Grinovero 2018-02-27 18:12:16 +00:00
parent 0fc4294fed
commit e25cf6d76b
1 changed files with 1 additions and 7 deletions

View File

@ -47,13 +47,7 @@ public class ByteBuddyInterceptor extends BasicLazyInitializer implements ProxyC
@Override
public Object intercept(Object proxy, Method thisMethod, Object[] args) throws Throwable {
Object result;
try {
result = this.invoke( thisMethod, args, proxy );
}
catch (Throwable t) {
throw t instanceof RuntimeException ? t : new Exception( t.getCause() );
}
Object result = this.invoke( thisMethod, args, proxy );
if ( result == INVOKE_IMPLEMENTATION ) {
Object target = getImplementation();
final Object returnValue;