ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.244 by dl, Fri Aug 9 18:43:41 2013 UTC vs.
Revision 1.245 by jsr166, Fri Aug 23 20:12:21 2013 UTC

# Line 1409 | Line 1409 | public class ConcurrentHashMap<K,V> exte
1409                  int sz = (int)size;
1410                  n = tableSizeFor(sz + (sz >>> 1) + 1);
1411              }
1412 <            @SuppressWarnings({"rawtypes","unchecked"})
1413 <                Node<K,V>[] tab = (Node<K,V>[])new Node[n];
1412 >            @SuppressWarnings("unchecked")
1413 >                Node<K,V>[] tab = (Node<K,V>[])new Node<?,?>[n];
1414              int mask = n - 1;
1415              long added = 0L;
1416              while (p != null) {
# Line 2170 | Line 2170 | public class ConcurrentHashMap<K,V> exte
2170                  try {
2171                      if ((tab = table) == null || tab.length == 0) {
2172                          int n = (sc > 0) ? sc : DEFAULT_CAPACITY;
2173 <                        @SuppressWarnings({"rawtypes","unchecked"})
2174 <                            Node<K,V>[] nt = (Node<K,V>[])new Node[n];
2173 >                        @SuppressWarnings("unchecked")
2174 >                            Node<K,V>[] nt = (Node<K,V>[])new Node<?,?>[n];
2175                          table = tab = nt;
2176                          sc = n - (n >>> 2);
2177                      }
# Line 2261 | Line 2261 | public class ConcurrentHashMap<K,V> exte
2261                  if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) {
2262                      try {
2263                          if (table == tab) {
2264 <                            @SuppressWarnings({"rawtypes","unchecked"})
2265 <                                Node<K,V>[] nt = (Node<K,V>[])new Node[n];
2264 >                            @SuppressWarnings("unchecked")
2265 >                                Node<K,V>[] nt = (Node<K,V>[])new Node<?,?>[n];
2266                              table = nt;
2267                              sc = n - (n >>> 2);
2268                          }
# Line 2289 | Line 2289 | public class ConcurrentHashMap<K,V> exte
2289              stride = MIN_TRANSFER_STRIDE; // subdivide range
2290          if (nextTab == null) {            // initiating
2291              try {
2292 <                @SuppressWarnings({"rawtypes","unchecked"})
2293 <                    Node<K,V>[] nt = (Node<K,V>[])new Node[n << 1];
2292 >                @SuppressWarnings("unchecked")
2293 >                    Node<K,V>[] nt = (Node<K,V>[])new Node<?,?>[n << 1];
2294                  nextTab = nt;
2295              } catch (Throwable ex) {      // try to cope with OOME
2296                  sizeCtl = Integer.MAX_VALUE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines