Avoid scoped destruction callbacks in case of no post-processor actually applying

Issue: SPR-13744
This commit is contained in:
Juergen Hoeller
2015-12-18 17:14:57 +01:00
parent fca5365cf1
commit 2e6eb614b5
3 changed files with 33 additions and 11 deletions

View File

@@ -172,6 +172,11 @@ public class SessionScopeTests {
@Override
public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException {
}
@Override
public boolean requiresDestruction(Object bean) {
return true;
}
}
@@ -195,6 +200,11 @@ public class SessionScopeTests {
((BeanNameAware) bean).setBeanName(null);
}
}
@Override
public boolean requiresDestruction(Object bean) {
return true;
}
}
}