提交 73e398a1 编写于 作者: S Stephane Nicoll

Merge pull request #672 from RyuSangGi/SPR-12363

* SPR-12363:
  Performance improvement
...@@ -127,9 +127,10 @@ public class ModelMap extends LinkedHashMap<String, Object> { ...@@ -127,9 +127,10 @@ public class ModelMap extends LinkedHashMap<String, Object> {
*/ */
public ModelMap mergeAttributes(Map<String, ?> attributes) { public ModelMap mergeAttributes(Map<String, ?> attributes) {
if (attributes != null) { if (attributes != null) {
for (String key : attributes.keySet()) { for (Map.Entry<String, ?> entry : attributes.entrySet()) {
String key = entry.getKey();
if (!containsKey(key)) { if (!containsKey(key)) {
put(key, attributes.get(key)); put(key, entry.getValue());
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册