--- jsr166/src/test/tck/ConcurrentSkipListSetTest.java 2015/04/25 04:55:30 1.38 +++ jsr166/src/test/tck/ConcurrentSkipListSetTest.java 2015/05/15 18:21:19 1.39 @@ -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) {}