--- jsr166/src/test/tck/ThreadLocalTest.java 2009/12/01 10:02:59 1.11 +++ jsr166/src/test/tck/ThreadLocalTest.java 2015/04/25 04:55:31 1.17 @@ -1,17 +1,17 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ * Other contributors include Andrew Wright, Jeffrey Hayes, * Pat Fisher, Mike Judd. */ -import junit.framework.*; -import java.util.concurrent.Semaphore; +import junit.framework.Test; +import junit.framework.TestSuite; public class ThreadLocalTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); + main(suite(), args); } public static Test suite() { @@ -67,12 +67,12 @@ public class ThreadLocalTest extends JSR child = new ITLThread(x); child.start(); } - Thread.currentThread().yield(); + Thread.yield(); int threadId = itl.get().intValue(); for (int j = 0; j < threadId; j++) { x[threadId]++; - Thread.currentThread().yield(); + Thread.yield(); } if (child != null) { // Wait for child (if any) @@ -90,7 +90,7 @@ public class ThreadLocalTest extends JSR */ public void testGenericITL() throws InterruptedException { final int threadCount = 10; - final int x[] = new int[threadCount]; + final int[] x = new int[threadCount]; Thread progenitor = new ITLThread(x); progenitor.start(); progenitor.join();