13 |
|
import java.util.AbstractMap; |
14 |
|
import java.util.Arrays; |
15 |
|
import java.util.Collection; |
16 |
– |
import java.util.Comparator; |
16 |
|
import java.util.Enumeration; |
17 |
|
import java.util.HashMap; |
18 |
|
import java.util.Hashtable; |
21 |
|
import java.util.NoSuchElementException; |
22 |
|
import java.util.Set; |
23 |
|
import java.util.Spliterator; |
25 |
– |
import java.util.concurrent.ConcurrentMap; |
26 |
– |
import java.util.concurrent.ForkJoinPool; |
24 |
|
import java.util.concurrent.atomic.AtomicReference; |
25 |
|
import java.util.concurrent.locks.LockSupport; |
26 |
|
import java.util.concurrent.locks.ReentrantLock; |
27 |
|
import java.util.function.BiConsumer; |
28 |
|
import java.util.function.BiFunction; |
32 |
– |
import java.util.function.BinaryOperator; |
29 |
|
import java.util.function.Consumer; |
30 |
|
import java.util.function.DoubleBinaryOperator; |
31 |
|
import java.util.function.Function; |
1023 |
|
p.val = value; |
1024 |
|
} |
1025 |
|
} |
1026 |
+ |
else if (f instanceof ReservationNode) |
1027 |
+ |
throw new IllegalStateException("Recursive update"); |
1028 |
|
} |
1029 |
|
} |
1030 |
|
if (binCount != 0) { |
1127 |
|
} |
1128 |
|
} |
1129 |
|
} |
1130 |
+ |
else if (f instanceof ReservationNode) |
1131 |
+ |
throw new IllegalStateException("Recursive update"); |
1132 |
|
} |
1133 |
|
} |
1134 |
|
if (validated) { |
1657 |
|
Node<K,V> pred = e; |
1658 |
|
if ((e = e.next) == null) { |
1659 |
|
if ((val = mappingFunction.apply(key)) != null) { |
1660 |
+ |
if (pred.next != null) |
1661 |
+ |
throw new IllegalStateException("Recursive update"); |
1662 |
|
added = true; |
1663 |
|
pred.next = new Node<K,V>(h, key, val, null); |
1664 |
|
} |
1678 |
|
t.putTreeVal(h, key, val); |
1679 |
|
} |
1680 |
|
} |
1681 |
+ |
else if (f instanceof ReservationNode) |
1682 |
+ |
throw new IllegalStateException("Recursive update"); |
1683 |
|
} |
1684 |
|
} |
1685 |
|
if (binCount != 0) { |
1775 |
|
} |
1776 |
|
} |
1777 |
|
} |
1778 |
+ |
else if (f instanceof ReservationNode) |
1779 |
+ |
throw new IllegalStateException("Recursive update"); |
1780 |
|
} |
1781 |
|
} |
1782 |
|
if (binCount != 0) |
1868 |
|
if ((e = e.next) == null) { |
1869 |
|
val = remappingFunction.apply(key, null); |
1870 |
|
if (val != null) { |
1871 |
+ |
if (pred.next != null) |
1872 |
+ |
throw new IllegalStateException("Recursive update"); |
1873 |
|
delta = 1; |
1874 |
|
pred.next = |
1875 |
|
new Node<K,V>(h, key, val, null); |
1902 |
|
setTabAt(tab, i, untreeify(t.first)); |
1903 |
|
} |
1904 |
|
} |
1905 |
+ |
else if (f instanceof ReservationNode) |
1906 |
+ |
throw new IllegalStateException("Recursive update"); |
1907 |
|
} |
1908 |
|
} |
1909 |
|
if (binCount != 0) { |
2013 |
|
setTabAt(tab, i, untreeify(t.first)); |
2014 |
|
} |
2015 |
|
} |
2016 |
+ |
else if (f instanceof ReservationNode) |
2017 |
+ |
throw new IllegalStateException("Recursive update"); |
2018 |
|
} |
2019 |
|
} |
2020 |
|
if (binCount != 0) { |
2330 |
|
break; |
2331 |
|
else if (tab == table) { |
2332 |
|
int rs = resizeStamp(n); |
2333 |
< |
if (sc < 0) { |
2334 |
< |
Node<K,V>[] nt; |
2323 |
< |
if ((sc >>> RESIZE_STAMP_SHIFT) != rs || sc == rs + 1 || |
2324 |
< |
sc == rs + MAX_RESIZERS || (nt = nextTable) == null || |
2325 |
< |
transferIndex <= 0) |
2326 |
< |
break; |
2327 |
< |
if (U.compareAndSwapInt(this, SIZECTL, sc, sc + 1)) |
2328 |
< |
transfer(tab, nt); |
2329 |
< |
} |
2330 |
< |
else if (U.compareAndSwapInt(this, SIZECTL, sc, |
2331 |
< |
(rs << RESIZE_STAMP_SHIFT) + 2)) |
2333 |
> |
if (U.compareAndSwapInt(this, SIZECTL, sc, |
2334 |
> |
(rs << RESIZE_STAMP_SHIFT) + 2)) |
2335 |
|
transfer(tab, null); |
2336 |
|
} |
2337 |
|
} |
2749 |
|
(kc = comparableClassFor(k)) == null) || |
2750 |
|
(dir = compareComparables(kc, k, pk)) == 0) |
2751 |
|
dir = tieBreakOrder(k, pk); |
2752 |
< |
TreeNode<K,V> xp = p; |
2752 |
> |
TreeNode<K,V> xp = p; |
2753 |
|
if ((p = (dir <= 0) ? p.left : p.right) == null) { |
2754 |
|
x.parent = xp; |
2755 |
|
if (dir <= 0) |