ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/CompletableFutureTest.java
(Generate patch)

Comparing jsr166/src/test/tck/CompletableFutureTest.java (file contents):
Revision 1.198 by dl, Mon Sep 17 11:50:55 2018 UTC vs.
Revision 1.208 by jsr166, Sun Sep 23 15:29:31 2018 UTC

# Line 551 | Line 551 | public class CompletableFutureTest exten
551          public CompletableFuture<Integer> apply(Integer x) {
552              invoked();
553              value = x;
554 <            CompletableFuture<Integer> f = new CompletableFuture<>();
555 <            assertTrue(f.complete(inc(x)));
556 <            return f;
554 >            return CompletableFuture.completedFuture(inc(x));
555          }
556      }
557  
# Line 574 | Line 572 | public class CompletableFutureTest exten
572          ExceptionalCompletableFutureFunction(ExecutionMode m) { super(m); }
573          public CompletionStage<Integer> apply(Throwable x) {
574              invoked();
575 <            CompletableFuture<Integer> d = new CompletableFuture<Integer>();
578 <            d.complete(value);
579 <            return d;
575 >            return CompletableFuture.completedFuture(value);
576          }
577      }
578  
# Line 930 | Line 926 | public class CompletableFutureTest exten
926          for (boolean createIncomplete : new boolean[] { true, false })
927          for (Integer v1 : new Integer[] { 1, null })
928      {
933        final AtomicInteger a = new AtomicInteger(0);
929          final CompletableFuture<Integer> f = new CompletableFuture<>();
930          if (!createIncomplete) assertTrue(f.complete(v1));
931          final CompletableFuture<Integer> g = m.exceptionally
932              (f, (Throwable t) -> {
938                a.getAndIncrement();
933                  threadFail("should not be called");
934                  return null;            // unreached
935              });
# Line 943 | Line 937 | public class CompletableFutureTest exten
937  
938          checkCompletedNormally(g, v1);
939          checkCompletedNormally(f, v1);
946        assertEquals(0, a.get());
940      }}
941  
942      /**
# Line 3174 | Line 3167 | public class CompletableFutureTest exten
3167          final CompletableFuture<Integer> g = m.exceptionallyCompose(f, r);
3168          if (createIncomplete) assertTrue(f.complete(v1));
3169  
3170 +        if (!createIncomplete && testImplementationDetails)
3171 +            assertSame(f, g);
3172          checkCompletedNormally(f, v1);
3173          checkCompletedNormally(g, v1);
3174          r.assertNotInvoked();
# Line 4633 | Line 4628 | public class CompletableFutureTest exten
4628   //         return stage.toCompletableFuture().copy().isDone();
4629   //     }
4630  
4631 +    // For testing default implementations
4632 +    // Only non-default interface methods defined.
4633 +    static final class DelegatedCompletionStage<T> implements CompletionStage<T> {
4634 +        final CompletableFuture<T> cf;
4635 +        DelegatedCompletionStage(CompletableFuture<T> cf) { this.cf = cf; }
4636 +        public CompletableFuture<T> toCompletableFuture() {
4637 +            return cf; }
4638 +        public CompletionStage<Void> thenRun
4639 +            (Runnable action) {
4640 +            return cf.thenRun(action); }
4641 +        public CompletionStage<Void> thenRunAsync
4642 +            (Runnable action) {
4643 +            return cf.thenRunAsync(action); }
4644 +        public CompletionStage<Void> thenRunAsync
4645 +            (Runnable action,
4646 +             Executor executor) {
4647 +            return cf.thenRunAsync(action, executor); }
4648 +        public CompletionStage<Void> thenAccept
4649 +            (Consumer<? super T> action) {
4650 +            return cf.thenAccept(action); }
4651 +        public CompletionStage<Void> thenAcceptAsync
4652 +            (Consumer<? super T> action) {
4653 +            return cf.thenAcceptAsync(action); }
4654 +        public CompletionStage<Void> thenAcceptAsync
4655 +            (Consumer<? super T> action,
4656 +             Executor executor) {
4657 +            return cf.thenAcceptAsync(action, executor); }
4658 +        public <U> CompletionStage<U> thenApply
4659 +            (Function<? super T,? extends U> a) {
4660 +            return cf.thenApply(a); }
4661 +        public <U> CompletionStage<U> thenApplyAsync
4662 +            (Function<? super T,? extends U> fn) {
4663 +            return cf.thenApplyAsync(fn); }
4664 +        public <U> CompletionStage<U> thenApplyAsync
4665 +            (Function<? super T,? extends U> fn,
4666 +             Executor executor) {
4667 +            return cf.thenApplyAsync(fn, executor); }
4668 +        public <U,V> CompletionStage<V> thenCombine
4669 +            (CompletionStage<? extends U> other,
4670 +             BiFunction<? super T,? super U,? extends V> fn) {
4671 +            return cf.thenCombine(other, fn); }
4672 +        public <U,V> CompletionStage<V> thenCombineAsync
4673 +            (CompletionStage<? extends U> other,
4674 +             BiFunction<? super T,? super U,? extends V> fn) {
4675 +            return cf.thenCombineAsync(other, fn); }
4676 +        public <U,V> CompletionStage<V> thenCombineAsync
4677 +            (CompletionStage<? extends U> other,
4678 +             BiFunction<? super T,? super U,? extends V> fn,
4679 +             Executor executor) {
4680 +            return cf.thenCombineAsync(other, fn, executor); }
4681 +        public <U> CompletionStage<Void> thenAcceptBoth
4682 +            (CompletionStage<? extends U> other,
4683 +             BiConsumer<? super T, ? super U> action) {
4684 +            return cf.thenAcceptBoth(other, action); }
4685 +        public <U> CompletionStage<Void> thenAcceptBothAsync
4686 +            (CompletionStage<? extends U> other,
4687 +             BiConsumer<? super T, ? super U> action) {
4688 +            return cf.thenAcceptBothAsync(other, action); }
4689 +        public <U> CompletionStage<Void> thenAcceptBothAsync
4690 +            (CompletionStage<? extends U> other,
4691 +             BiConsumer<? super T, ? super U> action,
4692 +             Executor executor) {
4693 +            return cf.thenAcceptBothAsync(other, action, executor); }
4694 +        public CompletionStage<Void> runAfterBoth
4695 +            (CompletionStage<?> other,
4696 +             Runnable action) {
4697 +            return cf.runAfterBoth(other, action); }
4698 +        public CompletionStage<Void> runAfterBothAsync
4699 +            (CompletionStage<?> other,
4700 +             Runnable action) {
4701 +            return cf.runAfterBothAsync(other, action); }
4702 +        public CompletionStage<Void> runAfterBothAsync
4703 +            (CompletionStage<?> other,
4704 +             Runnable action,
4705 +             Executor executor) {
4706 +            return cf.runAfterBothAsync(other, action, executor); }
4707 +        public <U> CompletionStage<U> applyToEither
4708 +            (CompletionStage<? extends T> other,
4709 +             Function<? super T, U> fn) {
4710 +            return cf.applyToEither(other, fn); }
4711 +        public <U> CompletionStage<U> applyToEitherAsync
4712 +            (CompletionStage<? extends T> other,
4713 +             Function<? super T, U> fn) {
4714 +            return cf.applyToEitherAsync(other, fn); }
4715 +        public <U> CompletionStage<U> applyToEitherAsync
4716 +            (CompletionStage<? extends T> other,
4717 +             Function<? super T, U> fn,
4718 +             Executor executor) {
4719 +            return cf.applyToEitherAsync(other, fn, executor); }
4720 +        public CompletionStage<Void> acceptEither
4721 +            (CompletionStage<? extends T> other,
4722 +             Consumer<? super T> action) {
4723 +            return cf.acceptEither(other, action); }
4724 +        public CompletionStage<Void> acceptEitherAsync
4725 +            (CompletionStage<? extends T> other,
4726 +             Consumer<? super T> action) {
4727 +            return cf.acceptEitherAsync(other, action); }
4728 +        public CompletionStage<Void> acceptEitherAsync
4729 +            (CompletionStage<? extends T> other,
4730 +             Consumer<? super T> action,
4731 +             Executor executor) {
4732 +            return cf.acceptEitherAsync(other, action, executor); }
4733 +        public CompletionStage<Void> runAfterEither
4734 +            (CompletionStage<?> other,
4735 +             Runnable action) {
4736 +            return cf.runAfterEither(other, action); }
4737 +        public CompletionStage<Void> runAfterEitherAsync
4738 +            (CompletionStage<?> other,
4739 +             Runnable action) {
4740 +            return cf.runAfterEitherAsync(other, action); }
4741 +        public CompletionStage<Void> runAfterEitherAsync
4742 +            (CompletionStage<?> other,
4743 +             Runnable action,
4744 +             Executor executor) {
4745 +            return cf.runAfterEitherAsync(other, action, executor); }
4746 +        public <U> CompletionStage<U> thenCompose
4747 +            (Function<? super T, ? extends CompletionStage<U>> fn) {
4748 +            return cf.thenCompose(fn); }
4749 +        public <U> CompletionStage<U> thenComposeAsync
4750 +            (Function<? super T, ? extends CompletionStage<U>> fn) {
4751 +            return cf.thenComposeAsync(fn); }
4752 +        public <U> CompletionStage<U> thenComposeAsync
4753 +            (Function<? super T, ? extends CompletionStage<U>> fn,
4754 +             Executor executor) {
4755 +            return cf.thenComposeAsync(fn, executor); }
4756 +        public <U> CompletionStage<U> handle
4757 +            (BiFunction<? super T, Throwable, ? extends U> fn) {
4758 +            return cf.handle(fn); }
4759 +        public <U> CompletionStage<U> handleAsync
4760 +            (BiFunction<? super T, Throwable, ? extends U> fn) {
4761 +            return cf.handleAsync(fn); }
4762 +        public <U> CompletionStage<U> handleAsync
4763 +            (BiFunction<? super T, Throwable, ? extends U> fn,
4764 +             Executor executor) {
4765 +            return cf.handleAsync(fn, executor); }
4766 +        public CompletionStage<T> whenComplete
4767 +            (BiConsumer<? super T, ? super Throwable> action) {
4768 +            return cf.whenComplete(action); }
4769 +        public CompletionStage<T> whenCompleteAsync
4770 +            (BiConsumer<? super T, ? super Throwable> action) {
4771 +            return cf.whenCompleteAsync(action); }
4772 +        public CompletionStage<T> whenCompleteAsync
4773 +            (BiConsumer<? super T, ? super Throwable> action,
4774 +             Executor executor) {
4775 +            return cf.whenCompleteAsync(action, executor); }
4776 +        public CompletionStage<T> exceptionally
4777 +            (Function<Throwable, ? extends T> fn) {
4778 +            return cf.exceptionally(fn); }
4779 +    }
4780 +
4781 +    /**
4782 +     * default-implemented exceptionallyAsync action is not invoked when
4783 +     * source completes normally, and source result is propagated
4784 +     */
4785 +    public void testDefaultExceptionallyAsync_normalCompletion() {
4786 +        for (boolean createIncomplete : new boolean[] { true, false })
4787 +        for (Integer v1 : new Integer[] { 1, null })
4788 +    {
4789 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4790 +        final DelegatedCompletionStage<Integer> d =
4791 +            new DelegatedCompletionStage<Integer>(f);
4792 +        if (!createIncomplete) assertTrue(f.complete(v1));
4793 +        final CompletionStage<Integer> g = d.exceptionallyAsync
4794 +            ((Throwable t) -> {
4795 +                threadFail("should not be called");
4796 +                return null;            // unreached
4797 +            });
4798 +        if (createIncomplete) assertTrue(f.complete(v1));
4799 +
4800 +        checkCompletedNormally(g.toCompletableFuture(), v1);
4801 +    }}
4802 +
4803 +    /**
4804 +     * default-implemented exceptionallyAsync action completes with
4805 +     * function value on source exception
4806 +     */
4807 +    public void testDefaultExceptionallyAsync_exceptionalCompletion() {
4808 +        for (boolean createIncomplete : new boolean[] { true, false })
4809 +        for (Integer v1 : new Integer[] { 1, null })
4810 +    {
4811 +        final AtomicInteger a = new AtomicInteger(0);
4812 +        final CFException ex = new CFException();
4813 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4814 +        final DelegatedCompletionStage<Integer> d =
4815 +            new DelegatedCompletionStage<Integer>(f);
4816 +        if (!createIncomplete) f.completeExceptionally(ex);
4817 +        final CompletionStage<Integer> g = d.exceptionallyAsync
4818 +            ((Throwable t) -> {
4819 +                threadAssertSame(t, ex);
4820 +                a.getAndIncrement();
4821 +                return v1;
4822 +            });
4823 +        if (createIncomplete) f.completeExceptionally(ex);
4824 +
4825 +        checkCompletedNormally(g.toCompletableFuture(), v1);
4826 +        assertEquals(1, a.get());
4827 +    }}
4828 +
4829 +    /**
4830 +     * Under default implementation, if an "exceptionally action"
4831 +     * throws an exception, it completes exceptionally with that
4832 +     * exception
4833 +     */
4834 +    public void testDefaultExceptionallyAsync_exceptionalCompletionActionFailed() {
4835 +        for (boolean createIncomplete : new boolean[] { true, false })
4836 +    {
4837 +        final AtomicInteger a = new AtomicInteger(0);
4838 +        final CFException ex1 = new CFException();
4839 +        final CFException ex2 = new CFException();
4840 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4841 +        final DelegatedCompletionStage<Integer> d =
4842 +            new DelegatedCompletionStage<Integer>(f);
4843 +        if (!createIncomplete) f.completeExceptionally(ex1);
4844 +        final CompletionStage<Integer> g = d.exceptionallyAsync
4845 +            ((Throwable t) -> {
4846 +                threadAssertSame(t, ex1);
4847 +                a.getAndIncrement();
4848 +                throw ex2;
4849 +            });
4850 +        if (createIncomplete) f.completeExceptionally(ex1);
4851 +
4852 +        checkCompletedWithWrappedException(g.toCompletableFuture(), ex2);
4853 +        checkCompletedExceptionally(f, ex1);
4854 +        checkCompletedExceptionally(d.toCompletableFuture(), ex1);
4855 +        assertEquals(1, a.get());
4856 +    }}
4857 +
4858 +    /**
4859 +     * default exceptionallyCompose result completes normally after normal
4860 +     * completion of source
4861 +     */
4862 +    public void testDefaultExceptionallyCompose_normalCompletion() {
4863 +        for (boolean createIncomplete : new boolean[] { true, false })
4864 +        for (Integer v1 : new Integer[] { 1, null })
4865 +    {
4866 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4867 +        final ExceptionalCompletableFutureFunction r =
4868 +            new ExceptionalCompletableFutureFunction(ExecutionMode.SYNC);
4869 +        final DelegatedCompletionStage<Integer> d =
4870 +            new DelegatedCompletionStage<Integer>(f);
4871 +        if (!createIncomplete) assertTrue(f.complete(v1));
4872 +        final CompletionStage<Integer> g = d.exceptionallyCompose(r);
4873 +        if (createIncomplete) assertTrue(f.complete(v1));
4874 +
4875 +        checkCompletedNormally(f, v1);
4876 +        checkCompletedNormally(g.toCompletableFuture(), v1);
4877 +        r.assertNotInvoked();
4878 +    }}
4879 +
4880 +    /**
4881 +     * default-implemented exceptionallyCompose result completes
4882 +     * normally after exceptional completion of source
4883 +     */
4884 +    public void testDefaultExceptionallyCompose_exceptionalCompletion() {
4885 +        for (boolean createIncomplete : new boolean[] { true, false })
4886 +    {
4887 +        final CFException ex = new CFException();
4888 +        final ExceptionalCompletableFutureFunction r =
4889 +            new ExceptionalCompletableFutureFunction(ExecutionMode.SYNC);
4890 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4891 +        final DelegatedCompletionStage<Integer> d =
4892 +            new DelegatedCompletionStage<Integer>(f);
4893 +        if (!createIncomplete) f.completeExceptionally(ex);
4894 +        final CompletionStage<Integer> g = d.exceptionallyCompose(r);
4895 +        if (createIncomplete) f.completeExceptionally(ex);
4896 +
4897 +        checkCompletedExceptionally(f, ex);
4898 +        checkCompletedNormally(g.toCompletableFuture(), r.value);
4899 +        r.assertInvoked();
4900 +    }}
4901 +
4902 +    /**
4903 +     * default-implemented exceptionallyCompose completes
4904 +     * exceptionally on exception if action does
4905 +     */
4906 +    public void testDefaultExceptionallyCompose_actionFailed() {
4907 +        for (boolean createIncomplete : new boolean[] { true, false })
4908 +        for (Integer v1 : new Integer[] { 1, null })
4909 +    {
4910 +        final CFException ex = new CFException();
4911 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4912 +        final FailingExceptionalCompletableFutureFunction r
4913 +            = new FailingExceptionalCompletableFutureFunction(ExecutionMode.SYNC);
4914 +        final DelegatedCompletionStage<Integer> d =
4915 +            new DelegatedCompletionStage<Integer>(f);
4916 +        if (!createIncomplete) f.completeExceptionally(ex);
4917 +        final CompletionStage<Integer> g = d.exceptionallyCompose(r);
4918 +        if (createIncomplete) f.completeExceptionally(ex);
4919 +
4920 +        checkCompletedExceptionally(f, ex);
4921 +        checkCompletedWithWrappedException(g.toCompletableFuture(), r.ex);
4922 +        r.assertInvoked();
4923 +    }}
4924 +
4925 +    /**
4926 +     * default exceptionallyComposeAsync result completes normally after normal
4927 +     * completion of source
4928 +     */
4929 +    public void testDefaultExceptionallyComposeAsync_normalCompletion() {
4930 +        for (boolean createIncomplete : new boolean[] { true, false })
4931 +        for (Integer v1 : new Integer[] { 1, null })
4932 +    {
4933 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4934 +        final ExceptionalCompletableFutureFunction r =
4935 +            new ExceptionalCompletableFutureFunction(ExecutionMode.ASYNC);
4936 +        final DelegatedCompletionStage<Integer> d =
4937 +            new DelegatedCompletionStage<Integer>(f);
4938 +        if (!createIncomplete) assertTrue(f.complete(v1));
4939 +        final CompletionStage<Integer> g = d.exceptionallyComposeAsync(r);
4940 +        if (createIncomplete) assertTrue(f.complete(v1));
4941 +
4942 +        checkCompletedNormally(f, v1);
4943 +        checkCompletedNormally(g.toCompletableFuture(), v1);
4944 +        r.assertNotInvoked();
4945 +    }}
4946 +
4947 +    /**
4948 +     * default-implemented exceptionallyComposeAsync result completes
4949 +     * normally after exceptional completion of source
4950 +     */
4951 +    public void testDefaultExceptionallyComposeAsync_exceptionalCompletion() {
4952 +        for (boolean createIncomplete : new boolean[] { true, false })
4953 +    {
4954 +        final CFException ex = new CFException();
4955 +        final ExceptionalCompletableFutureFunction r =
4956 +            new ExceptionalCompletableFutureFunction(ExecutionMode.ASYNC);
4957 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4958 +        final DelegatedCompletionStage<Integer> d =
4959 +            new DelegatedCompletionStage<Integer>(f);
4960 +        if (!createIncomplete) f.completeExceptionally(ex);
4961 +        final CompletionStage<Integer> g = d.exceptionallyComposeAsync(r);
4962 +        if (createIncomplete) f.completeExceptionally(ex);
4963 +
4964 +        checkCompletedExceptionally(f, ex);
4965 +        checkCompletedNormally(g.toCompletableFuture(), r.value);
4966 +        r.assertInvoked();
4967 +    }}
4968 +
4969 +    /**
4970 +     * default-implemented exceptionallyComposeAsync completes
4971 +     * exceptionally on exception if action does
4972 +     */
4973 +    public void testDefaultExceptionallyComposeAsync_actionFailed() {
4974 +        for (boolean createIncomplete : new boolean[] { true, false })
4975 +        for (Integer v1 : new Integer[] { 1, null })
4976 +    {
4977 +        final CFException ex = new CFException();
4978 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
4979 +        final FailingExceptionalCompletableFutureFunction r
4980 +            = new FailingExceptionalCompletableFutureFunction(ExecutionMode.ASYNC);
4981 +        final DelegatedCompletionStage<Integer> d =
4982 +            new DelegatedCompletionStage<Integer>(f);
4983 +        if (!createIncomplete) f.completeExceptionally(ex);
4984 +        final CompletionStage<Integer> g = d.exceptionallyComposeAsync(r);
4985 +        if (createIncomplete) f.completeExceptionally(ex);
4986 +
4987 +        checkCompletedExceptionally(f, ex);
4988 +        checkCompletedWithWrappedException(g.toCompletableFuture(), r.ex);
4989 +        r.assertInvoked();
4990 +    }}
4991 +
4992 +
4993 +    /**
4994 +     * default exceptionallyComposeAsync result completes normally after normal
4995 +     * completion of source
4996 +     */
4997 +    public void testDefaultExceptionallyComposeAsyncExecutor_normalCompletion() {
4998 +        for (boolean createIncomplete : new boolean[] { true, false })
4999 +        for (Integer v1 : new Integer[] { 1, null })
5000 +    {
5001 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
5002 +        final ExceptionalCompletableFutureFunction r =
5003 +            new ExceptionalCompletableFutureFunction(ExecutionMode.EXECUTOR);
5004 +        final DelegatedCompletionStage<Integer> d =
5005 +            new DelegatedCompletionStage<Integer>(f);
5006 +        if (!createIncomplete) assertTrue(f.complete(v1));
5007 +        final CompletionStage<Integer> g = d.exceptionallyComposeAsync(r, new ThreadExecutor());
5008 +        if (createIncomplete) assertTrue(f.complete(v1));
5009 +
5010 +        checkCompletedNormally(f, v1);
5011 +        checkCompletedNormally(g.toCompletableFuture(), v1);
5012 +        r.assertNotInvoked();
5013 +    }}
5014 +
5015 +    /**
5016 +     * default-implemented exceptionallyComposeAsync result completes
5017 +     * normally after exceptional completion of source
5018 +     */
5019 +    public void testDefaultExceptionallyComposeAsyncExecutor_exceptionalCompletion() {
5020 +        for (boolean createIncomplete : new boolean[] { true, false })
5021 +    {
5022 +        final CFException ex = new CFException();
5023 +        final ExceptionalCompletableFutureFunction r =
5024 +            new ExceptionalCompletableFutureFunction(ExecutionMode.EXECUTOR);
5025 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
5026 +        final DelegatedCompletionStage<Integer> d =
5027 +            new DelegatedCompletionStage<Integer>(f);
5028 +        if (!createIncomplete) f.completeExceptionally(ex);
5029 +        final CompletionStage<Integer> g = d.exceptionallyComposeAsync(r, new ThreadExecutor());
5030 +        if (createIncomplete) f.completeExceptionally(ex);
5031 +
5032 +        checkCompletedExceptionally(f, ex);
5033 +        checkCompletedNormally(g.toCompletableFuture(), r.value);
5034 +        r.assertInvoked();
5035 +    }}
5036 +
5037 +    /**
5038 +     * default-implemented exceptionallyComposeAsync completes
5039 +     * exceptionally on exception if action does
5040 +     */
5041 +    public void testDefaultExceptionallyComposeAsyncExecutor_actionFailed() {
5042 +        for (boolean createIncomplete : new boolean[] { true, false })
5043 +        for (Integer v1 : new Integer[] { 1, null })
5044 +    {
5045 +        final CFException ex = new CFException();
5046 +        final CompletableFuture<Integer> f = new CompletableFuture<>();
5047 +        final FailingExceptionalCompletableFutureFunction r
5048 +            = new FailingExceptionalCompletableFutureFunction(ExecutionMode.EXECUTOR);
5049 +        final DelegatedCompletionStage<Integer> d =
5050 +            new DelegatedCompletionStage<Integer>(f);
5051 +        if (!createIncomplete) f.completeExceptionally(ex);
5052 +        final CompletionStage<Integer> g = d.exceptionallyComposeAsync(r, new ThreadExecutor());
5053 +        if (createIncomplete) f.completeExceptionally(ex);
5054 +
5055 +        checkCompletedExceptionally(f, ex);
5056 +        checkCompletedWithWrappedException(g.toCompletableFuture(), r.ex);
5057 +        r.assertInvoked();
5058 +    }}
5059 +
5060   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines