jdk Udiff test/java/util/concurrent/CompletableFuture/Basic.java (original) (raw)

Print this page


@@ -502,11 +502,11 @@ check(cf1.isDone() || cf2.isDone());

         cf1 = supplyAsync(() -> { throw new RuntimeException(); });
         cf2 = supplyAsync(() -> 2);
         cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; });

@@ -603,23 +603,27 @@

         before = atomicInt.get();
         cf1 = runAsync(() -> { throw new RuntimeException(); });
         cf2 = runAsync(() -> { });
         cf3 = cf2.runAfterEither(cf1, () -> { atomicInt.incrementAndGet(); });