--- jsr166/src/test/tck/ForkJoinTaskTest.java 2019/08/12 15:08:44 1.57 +++ jsr166/src/test/tck/ForkJoinTaskTest.java 2021/01/26 13:33:06 1.60 @@ -68,7 +68,7 @@ public class ForkJoinTaskTest extends JS } } - void checkNotDone(ForkJoinTask a) { + void checkNotDone(ForkJoinTask a) { assertFalse(a.isDone()); assertFalse(a.isCompletedNormally()); assertFalse(a.isCompletedAbnormally()); @@ -123,7 +123,7 @@ public class ForkJoinTaskTest extends JS assertSame(expectedValue, v2); } - void checkCancelled(ForkJoinTask a) { + void checkCancelled(ForkJoinTask a) { assertTrue(a.isDone()); assertTrue(a.isCancelled()); assertFalse(a.isCompletedNormally()); @@ -160,7 +160,7 @@ public class ForkJoinTaskTest extends JS } catch (Throwable fail) { threadUnexpectedException(fail); } } - void checkCompletedAbnormally(ForkJoinTask a, Throwable t) { + void checkCompletedAbnormally(ForkJoinTask a, Throwable t) { assertTrue(a.isDone()); assertFalse(a.isCancelled()); assertFalse(a.isCompletedNormally()); @@ -858,7 +858,7 @@ public class ForkJoinTaskTest extends JS AsyncFib f = new AsyncFib(8); AsyncFib g = new AsyncFib(9); AsyncFib h = new AsyncFib(7); - HashSet set = new HashSet(); + HashSet> set = new HashSet>(); set.add(f); set.add(g); set.add(h); @@ -898,7 +898,7 @@ public class ForkJoinTaskTest extends JS protected void realCompute() { AsyncFib f = new AsyncFib(8); FailingAsyncFib g = new FailingAsyncFib(9); - ForkJoinTask[] tasks = { f, g }; + ForkJoinTask[] tasks = { f, g }; shuffle(tasks); try { invokeAll(tasks); @@ -936,7 +936,7 @@ public class ForkJoinTaskTest extends JS AsyncFib f = new AsyncFib(8); FailingAsyncFib g = new FailingAsyncFib(9); AsyncFib h = new AsyncFib(7); - ForkJoinTask[] tasks = { f, g, h }; + ForkJoinTask[] tasks = { f, g, h }; shuffle(tasks); try { invokeAll(tasks); @@ -957,7 +957,7 @@ public class ForkJoinTaskTest extends JS FailingAsyncFib f = new FailingAsyncFib(8); AsyncFib g = new AsyncFib(9); AsyncFib h = new AsyncFib(7); - ForkJoinTask[] tasks = { f, g, h }; + ForkJoinTask[] tasks = { f, g, h }; shuffle(tasks); try { invokeAll(Arrays.asList(tasks)); @@ -1527,7 +1527,7 @@ public class ForkJoinTaskTest extends JS AsyncFib f = new AsyncFib(8); AsyncFib g = new AsyncFib(9); AsyncFib h = new AsyncFib(7); - HashSet set = new HashSet(); + HashSet> set = new HashSet>(); set.add(f); set.add(g); set.add(h); @@ -1567,7 +1567,7 @@ public class ForkJoinTaskTest extends JS protected void realCompute() { AsyncFib f = new AsyncFib(8); FailingAsyncFib g = new FailingAsyncFib(9); - ForkJoinTask[] tasks = { f, g }; + ForkJoinTask[] tasks = { f, g }; shuffle(tasks); try { invokeAll(tasks); @@ -1605,7 +1605,7 @@ public class ForkJoinTaskTest extends JS AsyncFib f = new AsyncFib(8); FailingAsyncFib g = new FailingAsyncFib(9); AsyncFib h = new AsyncFib(7); - ForkJoinTask[] tasks = { f, g, h }; + ForkJoinTask[] tasks = { f, g, h }; shuffle(tasks); try { invokeAll(tasks); @@ -1626,7 +1626,7 @@ public class ForkJoinTaskTest extends JS FailingAsyncFib f = new FailingAsyncFib(8); AsyncFib g = new AsyncFib(9); AsyncFib h = new AsyncFib(7); - ForkJoinTask[] tasks = { f, g, h }; + ForkJoinTask[] tasks = { f, g, h }; shuffle(tasks); try { invokeAll(Arrays.asList(tasks)); @@ -1693,4 +1693,20 @@ public class ForkJoinTaskTest extends JS task.toString()); } } + + // adaptInterruptible deferred to its own independent change + // https://bugs.openjdk.java.net/browse/JDK-8246587 + +// /** +// * adaptInterruptible(callable).toString() contains toString of wrapped task +// */ +// public void testAdaptInterruptible_Callable_toString() { +// if (testImplementationDetails) { +// Callable c = () -> ""; +// ForkJoinTask task = ForkJoinTask.adaptInterruptible(c); +// assertEquals( +// identityString(task) + "[Wrapped task = " + c.toString() + "]", +// task.toString()); +// } +// } }