8193300: Miscellaneous changes imported from jsr166 CVS 2018-01

Reviewed-by: martin
This commit is contained in:
Doug Lea 2018-01-16 18:28:39 -08:00
parent c19d18871c
commit d771fc3a6b
149 changed files with 872 additions and 571 deletions

View file

@ -357,7 +357,7 @@ public class CompletableFutureTest extends JSR166TestCase {
* toString indicates current completion state
*/
public void testToString_incomplete() {
CompletableFuture<String> f = new CompletableFuture<String>();
CompletableFuture<String> f = new CompletableFuture<>();
assertTrue(f.toString().matches(".*\\[.*Not completed.*\\]"));
if (testImplementationDetails)
assertEquals(identityString(f) + "[Not completed]",
@ -365,7 +365,7 @@ public class CompletableFutureTest extends JSR166TestCase {
}
public void testToString_normal() {
CompletableFuture<String> f = new CompletableFuture<String>();
CompletableFuture<String> f = new CompletableFuture<>();
assertTrue(f.complete("foo"));
assertTrue(f.toString().matches(".*\\[.*Completed normally.*\\]"));
if (testImplementationDetails)
@ -374,7 +374,7 @@ public class CompletableFutureTest extends JSR166TestCase {
}
public void testToString_exception() {
CompletableFuture<String> f = new CompletableFuture<String>();
CompletableFuture<String> f = new CompletableFuture<>();
assertTrue(f.completeExceptionally(new IndexOutOfBoundsException()));
assertTrue(f.toString().matches(".*\\[.*Completed exceptionally.*\\]"));
if (testImplementationDetails)
@ -384,7 +384,7 @@ public class CompletableFutureTest extends JSR166TestCase {
public void testToString_cancelled() {
for (boolean mayInterruptIfRunning : new boolean[] { true, false }) {
CompletableFuture<String> f = new CompletableFuture<String>();
CompletableFuture<String> f = new CompletableFuture<>();
assertTrue(f.cancel(mayInterruptIfRunning));
assertTrue(f.toString().matches(".*\\[.*Completed exceptionally.*\\]"));
if (testImplementationDetails)