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.119 by jsr166, Sun Dec 1 16:56:07 2013 UTC vs.
Revision 1.124 by jsr166, Sun Sep 6 00:57:56 2015 UTC

# Line 15 | Line 15 | import java.lang.reflect.Type;
15   import java.util.AbstractMap;
16   import java.util.Arrays;
17   import java.util.Collection;
18 import java.util.Comparator;
18   import java.util.ConcurrentModificationException;
19   import java.util.Enumeration;
20   import java.util.HashMap;
# Line 489 | Line 488 | public class ConcurrentHashMapV8<K,V> ex
488       *
489       * Maintaining API and serialization compatibility with previous
490       * versions of this class introduces several oddities. Mainly: We
491 <     * leave untouched but unused constructor arguments refering to
491 >     * leave untouched but unused constructor arguments referring to
492       * concurrencyLevel. We accept a loadFactor constructor argument,
493       * but apply it only to initial table capacity (which is the only
494       * time that we can guarantee to honor it.) We also declare an
# Line 638 | Line 637 | public class ConcurrentHashMapV8<K,V> ex
637              this.next = next;
638          }
639  
640 <        public final K getKey()       { return key; }
641 <        public final V getValue()     { return val; }
642 <        public final int hashCode()   { return key.hashCode() ^ val.hashCode(); }
643 <        public final String toString(){ return key + "=" + val; }
640 >        public final K getKey()     { return key; }
641 >        public final V getValue()   { return val; }
642 >        public final int hashCode() { return key.hashCode() ^ val.hashCode(); }
643 >        public final String toString() { return key + "=" + val; }
644          public final V setValue(V value) {
645              throw new UnsupportedOperationException();
646          }
# Line 2417 | Line 2416 | public class ConcurrentHashMapV8<K,V> ex
2416                      return;
2417                  }
2418                  if (U.compareAndSwapInt(this, SIZECTL, sc = sizeCtl, sc - 1)) {
2419 <                    if ((sc - 2) != resizeStamp(n))
2419 >                    if ((sc - 2) != resizeStamp(n) << RESIZE_STAMP_SHIFT)
2420                          return;
2421                      finishing = advance = true;
2422                      i = n; // recheck before commit
# Line 2579 | Line 2578 | public class ConcurrentHashMapV8<K,V> ex
2578          final TreeNode<K,V> findTreeNode(int h, Object k, Class<?> kc) {
2579              if (k != null) {
2580                  TreeNode<K,V> p = this;
2581 <                do  {
2581 >                do {
2582                      int ph, dir; K pk; TreeNode<K,V> q;
2583                      TreeNode<K,V> pl = p.left, pr = p.right;
2584                      if ((ph = p.hash) > h)
# Line 3028 | Line 3027 | public class ConcurrentHashMapV8<K,V> ex
3027  
3028          static <K,V> TreeNode<K,V> balanceDeletion(TreeNode<K,V> root,
3029                                                     TreeNode<K,V> x) {
3030 <            for (TreeNode<K,V> xp, xpl, xpr;;)  {
3030 >            for (TreeNode<K,V> xp, xpl, xpr;;) {
3031                  if (x == null || x == root)
3032                      return root;
3033                  else if ((xp = x.parent) == null) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines