--- jsr166/src/test/tck/ConcurrentSkipListSetTest.java 2015/02/28 20:13:46 1.37 +++ jsr166/src/test/tck/ConcurrentSkipListSetTest.java 2015/05/15 18:21:19 1.39 @@ -21,7 +21,7 @@ import junit.framework.TestSuite; public class ConcurrentSkipListSetTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); + main(suite(), args); } public static Test suite() { return new TestSuite(ConcurrentSkipListSetTest.class); @@ -87,8 +87,7 @@ public class ConcurrentSkipListSetTest e */ public void testConstructor4() { try { - Integer[] ints = new Integer[SIZE]; - new ConcurrentSkipListSet(Arrays.asList(ints)); + new ConcurrentSkipListSet(Arrays.asList(new Integer[SIZE])); shouldThrow(); } catch (NullPointerException success) {} } @@ -97,10 +96,10 @@ public class ConcurrentSkipListSetTest e * Initializing from Collection with some null elements throws NPE */ public void testConstructor5() { + Integer[] ints = new Integer[SIZE]; + for (int i = 0; i < SIZE-1; ++i) + ints[i] = new Integer(i); try { - Integer[] ints = new Integer[SIZE]; - for (int i = 0; i < SIZE-1; ++i) - ints[i] = new Integer(i); new ConcurrentSkipListSet(Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {}