Polishing

This commit is contained in:
Juergen Hoeller
2016-11-21 17:36:04 +01:00
parent a49809b1a4
commit da63898d5f
9 changed files with 33 additions and 43 deletions

View File

@@ -211,14 +211,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
for (BeanPostProcessor processor : processors) {
if (processor instanceof DestructionAwareBeanPostProcessor) {
DestructionAwareBeanPostProcessor dabpp = (DestructionAwareBeanPostProcessor) processor;
try {
if (dabpp.requiresDestruction(bean)) {
filteredPostProcessors.add(dabpp);
}
}
catch (AbstractMethodError err) {
// A pre-4.3 third-party DestructionAwareBeanPostProcessor...
// As of 5.0, we can let requiresDestruction be a Java 8 default method which returns true.
if (dabpp.requiresDestruction(bean)) {
filteredPostProcessors.add(dabpp);
}
}