Polishing

This commit is contained in:
Juergen Hoeller
2018-04-01 12:57:19 +02:00
parent 666037ec5c
commit cc379f1cc7
3 changed files with 12 additions and 13 deletions

View File

@@ -563,14 +563,11 @@ class ConfigurationClassEnhancer {
}
}
((Factory) fbProxy).setCallback(0, new MethodInterceptor() {
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
if (method.getName().equals("getObject") && args.length == 0) {
return beanFactory.getBean(beanName);
}
return proxy.invoke(factoryBean, args);
((Factory) fbProxy).setCallback(0, (MethodInterceptor) (obj, method, args, proxy) -> {
if (method.getName().equals("getObject") && args.length == 0) {
return beanFactory.getBean(beanName);
}
return proxy.invoke(factoryBean, args);
});
return fbProxy;