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.66 by jsr166, Mon May 2 21:51:38 2005 UTC vs.
Revision 1.67 by jsr166, Thu May 12 23:57:21 2005 UTC

# Line 937 | Line 937 | public class ConcurrentHashMap<K, V> ext
937       * Remove entry for key only if currently mapped to given value.
938       * This is equivalent to
939       * <pre>
940 <     *  if (map.get(key).equals(value)) {
940 >     *  if (map.containsKey(key) && map.get(key).equals(value)) {
941       *     map.remove(key);
942       *     return true;
943       * } else return false;</pre>
# Line 958 | Line 958 | public class ConcurrentHashMap<K, V> ext
958       * Replaces entry for key only if currently mapped to given value.
959       * This is equivalent to
960       * <pre>
961 <     *  if (map.get(key).equals(oldValue)) {
961 >     *  if (map.containsKey(key) && map.get(key).equals(oldValue)) {
962       *     map.put(key, newValue);
963       *     return true;
964       * } else return false;</pre>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines