Merge pull request #672 from RyuSangGi/SPR-12363
* SPR-12363: Performance improvement
This commit is contained in:
@@ -127,9 +127,10 @@ public class ModelMap extends LinkedHashMap<String, Object> {
|
||||
*/
|
||||
public ModelMap mergeAttributes(Map<String, ?> attributes) {
|
||||
if (attributes != null) {
|
||||
for (String key : attributes.keySet()) {
|
||||
for (Map.Entry<String, ?> entry : attributes.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if (!containsKey(key)) {
|
||||
put(key, attributes.get(key));
|
||||
put(key, entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user