--- jsr166/src/jsr166e/ConcurrentHashMapV8.java 2012/12/13 20:34:00 1.82 +++ jsr166/src/jsr166e/ConcurrentHashMapV8.java 2012/12/14 16:33:42 1.83 @@ -1261,7 +1261,7 @@ public class ConcurrentHashMapV8 else { boolean validated = false; boolean deleted = false; - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { validated = true; for (Node e = f, pred = null;;) { @@ -1362,7 +1362,7 @@ public class ConcurrentHashMapV8 return (V)fv; else { Object oldVal = null; - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { len = 1; for (Node e = f;; ++len) { @@ -1410,7 +1410,7 @@ public class ConcurrentHashMapV8 tab = initTable(); else if ((f = tabAt(tab, i = (tab.length - 1) & h)) == null) { Node node = new Node(h, k, null, null); - synchronized(node) { + synchronized (node) { if (casTabAt(tab, i, null, node)) { len = 1; try { @@ -1462,7 +1462,7 @@ public class ConcurrentHashMapV8 return (V)ev; } boolean added = false; - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { len = 1; for (Node e = f;; ++len) { @@ -1516,7 +1516,7 @@ public class ConcurrentHashMapV8 if (onlyIfPresent) break; Node node = new Node(h, k, null, null); - synchronized(node) { + synchronized (node) { if (casTabAt(tab, i, null, node)) { try { len = 1; @@ -1568,7 +1568,7 @@ public class ConcurrentHashMapV8 tab = (Node[])fk; } else { - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { len = 1; for (Node e = f, pred = null;; ++len) { @@ -1665,7 +1665,7 @@ public class ConcurrentHashMapV8 tab = (Node[])fk; } else { - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { len = 1; for (Node e = f, pred = null;; ++len) { @@ -1758,7 +1758,7 @@ public class ConcurrentHashMapV8 } else { int len = 0; - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { len = 1; for (Node e = f;; ++len) { @@ -1833,7 +1833,7 @@ public class ConcurrentHashMapV8 tab = (Node[])fk; } else { - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { for (Node e = f; e != null; e = e.next) { if (e.val != null) { // (currently always true) @@ -1980,7 +1980,7 @@ public class ConcurrentHashMapV8 if (nextTab == null) { // initiating try { nextTab = new Node[n << 1]; - } catch(Throwable ex) { // try to cope with OOME + } catch (Throwable ex) { // try to cope with OOME sizeCtl = Integer.MAX_VALUE; return; } @@ -1989,7 +1989,7 @@ public class ConcurrentHashMapV8 transferIndex = n; Node rev = new Node(MOVED, tab, null, null); for (int k = n; k > 0;) { // progressively reveal ready slots - int nextk = k > stride? k - stride : 0; + int nextk = (k > stride) ? k - stride : 0; for (int m = nextk; m < k; ++m) nextTab[m] = rev; for (int m = n + nextk; m < n + k; ++m) @@ -2011,7 +2011,7 @@ public class ConcurrentHashMapV8 } else if (U.compareAndSwapInt (this, TRANSFERINDEX, nextIndex, - nextBound = (nextIndex > stride? + nextBound = (nextIndex > stride ? nextIndex - stride : 0))) { bound = nextBound; i = nextIndex - 1; @@ -2038,7 +2038,7 @@ public class ConcurrentHashMapV8 } } else if (f.hash >= 0) { - synchronized(f) { + synchronized (f) { if (tabAt(tab, i) == f) { int runBit = f.hash & n; Node lastRun = f, lo = null, hi = null;