# | 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 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |