--- jsr166/src/test/tck/JSR166TestCase.java 2018/04/10 18:09:58 1.244 +++ jsr166/src/test/tck/JSR166TestCase.java 2018/07/22 21:19:14 1.245 @@ -1388,9 +1388,11 @@ public class JSR166TestCase extends Test */ void checkTimedGet(Future f, T expectedValue, long timeoutMillis) { long startTime = System.nanoTime(); + T actual = null; try { - assertEquals(expectedValue, f.get(timeoutMillis, MILLISECONDS)); + actual = f.get(timeoutMillis, MILLISECONDS); } catch (Throwable fail) { threadUnexpectedException(fail); } + assertEquals(expectedValue, actual); if (millisElapsedSince(startTime) > timeoutMillis/2) throw new AssertionError("timed get did not return promptly"); }