Skip to content

Commit b391629

Browse files
committed
LinkedCaseInsensitiveMap overrides putAll method as well (for IBM JDK 1.6 compatibility; SPR-7969)
1 parent e7d1b5e commit b391629

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

org.springframework.core/src/main/java/org/springframework/util/LinkedCaseInsensitiveMap.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2011 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -92,6 +92,16 @@ public V put(String key, V value) {
9292
return super.put(key, value);
9393
}
9494

95+
@Override
96+
public void putAll(Map<? extends String, ? extends V> map) {
97+
if (map.isEmpty()) {
98+
return;
99+
}
100+
for (Map.Entry<? extends String, ? extends V> entry : map.entrySet()) {
101+
put(entry.getKey(), entry.getValue());
102+
}
103+
}
104+
95105
@Override
96106
public boolean containsKey(Object key) {
97107
return (key instanceof String && this.caseInsensitiveKeys.containsKey(convertKey((String) key)));

0 commit comments

Comments
 (0)