--- jsr166/src/test/tck/ThreadTest.java 2015/02/22 22:07:17 1.17 +++ jsr166/src/test/tck/ThreadTest.java 2022/03/22 21:29:24 1.21 @@ -11,7 +11,7 @@ import junit.framework.TestSuite; public class ThreadTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); + main(suite(), args); } public static Test suite() { @@ -48,9 +48,10 @@ public class ThreadTest extends JSR166Te * getDefaultUncaughtExceptionHandler returns value of last * setDefaultUncaughtExceptionHandler. */ + @SuppressWarnings("removal") public void testGetAndSetDefaultUncaughtExceptionHandler() { - assertEquals(null, Thread.getDefaultUncaughtExceptionHandler()); - // failure due to securityException is OK. + assertNull(Thread.getDefaultUncaughtExceptionHandler()); + // failure due to SecurityException is OK. // Would be nice to explicitly test both ways, but cannot yet. Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();