3333 |
|
() -> f.exceptionally(null), |
3334 |
|
|
3335 |
|
() -> f.handle(null), |
3336 |
+ |
|
3337 |
|
() -> CompletableFuture.allOf((CompletableFuture<?>)null), |
3338 |
|
() -> CompletableFuture.allOf((CompletableFuture<?>[])null), |
3339 |
|
() -> CompletableFuture.allOf(f, null), |
3385 |
|
|
3386 |
|
/** |
3387 |
|
* defaultExecutor by default returns the commonPool if |
3388 |
< |
* it supports at least one thread. |
3388 |
> |
* it supports more than one thread. |
3389 |
|
*/ |
3390 |
|
public void testDefaultExecutor() { |
3391 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |
3392 |
|
Executor e = f.defaultExecutor(); |
3393 |
< |
Executor c = ForkJoinPool.commonPool(); |
3393 |
> |
Executor c = ForkJoinPool.commonPool(); |
3394 |
|
if (ForkJoinPool.getCommonPoolParallelism() > 1) |
3395 |
|
assertSame(e, c); |
3396 |
+ |
else |
3397 |
+ |
assertNotSame(e, c); |
3398 |
|
} |
3399 |
|
|
3400 |
|
/** |
3482 |
|
} |
3483 |
|
|
3484 |
|
/** |
3485 |
< |
* failedStage returns a Completionstage completed |
3485 |
> |
* failedStage returns a CompletionStage completed |
3486 |
|
* exceptionally with the given Exception |
3487 |
|
*/ |
3488 |
|
public void testFailedStage() { |