8195590: Miscellaneous changes imported from jsr166 CVS 2018-02

Reviewed-by: martin, psandoz, dholmes
This commit is contained in:
Doug Lea 2018-02-10 09:23:41 -08:00
parent b6c2b234ef
commit f9b19eb874
16 changed files with 187 additions and 186 deletions

View file

@ -68,7 +68,6 @@ import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestSuite;
@ -319,7 +318,7 @@ public class CompletableFutureTest extends JSR166TestCase {
}
f = new CompletableFuture<>();
f.completeExceptionally(ex = new CFException());
f.completeExceptionally(new CFException());
f.obtrudeValue(v1);
checkCompletedNormally(f, v1);
f.obtrudeException(ex = new CFException());
@ -4217,7 +4216,7 @@ public class CompletableFutureTest extends JSR166TestCase {
static void assertZero(CompletableFuture<?> f) {
try {
f.getNow(null);
throw new AssertionFailedError("should throw");
throw new AssertionError("should throw");
} catch (CompletionException success) {
assertTrue(success.getCause() instanceof ZeroException);
}