Browse Source

Polishing

pull/30915/head
Juergen Hoeller 2 years ago
parent
commit
449174c7d4
  1. 3
      spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java

3
spring-beans/src/main/java/org/springframework/beans/factory/support/DisposableBeanAdapter.java

@ -116,8 +116,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable { @@ -116,8 +116,7 @@ class DisposableBeanAdapter implements DisposableBean, Runnable, Serializable {
if (!this.invokeAutoCloseable) {
this.destroyMethodNames = destroyMethodNames;
List<Method> destroyMethods = new ArrayList<>(destroyMethodNames.length);
for (int i = 0; i < destroyMethodNames.length; i++) {
String destroyMethodName = destroyMethodNames[i];
for (String destroyMethodName : destroyMethodNames) {
Method destroyMethod = determineDestroyMethod(destroyMethodName);
if (destroyMethod == null) {
if (beanDefinition.isEnforceDestroyMethod()) {

Loading…
Cancel
Save