Skip to content

Commit 564c6f7

Browse files
diguagejhoeller
authored andcommitted
improve the performance of iteration
1 parent a07c786 commit 564c6f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/groovy/GroovyBeanDefinitionReader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ else if (args[0] instanceof Map) {
489489
resolveConstructorArguments(args, 2, hasClosureArgument ? args.length - 1 : args.length);
490490
this.currentBeanDefinition = new GroovyBeanDefinitionWrapper(beanName, (Class<?>) args[1], constructorArgs);
491491
Map<?, ?> namedArgs = (Map<?, ?>) args[0];
492-
for (Object key : namedArgs.keySet()) {
493-
String propName = (String) key;
494-
setProperty(propName, namedArgs.get(propName));
492+
for (Map.Entry<?, ?> entity : namedArgs.entrySet()) {
493+
String propName = (String) entity.getKey();
494+
setProperty(propName, entity.getValue());
495495
}
496496
}
497497
// factory method syntax

0 commit comments

Comments
 (0)