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:
Henri Yandell 2009-04-23 02:45:32 +00:00
parent 24921ebe3e
commit b8a191f6b7
1 changed files with 3 additions and 3 deletions

View File

@ -382,11 +382,11 @@ public final class StaticBucketMap implements Map {
* @param map the map of entries to add
*/
public void putAll(Map map) {
Iterator i = map.keySet().iterator();
Iterator i = map.entrySet().iterator();
while (i.hasNext()) {
Object key = i.next();
put(key, map.get(key));
Map.Entry entry = (Entry) i.next();
put(entry.getKey(), entry.getValue());
}
}