Add comment on DisposableBean use in @Configuration
Issue: SPR-7901
This commit is contained in:
parent
d3678caa37
commit
d2faef44fa
|
|
@ -163,6 +163,8 @@ class ConfigurationClassEnhancer {
|
||||||
|
|
||||||
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
|
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
|
||||||
Enhancer.registerStaticCallbacks(obj.getClass(), null);
|
Enhancer.registerStaticCallbacks(obj.getClass(), null);
|
||||||
|
// does the actual (non-CGLIB) superclass actually implement DisposableBean?
|
||||||
|
// if so, call its dispose() method. If not, just exit.
|
||||||
if (DisposableBean.class.isAssignableFrom(obj.getClass().getSuperclass())) {
|
if (DisposableBean.class.isAssignableFrom(obj.getClass().getSuperclass())) {
|
||||||
return proxy.invokeSuper(obj, args);
|
return proxy.invokeSuper(obj, args);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue