91 |
|
*/ |
92 |
|
public void testConstructor4() { |
93 |
|
try { |
94 |
< |
Integer[] ints = new Integer[SIZE]; |
95 |
< |
new TreeSet(Arrays.asList(ints)); |
94 |
> |
new TreeSet(Arrays.asList(new Integer[SIZE])); |
95 |
|
shouldThrow(); |
96 |
|
} catch (NullPointerException success) {} |
97 |
|
} |
100 |
|
* Initializing from Collection with some null elements throws NPE |
101 |
|
*/ |
102 |
|
public void testConstructor5() { |
103 |
+ |
Integer[] ints = new Integer[SIZE]; |
104 |
+ |
for (int i = 0; i < SIZE-1; ++i) |
105 |
+ |
ints[i] = new Integer(i); |
106 |
|
try { |
105 |
– |
Integer[] ints = new Integer[SIZE]; |
106 |
– |
for (int i = 0; i < SIZE-1; ++i) |
107 |
– |
ints[i] = new Integer(i); |
107 |
|
new TreeSet(Arrays.asList(ints)); |
108 |
|
shouldThrow(); |
109 |
|
} catch (NullPointerException success) {} |