ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.83 by jsr166, Mon Aug 22 03:42:10 2005 UTC vs.
Revision 1.84 by jsr166, Sat Sep 10 09:36:20 2005 UTC

# Line 899 | Line 899 | public class ConcurrentHashMap<K, V> ext
899       * @param m mappings to be stored in this map
900       */
901      public void putAll(Map<? extends K, ? extends V> m) {
902 <        for (Iterator<? extends Map.Entry<? extends K, ? extends V>> it = (Iterator<? extends Map.Entry<? extends K, ? extends V>>) m.entrySet().iterator(); it.hasNext(); ) {
903 <            Entry<? extends K, ? extends V> e = it.next();
902 >        for (Map.Entry<? extends K, ? extends V> e : m.entrySet())
903              put(e.getKey(), e.getValue());
905        }
904      }
905  
906      /**
# Line 911 | Line 909 | public class ConcurrentHashMap<K, V> ext
909       *
910       * @param  key the key that needs to be removed
911       * @return the previous value associated with <tt>key</tt>, or
912 <     *         <tt>null</tt> if there was no mapping for <tt>key</tt>.
912 >     *         <tt>null</tt> if there was no mapping for <tt>key</tt>
913       * @throws NullPointerException if the specified key is null
914       */
915      public V remove(Object key) {
916 <        int hash = hash(key);
916 >        int hash = hash(key);
917          return segmentFor(hash).remove(key, hash, null);
918      }
919  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines