3419 |
|
public void testFailedFuture() { |
3420 |
|
CFException ex = new CFException(); |
3421 |
|
CompletableFuture<Integer> f = CompletableFuture.failedFuture(ex); |
3422 |
< |
checkCompletedExceptionallyWithRootCause(f, ex); |
3422 |
> |
checkCompletedExceptionally(f, ex); |
3423 |
|
} |
3424 |
|
|
3425 |
|
/** |
3507 |
|
AtomicReference<Throwable> r = new AtomicReference<Throwable>(); |
3508 |
|
f.whenComplete((v, e) -> {if (e != null) r.set(e); else x.set(v);}); |
3509 |
|
assertEquals(x.get(), 0); |
3510 |
< |
assertEquals(r.get().getCause(), ex); |
3510 |
> |
assertEquals(r.get(), ex); |
3511 |
|
} |
3512 |
|
|
3513 |
|
/** |