41 |
|
import java.util.function.Predicate; |
42 |
|
import java.util.function.Supplier; |
43 |
|
|
44 |
– |
import junit.framework.AssertionFailedError; |
44 |
|
import junit.framework.Test; |
45 |
|
import junit.framework.TestSuite; |
46 |
|
|
291 |
|
} |
292 |
|
|
293 |
|
f = new CompletableFuture<>(); |
294 |
< |
f.completeExceptionally(ex = new CFException()); |
294 |
> |
f.completeExceptionally(new CFException()); |
295 |
|
f.obtrudeValue(v1); |
296 |
|
checkCompletedNormally(f, v1); |
297 |
|
f.obtrudeException(ex = new CFException()); |
4189 |
|
static void assertZero(CompletableFuture<?> f) { |
4190 |
|
try { |
4191 |
|
f.getNow(null); |
4192 |
< |
throw new AssertionFailedError("should throw"); |
4192 |
> |
throw new AssertionError("should throw"); |
4193 |
|
} catch (CompletionException success) { |
4194 |
|
assertTrue(success.getCause() instanceof ZeroException); |
4195 |
|
} |
4388 |
|
f.complete(null); |
4389 |
|
|
4390 |
|
f = new CompletableFuture<>(); |
4391 |
< |
CompletableFuture.anyOf(new CompletableFuture<?>[] { f, incomplete }); |
4391 |
> |
CompletableFuture.anyOf(f, incomplete); |
4392 |
|
f.complete(null); |
4393 |
|
} |
4394 |
|
|
4406 |
|
f.complete(null); |
4407 |
|
|
4408 |
|
f = new CompletableFuture<>(); |
4409 |
< |
CompletableFuture.anyOf(new CompletableFuture<?>[] { incomplete, f }); |
4409 |
> |
CompletableFuture.anyOf(incomplete, f); |
4410 |
|
f.complete(null); |
4411 |
|
} |
4412 |
|
} |