Polishing

This commit is contained in:
Juergen Hoeller 2023-06-26 12:35:09 +02:00
parent 9266e6d29e
commit 449174c7d4
1 changed files with 1 additions and 2 deletions

View File

@ -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()) {