Author: bayard Date: Thu Apr 23 02:45:32 2009 New Revision: 767768 URL: http://svn.apache.org/viewvc?rev=767768&view=rev Log: Improving effiency of StaticBucketMap.putAll as per COLLECTIONS-320
Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/StaticBucketMap.java Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/StaticBucketMap.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/StaticBucketMap.java?rev=767768&r1=767767&r2=767768&view=diff ============================================================================== --- commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/StaticBucketMap.java (original) +++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/map/StaticBucketMap.java Thu Apr 23 02:45:32 2009 @@ -382,11 +382,11 @@ * @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()); } }