53 |
|
catch (Throwable fail) { threadUnexpectedException(fail); } |
54 |
|
} |
55 |
|
|
56 |
< |
void checkCompletedNormally(CompletableFuture<?> f, Object value) { |
56 |
> |
<T> void checkCompletedNormally(CompletableFuture<T> f, T value) { |
57 |
|
try { |
58 |
|
assertEquals(value, f.join()); |
59 |
|
} catch (Throwable fail) { threadUnexpectedException(fail); } |
2393 |
|
CompletableFuture<Integer> f = new CompletableFuture<Integer>(); |
2394 |
|
CompletableFuture<Integer> g = new CompletableFuture<Integer>(); |
2395 |
|
CompletableFuture h; |
2396 |
+ |
Runnable[] actions = { |
2397 |
+ |
() => f.thenApply(null), |
2398 |
+ |
} |
2399 |
|
try { h = f.thenApply(null); } catch (NullPointerException ok) {} |
2400 |
|
try { h = f.thenAccept(null); } catch (NullPointerException ok) {} |
2401 |
|
try { h = f.thenRun(null); } catch (NullPointerException ok) {} |