Improving effiency of StaticBucketMap.putAll as per COLLECTIONS-320
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@767768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
24921ebe3e
commit
b8a191f6b7
|
@ -382,11 +382,11 @@ public final class StaticBucketMap implements Map {
|
||||||
* @param map the map of entries to add
|
* @param map the map of entries to add
|
||||||
*/
|
*/
|
||||||
public void putAll(Map map) {
|
public void putAll(Map map) {
|
||||||
Iterator i = map.keySet().iterator();
|
Iterator i = map.entrySet().iterator();
|
||||||
|
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
Object key = i.next();
|
Map.Entry entry = (Entry) i.next();
|
||||||
put(key, map.get(key));
|
put(entry.getKey(), entry.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue