--- jsr166/src/test/tck/ForkJoinTaskTest.java 2010/11/22 22:45:49 1.28 +++ jsr166/src/test/tck/ForkJoinTaskTest.java 2011/02/22 01:18:59 1.30 @@ -99,7 +99,7 @@ public class ForkJoinTaskTest extends JS long t0 = System.nanoTime(); assertSame(expected, a.join()); assertTrue(millisElapsedSince(t0) < SMALL_DELAY_MS); - assertTrue(Thread.interrupted()); + Thread.interrupted(); } { @@ -107,7 +107,7 @@ public class ForkJoinTaskTest extends JS long t0 = System.nanoTime(); a.quietlyJoin(); // should be no-op assertTrue(millisElapsedSince(t0) < SMALL_DELAY_MS); - assertTrue(Thread.interrupted()); + Thread.interrupted(); } assertFalse(a.cancel(false)); @@ -135,8 +135,8 @@ public class ForkJoinTaskTest extends JS a.join(); shouldThrow(); } catch (CancellationException success) { - assertTrue(Thread.interrupted()); } catch (Throwable fail) { threadUnexpectedException(fail); } + Thread.interrupted(); { long t0 = System.nanoTime(); @@ -162,7 +162,7 @@ public class ForkJoinTaskTest extends JS assertFalse(a.isCancelled()); assertFalse(a.isCompletedNormally()); assertTrue(a.isCompletedAbnormally()); - assertSame(t, a.getException()); + assertSame(t.getClass(), a.getException().getClass()); assertNull(a.getRawResult()); assertFalse(a.cancel(false)); assertFalse(a.cancel(true)); @@ -172,9 +172,9 @@ public class ForkJoinTaskTest extends JS a.join(); shouldThrow(); } catch (Throwable expected) { - assertTrue(Thread.interrupted()); - assertSame(t, expected); + assertSame(t.getClass(), expected.getClass()); } + Thread.interrupted(); { long t0 = System.nanoTime(); @@ -186,14 +186,14 @@ public class ForkJoinTaskTest extends JS a.get(); shouldThrow(); } catch (ExecutionException success) { - assertSame(t, success.getCause()); + assertSame(t.getClass(), success.getCause().getClass()); } catch (Throwable fail) { threadUnexpectedException(fail); } try { a.get(5L, SECONDS); shouldThrow(); } catch (ExecutionException success) { - assertSame(t, success.getCause()); + assertSame(t.getClass(), success.getCause().getClass()); } catch (Throwable fail) { threadUnexpectedException(fail); } } @@ -205,7 +205,7 @@ public class ForkJoinTaskTest extends JS * differently than supplied Recursive forms. */ - static final class FJException extends RuntimeException { + public static final class FJException extends RuntimeException { FJException() { super(); } }