--- jsr166/src/jsr166e/ConcurrentHashMapV8.java 2011/10/03 11:20:47 1.29 +++ jsr166/src/jsr166e/ConcurrentHashMapV8.java 2011/12/19 19:18:35 1.34 @@ -71,7 +71,7 @@ import java.io.Serializable; * versions of this class, constructors may optionally specify an * expected {@code concurrencyLevel} as an additional hint for * internal sizing. Note that using many keys with exactly the same - * {@code hashCode{}} is a sure way to slow down performance of any + * {@code hashCode()} is a sure way to slow down performance of any * hash table. * *

This class and its views and iterators implement all of the @@ -595,7 +595,7 @@ public class ConcurrentHashMapV8 } finally { if (!f.casHash(fh | LOCKED, fh)) { f.hash = fh; - synchronized(f) { f.notifyAll(); }; + synchronized (f) { f.notifyAll(); }; } } if (validated) { @@ -752,7 +752,7 @@ public class ConcurrentHashMapV8 } finally { if (!f.casHash(fh | LOCKED, fh)) { f.hash = fh; - synchronized(f) { f.notifyAll(); }; + synchronized (f) { f.notifyAll(); }; } } if (validated) { @@ -789,7 +789,7 @@ public class ConcurrentHashMapV8 setTabAt(tab, i, null); if (!node.casHash(fh, h)) { node.hash = h; - synchronized(node) { node.notifyAll(); }; + synchronized (node) { node.notifyAll(); }; } } } @@ -843,7 +843,7 @@ public class ConcurrentHashMapV8 } finally { if (!f.casHash(fh | LOCKED, fh)) { f.hash = fh; - synchronized(f) { f.notifyAll(); }; + synchronized (f) { f.notifyAll(); }; } } if (validated) @@ -1002,7 +1002,7 @@ public class ConcurrentHashMapV8 } finally { if (!f.casHash(fh | LOCKED, fh)) { f.hash = fh; - synchronized(f) { f.notifyAll(); }; + synchronized (f) { f.notifyAll(); }; } } if (validated) { @@ -1099,7 +1099,7 @@ public class ConcurrentHashMapV8 while ((sc = sizeCtl) >= 0) { Node[] tab = table; int n; if (tab == null || (n = tab.length) == 0) { - n = (sc > c)? sc : c; + n = (sc > c) ? sc : c; if (UNSAFE.compareAndSwapInt(this, sizeCtlOffset, sc, -1)) { try { if (table == tab) { @@ -1150,7 +1150,7 @@ public class ConcurrentHashMapV8 continue; } else { // transiently use a locked forwarding node - Node g = new Node(MOVED|LOCKED, nextTab, null, null); + Node g = new Node(MOVED|LOCKED, nextTab, null, null); if (!casTabAt(tab, i, f, g)) continue; setTabAt(nextTab, i, null); @@ -1271,7 +1271,7 @@ public class ConcurrentHashMapV8 } finally { if (!f.casHash(fh | LOCKED, fh)) { f.hash = fh; - synchronized(f) { f.notifyAll(); }; + synchronized (f) { f.notifyAll(); }; } } if (validated) @@ -1460,8 +1460,8 @@ public class ConcurrentHashMapV8 if (initialCapacity < concurrencyLevel) // Use at least as many bins initialCapacity = concurrencyLevel; // as estimated threads long size = (long)(1.0 + (long)initialCapacity / loadFactor); - int cap = ((size >= (long)MAXIMUM_CAPACITY) ? - MAXIMUM_CAPACITY: tableSizeFor((int)size)); + int cap = ((size >= (long)MAXIMUM_CAPACITY) ? + MAXIMUM_CAPACITY: tableSizeFor((int)size)); this.counter = new LongAdder(); this.sizeCtl = cap; } @@ -2187,7 +2187,7 @@ public class ConcurrentHashMapV8 return true; } - public final boolean removeAll(Collection c) { + public final boolean removeAll(Collection c) { boolean modified = false; for (Iterator it = iter(); it.hasNext();) { if (c.contains(it.next())) { @@ -2237,7 +2237,7 @@ public class ConcurrentHashMapV8 } static final class Values extends MapView - implements Collection { + implements Collection { Values(ConcurrentHashMapV8 map) { super(map); } public final boolean contains(Object o) { return map.containsValue(o); } @@ -2267,7 +2267,7 @@ public class ConcurrentHashMapV8 } } - static final class EntrySet extends MapView + static final class EntrySet extends MapView implements Set> { EntrySet(ConcurrentHashMapV8 map) { super(map); }