Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit d950da5

Browse files
committed
prefer rethrow with cause to plain fail
1 parent 462fd4e commit d950da5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/org/openjdk/tests/tck/JSR166TestCase.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
* </ul>
179179
*/
180180
public class JSR166TestCase extends TestCase {
181-
// CVS rev. 1.239
181+
// CVS rev. 1.240
182182
private static final boolean useSecurityManager =
183183
Boolean.getBoolean("jsr166.useSecurityManager");
184184

@@ -1000,7 +1000,10 @@ void assertThreadBlocks(Thread thread, Thread.State expected) {
10001000
for (long retries = LONG_DELAY_MS * 3 / 4; retries-->0; ) {
10011001
try { delay(1); }
10021002
catch (InterruptedException fail) {
1003-
fail("Unexpected InterruptedException");
1003+
AssertionError ae =
1004+
new AssertionError("Unexpected InterruptedException");
1005+
ae.initCause(fail);
1006+
throw ae;
10041007
}
10051008
Thread.State s = thread.getState();
10061009
if (s == expected)

0 commit comments

Comments
 (0)