Remove CglibMethodInvocation
This class does not add anything anymore and can be replaced by a plain ReflectiveMethodInvocation. Closes gh-33585
This commit is contained in:
parent
eebaa3538a
commit
d65bdce0e8
|
@ -672,8 +672,8 @@ class CglibAopProxy implements AopProxy, Serializable {
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
@Nullable
|
||||||
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
|
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
|
||||||
MethodInvocation invocation = new CglibMethodInvocation(
|
MethodInvocation invocation = new ReflectiveMethodInvocation(
|
||||||
proxy, this.target, method, args, this.targetClass, this.adviceChain, methodProxy);
|
proxy, this.target, method, args, this.targetClass, this.adviceChain);
|
||||||
// If we get here, we need to create a MethodInvocation.
|
// If we get here, we need to create a MethodInvocation.
|
||||||
Object retVal = invocation.proceed();
|
Object retVal = invocation.proceed();
|
||||||
retVal = processReturnType(proxy, this.target, method, args, retVal);
|
retVal = processReturnType(proxy, this.target, method, args, retVal);
|
||||||
|
@ -724,7 +724,7 @@ class CglibAopProxy implements AopProxy, Serializable {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// We need to create a method invocation...
|
// We need to create a method invocation...
|
||||||
retVal = new CglibMethodInvocation(proxy, target, method, args, targetClass, chain, methodProxy).proceed();
|
retVal = new ReflectiveMethodInvocation(proxy, target, method, args, targetClass, chain).proceed();
|
||||||
}
|
}
|
||||||
return processReturnType(proxy, target, method, args, retVal);
|
return processReturnType(proxy, target, method, args, retVal);
|
||||||
}
|
}
|
||||||
|
@ -756,26 +756,6 @@ class CglibAopProxy implements AopProxy, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementation of AOP Alliance MethodInvocation used by this AOP proxy.
|
|
||||||
*/
|
|
||||||
private static class CglibMethodInvocation extends ReflectiveMethodInvocation {
|
|
||||||
|
|
||||||
public CglibMethodInvocation(Object proxy, @Nullable Object target, Method method,
|
|
||||||
Object[] arguments, @Nullable Class<?> targetClass,
|
|
||||||
List<Object> interceptorsAndDynamicMethodMatchers, MethodProxy methodProxy) {
|
|
||||||
|
|
||||||
super(proxy, target, method, arguments, targetClass, interceptorsAndDynamicMethodMatchers);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nullable
|
|
||||||
public Object proceed() throws Throwable {
|
|
||||||
return super.proceed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CallbackFilter to assign Callbacks to methods.
|
* CallbackFilter to assign Callbacks to methods.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue