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.114 by dl, Fri Aug 9 18:43:44 2013 UTC vs.
Revision 1.115 by jsr166, Fri Aug 23 20:12:21 2013 UTC

# Line 1446 | Line 1446 | public class ConcurrentHashMapV8<K,V> ex
1446                  int sz = (int)size;
1447                  n = tableSizeFor(sz + (sz >>> 1) + 1);
1448              }
1449 <            @SuppressWarnings({"rawtypes","unchecked"})
1450 <                Node<K,V>[] tab = (Node<K,V>[])new Node[n];
1449 >            @SuppressWarnings("unchecked")
1450 >                Node<K,V>[] tab = (Node<K,V>[])new Node<?,?>[n];
1451              int mask = n - 1;
1452              long added = 0L;
1453              while (p != null) {
# Line 2205 | Line 2205 | public class ConcurrentHashMapV8<K,V> ex
2205                  try {
2206                      if ((tab = table) == null || tab.length == 0) {
2207                          int n = (sc > 0) ? sc : DEFAULT_CAPACITY;
2208 <                        @SuppressWarnings({"rawtypes","unchecked"})
2209 <                            Node<K,V>[] nt = (Node<K,V>[])new Node[n];
2208 >                        @SuppressWarnings("unchecked")
2209 >                            Node<K,V>[] nt = (Node<K,V>[])new Node<?,?>[n];
2210                          table = tab = nt;
2211                          sc = n - (n >>> 2);
2212                      }
# Line 2297 | Line 2297 | public class ConcurrentHashMapV8<K,V> ex
2297                  if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) {
2298                      try {
2299                          if (table == tab) {
2300 <                            @SuppressWarnings({"rawtypes","unchecked"})
2301 <                                Node<K,V>[] nt = (Node<K,V>[])new Node[n];
2300 >                            @SuppressWarnings("unchecked")
2301 >                                Node<K,V>[] nt = (Node<K,V>[])new Node<?,?>[n];
2302                              table = nt;
2303                              sc = n - (n >>> 2);
2304                          }
# Line 2325 | Line 2325 | public class ConcurrentHashMapV8<K,V> ex
2325              stride = MIN_TRANSFER_STRIDE; // subdivide range
2326          if (nextTab == null) {            // initiating
2327              try {
2328 <                @SuppressWarnings({"rawtypes","unchecked"})
2329 <                    Node<K,V>[] nt = (Node<K,V>[])new Node[n << 1];
2328 >                @SuppressWarnings("unchecked")
2329 >                    Node<K,V>[] nt = (Node<K,V>[])new Node<?,?>[n << 1];
2330                  nextTab = nt;
2331              } catch (Throwable ex) {      // try to cope with OOME
2332                  sizeCtl = Integer.MAX_VALUE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines