2423 |
|
Runnable[] throwingActions = { |
2424 |
|
() -> { CompletableFuture.supplyAsync(null); }, |
2425 |
|
() -> { CompletableFuture.supplyAsync(null, exec); }, |
2426 |
< |
() -> { CompletableFuture.supplyAsync(() -> one, null); }, |
2426 |
> |
() -> { CompletableFuture.supplyAsync(supplyOne, null); }, |
2427 |
|
|
2428 |
|
() -> { CompletableFuture.runAsync(null); }, |
2429 |
|
() -> { CompletableFuture.runAsync(null, exec); }, |
2512 |
|
() -> { CompletableFuture.anyOf((CompletableFuture<?>[])null); }, |
2513 |
|
() -> { CompletableFuture.anyOf(f, null); }, |
2514 |
|
() -> { CompletableFuture.anyOf(null, f); }, |
2515 |
– |
|
2516 |
– |
// TODO: Crashes javac with lambda-8-2013-03-31... |
2517 |
– |
//() -> { CompletableFuture<?> x = f.thenAccept(null); }, |
2518 |
– |
//() -> { CompletableFuture<Void> x = f.thenRun(null); }, |
2519 |
– |
//() -> { CompletableFuture<Integer> x = f.thenApply(() -> { ; }); }, |
2515 |
|
}; |
2516 |
|
|
2517 |
|
assertThrows(NullPointerException.class, throwingActions); |