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.28 by dl, Sun Oct 2 22:04:49 2011 UTC vs.
Revision 1.29 by dl, Mon Oct 3 11:20:47 2011 UTC

# Line 391 | Line 391 | public class ConcurrentHashMapV8<K, V>
391      /**
392       * Key-value entry. Note that this is never exported out as a
393       * user-visible Map.Entry (see WriteThroughEntry and SnapshotEntry
394 <     * below). Nodes with a negative hash field are special, and do
394 >     * below). Nodes with a hash field of MOVED are special, and do
395       * not contain user keys or values.  Otherwise, keys are never
396       * null, and null val fields indicate that a node is in the
397       * process of being deleted or created. For purposes of read-only
# Line 934 | Line 934 | public class ConcurrentHashMapV8<K, V>
934                      break;
935              }
936          }
937 +        if (val == null)
938 +            throw new NullPointerException();
939          if (added) {
940              counter.add(1L);
941              if (checkSize)
942                  checkForResize();
943          }
942        else if (val == null)
943            throw new NullPointerException();
944          return val;
945      }
946  
# Line 1689 | Line 1689 | public class ConcurrentHashMapV8<K, V>
1689       * @throws IllegalStateException if the computation detectably
1690       *         attempts a recursive update to this map that would
1691       *         otherwise never complete
1692 <     * @throws RuntimeException or Error if the mappingFunction does so,
1692 >     * @throws RuntimeException or Error if the remappingFunction does so,
1693       *         in which case the mapping is unchanged
1694       */
1695      @SuppressWarnings("unchecked")
# Line 2401 | Line 2401 | public class ConcurrentHashMapV8<K, V>
2401                          }
2402                          table = tab;
2403                          counter.add(size);
2404 <                        sc = n - (n >>> 2) - 1;
2404 >                        sc = n - (n >>> 2);
2405                      }
2406                  } finally {
2407                      sizeCtl = sc;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines