ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/ConcurrentHashMapV8.java
(Generate patch)

Comparing jsr166/src/jsr166e/ConcurrentHashMapV8.java (file contents):
Revision 1.94 by jsr166, Mon Feb 11 15:25:20 2013 UTC vs.
Revision 1.98 by jsr166, Mon Feb 11 20:52:00 2013 UTC

# Line 4756 | Line 4756 | public class ConcurrentHashMapV8<K, V>
4756              V v;
4757              if ((v = value) == null)
4758                  throw new UnsupportedOperationException();
4759            if (e == null)
4760                throw new NullPointerException();
4759              return map.internalPut(e, v, true) == null;
4760          }
4761          public boolean addAll(Collection<? extends K> c) {
# Line 4766 | Line 4764 | public class ConcurrentHashMapV8<K, V>
4764              if ((v = value) == null)
4765                  throw new UnsupportedOperationException();
4766              for (K e : c) {
4769                if (e == null)
4770                    throw new NullPointerException();
4767                  if (map.internalPut(e, v, true) == null)
4768                      added = true;
4769              }
# Line 4784 | Line 4780 | public class ConcurrentHashMapV8<K, V>
4780      /**
4781       * A view of a ConcurrentHashMapV8 as a {@link Collection} of
4782       * values, in which additions are disabled. This class cannot be
4783 <     * directly instantiated. See {@link #values},
4783 >     * directly instantiated. See {@link #values()}.
4784       *
4785       * <p>The view's {@code iterator} is a "weakly consistent" iterator
4786       * that will never throw {@link ConcurrentModificationException},
# Line 4834 | Line 4830 | public class ConcurrentHashMapV8<K, V>
4830      /**
4831       * A view of a ConcurrentHashMapV8 as a {@link Set} of (key, value)
4832       * entries.  This class cannot be directly instantiated. See
4833 <     * {@link #entrySet}.
4833 >     * {@link #entrySet()}.
4834       */
4835      public static final class EntrySetView<K,V> extends CHMView<K,V>
4836          implements Set<Map.Entry<K,V>> {
# Line 4870 | Line 4866 | public class ConcurrentHashMapV8<K, V>
4866          }
4867  
4868          public final boolean add(Entry<K,V> e) {
4869 <            K key = e.getKey();
4874 <            V value = e.getValue();
4875 <            if (key == null || value == null)
4876 <                throw new NullPointerException();
4877 <            return map.internalPut(key, value, false) == null;
4869 >            return map.internalPut(e.getKey(), e.getValue(), false) == null;
4870          }
4871          public final boolean addAll(Collection<? extends Entry<K,V>> c) {
4872              boolean added = false;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines