594 |
|
final CompletableFuture<V> tryFire(int mode) { |
595 |
|
CompletableFuture<V> d; CompletableFuture<T> a; |
596 |
|
Object r; Throwable x; Function<? super T,? extends V> f; |
597 |
< |
if ((d = dep) == null || (f = fn) == null |
598 |
< |
|| (a = src) == null || (r = a.result) == null) |
597 |
> |
if ((a = src) == null || (r = a.result) == null |
598 |
> |
|| (d = dep) == null || (f = fn) == null) |
599 |
|
return null; |
600 |
|
tryComplete: if (d.result == null) { |
601 |
|
if (r instanceof AltResult) { |
616 |
|
d.completeThrowable(ex); |
617 |
|
} |
618 |
|
} |
619 |
< |
dep = null; src = null; fn = null; |
619 |
> |
src = null; dep = null; fn = null; |
620 |
|
return d.postFire(a, mode); |
621 |
|
} |
622 |
|
} |
666 |
|
final CompletableFuture<Void> tryFire(int mode) { |
667 |
|
CompletableFuture<Void> d; CompletableFuture<T> a; |
668 |
|
Object r; Throwable x; Consumer<? super T> f; |
669 |
< |
if ((d = dep) == null || (f = fn) == null |
670 |
< |
|| (a = src) == null || (r = a.result) == null) |
669 |
> |
if ((a = src) == null || (r = a.result) == null |
670 |
> |
|| (d = dep) == null || (f = fn) == null) |
671 |
|
return null; |
672 |
|
tryComplete: if (d.result == null) { |
673 |
|
if (r instanceof AltResult) { |
689 |
|
d.completeThrowable(ex); |
690 |
|
} |
691 |
|
} |
692 |
< |
dep = null; src = null; fn = null; |
692 |
> |
src = null; dep = null; fn = null; |
693 |
|
return d.postFire(a, mode); |
694 |
|
} |
695 |
|
} |
740 |
|
final CompletableFuture<Void> tryFire(int mode) { |
741 |
|
CompletableFuture<Void> d; CompletableFuture<T> a; |
742 |
|
Object r; Throwable x; Runnable f; |
743 |
< |
if ((d = dep) == null || (f = fn) == null |
744 |
< |
|| (a = src) == null || (r = a.result) == null) |
743 |
> |
if ((a = src) == null || (r = a.result) == null |
744 |
> |
|| (d = dep) == null || (f = fn) == null) |
745 |
|
return null; |
746 |
|
if (d.result == null) { |
747 |
|
if (r instanceof AltResult && (x = ((AltResult)r).ex) != null) |
758 |
|
d.completeThrowable(ex); |
759 |
|
} |
760 |
|
} |
761 |
< |
dep = null; src = null; fn = null; |
761 |
> |
src = null; dep = null; fn = null; |
762 |
|
return d.postFire(a, mode); |
763 |
|
} |
764 |
|
} |
803 |
|
final CompletableFuture<T> tryFire(int mode) { |
804 |
|
CompletableFuture<T> d; CompletableFuture<T> a; |
805 |
|
Object r; BiConsumer<? super T, ? super Throwable> f; |
806 |
< |
if ((d = dep) == null || (f = fn) == null |
807 |
< |
|| (a = src) == null || (r = a.result) == null |
806 |
> |
if ((a = src) == null || (r = a.result) == null |
807 |
> |
|| (d = dep) == null || (f = fn) == null |
808 |
|
|| !d.uniWhenComplete(r, f, mode > 0 ? null : this)) |
809 |
|
return null; |
810 |
< |
dep = null; src = null; fn = null; |
810 |
> |
src = null; dep = null; fn = null; |
811 |
|
return d.postFire(a, mode); |
812 |
|
} |
813 |
|
} |
873 |
|
final CompletableFuture<V> tryFire(int mode) { |
874 |
|
CompletableFuture<V> d; CompletableFuture<T> a; |
875 |
|
Object r; BiFunction<? super T, Throwable, ? extends V> f; |
876 |
< |
if ((d = dep) == null || (f = fn) == null |
877 |
< |
|| (a = src) == null || (r = a.result) == null |
876 |
> |
if ((a = src) == null || (r = a.result) == null |
877 |
> |
|| (d = dep) == null || (f = fn) == null |
878 |
|
|| !d.uniHandle(r, f, mode > 0 ? null : this)) |
879 |
|
return null; |
880 |
< |
dep = null; src = null; fn = null; |
880 |
> |
src = null; dep = null; fn = null; |
881 |
|
return d.postFire(a, mode); |
882 |
|
} |
883 |
|
} |
936 |
|
final CompletableFuture<T> tryFire(int mode) { |
937 |
|
CompletableFuture<T> d; CompletableFuture<T> a; |
938 |
|
Object r; Function<? super Throwable, ? extends T> f; |
939 |
< |
if ((d = dep) == null || (f = fn) == null |
940 |
< |
|| (a = src) == null || (r = a.result) == null |
939 |
> |
if ((a = src) == null || (r = a.result) == null |
940 |
> |
|| (d = dep) == null || (f = fn) == null |
941 |
|
|| !d.uniExceptionally(r, f, mode > 0 ? null : this)) |
942 |
|
return null; |
943 |
< |
dep = null; src = null; fn = null; |
943 |
> |
src = null; dep = null; fn = null; |
944 |
|
return d.postFire(a, mode); |
945 |
|
} |
946 |
|
} |
995 |
|
CompletableFuture<T> d; CompletableFuture<T> a; |
996 |
|
Function<Throwable, ? extends CompletionStage<T>> f; |
997 |
|
Object r; Throwable x; |
998 |
< |
if ((d = dep) == null || (f = fn) == null |
999 |
< |
|| (a = src) == null || (r = a.result) == null) |
998 |
> |
if ((a = src) == null || (r = a.result) == null |
999 |
> |
|| (d = dep) == null || (f = fn) == null) |
1000 |
|
return null; |
1001 |
|
if (d.result == null) { |
1002 |
|
if ((r instanceof AltResult) && |
1019 |
|
else |
1020 |
|
d.internalComplete(r); |
1021 |
|
} |
1022 |
< |
dep = null; src = null; fn = null; |
1022 |
> |
src = null; dep = null; fn = null; |
1023 |
|
return d.postFire(a, mode); |
1024 |
|
} |
1025 |
|
} |
1057 |
|
} |
1058 |
|
final CompletableFuture<U> tryFire(int mode) { |
1059 |
|
CompletableFuture<U> d; CompletableFuture<T> a; Object r; |
1060 |
< |
if ((d = dep) == null |
1061 |
< |
|| (a = src) == null || (r = a.result) == null) |
1060 |
> |
if ((a = src) == null || (r = a.result) == null |
1061 |
> |
|| (d = dep) == null) |
1062 |
|
return null; |
1063 |
|
if (d.result == null) |
1064 |
|
d.completeRelay(r); |
1099 |
|
CompletableFuture<V> d; CompletableFuture<T> a; |
1100 |
|
Function<? super T, ? extends CompletionStage<V>> f; |
1101 |
|
Object r; Throwable x; |
1102 |
< |
if ((d = dep) == null || (f = fn) == null |
1103 |
< |
|| (a = src) == null || (r = a.result) == null) |
1102 |
> |
if ((a = src) == null || (r = a.result) == null |
1103 |
> |
|| (d = dep) == null || (f = fn) == null) |
1104 |
|
return null; |
1105 |
|
tryComplete: if (d.result == null) { |
1106 |
|
if (r instanceof AltResult) { |
1126 |
|
d.completeThrowable(ex); |
1127 |
|
} |
1128 |
|
} |
1129 |
< |
dep = null; src = null; fn = null; |
1129 |
> |
src = null; dep = null; fn = null; |
1130 |
|
return d.postFire(a, mode); |
1131 |
|
} |
1132 |
|
} |
1241 |
|
CompletableFuture<T> a; |
1242 |
|
CompletableFuture<U> b; |
1243 |
|
Object r, s; BiFunction<? super T,? super U,? extends V> f; |
1244 |
< |
if ((d = dep) == null || (f = fn) == null |
1245 |
< |
|| (a = src) == null || (r = a.result) == null |
1244 |
> |
if ( (a = src) == null || (r = a.result) == null |
1245 |
|
|| (b = snd) == null || (s = b.result) == null |
1246 |
+ |
|| (d = dep) == null || (f = fn) == null |
1247 |
|
|| !d.biApply(r, s, f, mode > 0 ? null : this)) |
1248 |
|
return null; |
1249 |
< |
dep = null; src = null; snd = null; fn = null; |
1249 |
> |
src = null; snd = null; dep = null; fn = null; |
1250 |
|
return d.postFire(a, b, mode); |
1251 |
|
} |
1252 |
|
} |
1316 |
|
CompletableFuture<T> a; |
1317 |
|
CompletableFuture<U> b; |
1318 |
|
Object r, s; BiConsumer<? super T,? super U> f; |
1319 |
< |
if ((d = dep) == null || (f = fn) == null |
1320 |
< |
|| (a = src) == null || (r = a.result) == null |
1319 |
> |
if ( (a = src) == null || (r = a.result) == null |
1320 |
|
|| (b = snd) == null || (s = b.result) == null |
1321 |
+ |
|| (d = dep) == null || (f = fn) == null |
1322 |
|
|| !d.biAccept(r, s, f, mode > 0 ? null : this)) |
1323 |
|
return null; |
1324 |
< |
dep = null; src = null; snd = null; fn = null; |
1324 |
> |
src = null; snd = null; dep = null; fn = null; |
1325 |
|
return d.postFire(a, b, mode); |
1326 |
|
} |
1327 |
|
} |
1392 |
|
CompletableFuture<T> a; |
1393 |
|
CompletableFuture<U> b; |
1394 |
|
Object r, s; Runnable f; |
1395 |
< |
if ((d = dep) == null || (f = fn) == null |
1396 |
< |
|| (a = src) == null || (r = a.result) == null |
1395 |
> |
if ( (a = src) == null || (r = a.result) == null |
1396 |
|
|| (b = snd) == null || (s = b.result) == null |
1397 |
+ |
|| (d = dep) == null || (f = fn) == null |
1398 |
|
|| !d.biRun(r, s, f, mode > 0 ? null : this)) |
1399 |
|
return null; |
1400 |
< |
dep = null; src = null; snd = null; fn = null; |
1400 |
> |
src = null; snd = null; dep = null; fn = null; |
1401 |
|
return d.postFire(a, b, mode); |
1402 |
|
} |
1403 |
|
} |
1453 |
|
CompletableFuture<T> a; |
1454 |
|
CompletableFuture<U> b; |
1455 |
|
Object r, s, z; Throwable x; |
1456 |
< |
if ((d = dep) == null |
1457 |
< |
|| (a = src) == null || (r = a.result) == null |
1458 |
< |
|| (b = snd) == null || (s = b.result) == null) |
1456 |
> |
if ( (a = src) == null || (r = a.result) == null |
1457 |
> |
|| (b = snd) == null || (s = b.result) == null |
1458 |
> |
|| (d = dep) == null) |
1459 |
|
return null; |
1460 |
|
if (d.result == null) { |
1461 |
|
if ((r instanceof AltResult |
1528 |
|
super(executor, dep, src, snd); this.fn = fn; |
1529 |
|
} |
1530 |
|
final CompletableFuture<V> tryFire(int mode) { |
1531 |
< |
CompletableFuture<V> d; |
1532 |
< |
CompletableFuture<T> a; |
1533 |
< |
CompletableFuture<U> b; |
1531 |
> |
CompletableFuture<V> d; CompletableFuture<? extends T> a, b; |
1532 |
|
Object r; Throwable x; Function<? super T,? extends V> f; |
1533 |
< |
if ((d = dep) == null || (f = fn) == null |
1534 |
< |
|| (a = src) == null || (b = snd) == null |
1535 |
< |
|| ((r = a.result) == null && (r = b.result) == null)) |
1533 |
> |
if ((a = src) == null || (b = snd) == null |
1534 |
> |
|| ((r = a.result) == null && (r = b.result) == null) |
1535 |
> |
|| (d = dep) == null || (f = fn) == null) |
1536 |
|
return null; |
1537 |
|
tryComplete: if (d.result == null) { |
1538 |
|
try { |
1551 |
|
d.completeThrowable(ex); |
1552 |
|
} |
1553 |
|
} |
1554 |
< |
dep = null; src = null; snd = null; fn = null; |
1554 |
> |
src = null; snd = null; dep = null; fn = null; |
1555 |
|
return d.postFire(a, b, mode); |
1556 |
|
} |
1557 |
|
} |
1581 |
|
super(executor, dep, src, snd); this.fn = fn; |
1582 |
|
} |
1583 |
|
final CompletableFuture<Void> tryFire(int mode) { |
1584 |
< |
CompletableFuture<Void> d; |
1587 |
< |
CompletableFuture<T> a; |
1588 |
< |
CompletableFuture<U> b; |
1584 |
> |
CompletableFuture<Void> d; CompletableFuture<? extends T> a, b; |
1585 |
|
Object r; Throwable x; Consumer<? super T> f; |
1586 |
< |
if ((d = dep) == null || (f = fn) == null |
1587 |
< |
|| (a = src) == null || (b = snd) == null |
1588 |
< |
|| ((r = a.result) == null && (r = b.result) == null)) |
1586 |
> |
if ((a = src) == null || (b = snd) == null |
1587 |
> |
|| ((r = a.result) == null && (r = b.result) == null) |
1588 |
> |
|| (d = dep) == null || (f = fn) == null) |
1589 |
|
return null; |
1590 |
|
tryComplete: if (d.result == null) { |
1591 |
|
try { |
1605 |
|
d.completeThrowable(ex); |
1606 |
|
} |
1607 |
|
} |
1608 |
< |
dep = null; src = null; snd = null; fn = null; |
1608 |
> |
src = null; snd = null; dep = null; fn = null; |
1609 |
|
return d.postFire(a, b, mode); |
1610 |
|
} |
1611 |
|
} |
1635 |
|
super(executor, dep, src, snd); this.fn = fn; |
1636 |
|
} |
1637 |
|
final CompletableFuture<Void> tryFire(int mode) { |
1638 |
< |
CompletableFuture<Void> d; |
1643 |
< |
CompletableFuture<T> a; |
1644 |
< |
CompletableFuture<U> b; |
1638 |
> |
CompletableFuture<Void> d; CompletableFuture<?> a, b; |
1639 |
|
Object r; Throwable x; Runnable f; |
1640 |
< |
if ((d = dep) == null || (f = fn) == null |
1641 |
< |
|| (a = src) == null || (b = snd) == null |
1642 |
< |
|| ((r = a.result) == null && (r = b.result) == null)) |
1640 |
> |
if ((a = src) == null || (b = snd) == null |
1641 |
> |
|| ((r = a.result) == null && (r = b.result) == null) |
1642 |
> |
|| (d = dep) == null || (f = fn) == null) |
1643 |
|
return null; |
1644 |
|
if (d.result == null) { |
1645 |
|
try { |
1656 |
|
d.completeThrowable(ex); |
1657 |
|
} |
1658 |
|
} |
1659 |
< |
dep = null; src = null; snd = null; fn = null; |
1659 |
> |
src = null; snd = null; dep = null; fn = null; |
1660 |
|
return d.postFire(a, b, mode); |
1661 |
|
} |
1662 |
|
} |
1691 |
|
CompletableFuture<Object> d; CompletableFuture<?> a; |
1692 |
|
CompletableFuture<?>[] as; |
1693 |
|
Object r; |
1694 |
< |
if ((d = dep) == null |
1695 |
< |
|| (a = src) == null || (r = a.result) == null |
1702 |
< |
|| (as = srcs) == null) |
1694 |
> |
if ((a = src) == null || (r = a.result) == null |
1695 |
> |
|| (d = dep) == null || (as = srcs) == null) |
1696 |
|
return null; |
1697 |
< |
dep = null; src = null; srcs = null; |
1697 |
> |
src = null; dep = null; srcs = null; |
1698 |
|
if (d.completeRelay(r)) { |
1699 |
|
for (CompletableFuture<?> b : as) |
1700 |
|
if (b != a) |