3693 |
|
public void testCompleteAsync2() { |
3694 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |
3695 |
|
CFException ex = new CFException(); |
3696 |
< |
f.completeAsync(() -> {if (true) throw ex; return 1;}); |
3696 |
> |
f.completeAsync(() -> { throw ex; }); |
3697 |
|
try { |
3698 |
|
f.join(); |
3699 |
|
shouldThrow(); |
3723 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |
3724 |
|
CFException ex = new CFException(); |
3725 |
|
ThreadExecutor executor = new ThreadExecutor(); |
3726 |
< |
f.completeAsync(() -> {if (true) throw ex; return 1;}, executor); |
3726 |
> |
f.completeAsync(() -> { throw ex; }, executor); |
3727 |
|
try { |
3728 |
|
f.join(); |
3729 |
|
shouldThrow(); |