Polishing

This commit is contained in:
Juergen Hoeller
2025-04-01 22:12:09 +02:00
parent fbaeaf12bd
commit 34ea0461c7

View File

@@ -277,12 +277,11 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt
this.owner = owner;
}
@Nullable
@Override
@Nullable
public Object intercept(Object obj, Method method, Object[] args, MethodProxy mp) throws Throwable {
ReplaceOverride ro = (ReplaceOverride) getBeanDefinition().getMethodOverrides().getOverride(method);
Assert.state(ro != null, "ReplaceOverride not found");
// TODO could cache if a singleton for minor performance optimization
MethodReplacer mr = this.owner.getBean(ro.getMethodReplacerBeanName(), MethodReplacer.class);
return processReturnType(method, mr.reimplement(obj, method, args));
}