Skip to content

Commit d65bdce

Browse files
committed
Remove CglibMethodInvocation
This class does not add anything anymore and can be replaced by a plain ReflectiveMethodInvocation. Closes gh-33585
1 parent eebaa35 commit d65bdce

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java

+3-23
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,8 @@ public FixedChainStaticTargetInterceptor(
672672
@Override
673673
@Nullable
674674
public Object intercept(Object proxy, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
675-
MethodInvocation invocation = new CglibMethodInvocation(
676-
proxy, this.target, method, args, this.targetClass, this.adviceChain, methodProxy);
675+
MethodInvocation invocation = new ReflectiveMethodInvocation(
676+
proxy, this.target, method, args, this.targetClass, this.adviceChain);
677677
// If we get here, we need to create a MethodInvocation.
678678
Object retVal = invocation.proceed();
679679
retVal = processReturnType(proxy, this.target, method, args, retVal);
@@ -724,7 +724,7 @@ public Object intercept(Object proxy, Method method, Object[] args, MethodProxy
724724
}
725725
else {
726726
// We need to create a method invocation...
727-
retVal = new CglibMethodInvocation(proxy, target, method, args, targetClass, chain, methodProxy).proceed();
727+
retVal = new ReflectiveMethodInvocation(proxy, target, method, args, targetClass, chain).proceed();
728728
}
729729
return processReturnType(proxy, target, method, args, retVal);
730730
}
@@ -756,26 +756,6 @@ public int hashCode() {
756756
}
757757

758758

759-
/**
760-
* Implementation of AOP Alliance MethodInvocation used by this AOP proxy.
761-
*/
762-
private static class CglibMethodInvocation extends ReflectiveMethodInvocation {
763-
764-
public CglibMethodInvocation(Object proxy, @Nullable Object target, Method method,
765-
Object[] arguments, @Nullable Class<?> targetClass,
766-
List<Object> interceptorsAndDynamicMethodMatchers, MethodProxy methodProxy) {
767-
768-
super(proxy, target, method, arguments, targetClass, interceptorsAndDynamicMethodMatchers);
769-
}
770-
771-
@Override
772-
@Nullable
773-
public Object proceed() throws Throwable {
774-
return super.proceed();
775-
}
776-
}
777-
778-
779759
/**
780760
* CallbackFilter to assign Callbacks to methods.
781761
*/

0 commit comments

Comments
 (0)