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 |
|
} |
3480 |
|
} |
3481 |
|
|
3482 |
|
/** |
3483 |
< |
* failedStage returns a Completionstage completed |
3483 |
> |
* failedStage returns a CompletionStage completed |
3484 |
|
* exceptionally with the given Exception |
3485 |
|
*/ |
3486 |
|
public void testFailedStage() { |
3543 |
|
} |
3544 |
|
|
3545 |
|
/** |
3546 |
< |
* orTimeout completes with TimeoutException if not complete |
3546 |
> |
* orTimeout completes with TimeoutException if not complete |
3547 |
|
*/ |
3548 |
|
public void testOrTimeout() { |
3549 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |
3552 |
|
} |
3553 |
|
|
3554 |
|
/** |
3555 |
< |
* orTimeout completes normally if completed before timeout |
3555 |
> |
* orTimeout completes normally if completed before timeout |
3556 |
|
*/ |
3557 |
|
public void testOrTimeout2() { |
3558 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |
3562 |
|
} |
3563 |
|
|
3564 |
|
/** |
3565 |
< |
* completeOnTimeout completes with given value if not complete |
3565 |
> |
* completeOnTimeout completes with given value if not complete |
3566 |
|
*/ |
3567 |
|
public void testCompleteOnTimeout() { |
3568 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |
3572 |
|
} |
3573 |
|
|
3574 |
|
/** |
3575 |
< |
* completeOnTimeout has no effect if completed within timeout |
3575 |
> |
* completeOnTimeout has no effect if completed within timeout |
3576 |
|
*/ |
3577 |
|
public void testCompleteOnTimeout2() { |
3578 |
|
CompletableFuture<Integer> f = new CompletableFuture<>(); |