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.303 by jsr166, Sun Sep 3 16:16:29 2017 UTC vs.
Revision 1.304 by jsr166, Sun Jan 7 04:59:42 2018 UTC

# Line 2603 | Line 2603 | public class ConcurrentHashMap<K,V> exte
2603                  else if (cellsBusy == 0 &&
2604                           U.compareAndSetInt(this, CELLSBUSY, 0, 1)) {
2605                      try {
2606 <                        if (counterCells == as) {// Expand table unless stale
2607 <                            CounterCell[] rs = new CounterCell[n << 1];
2608 <                            for (int i = 0; i < n; ++i)
2609 <                                rs[i] = as[i];
2610 <                            counterCells = rs;
2611 <                        }
2606 >                        if (counterCells == as) // Expand table unless stale
2607 >                            counterCells = Arrays.copyOf(as, n << 1);
2608                      } finally {
2609                          cellsBusy = 0;
2610                      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines