33 |
|
public class WrappedNull { |
34 |
|
public static void main(String argv[]) throws Exception { |
35 |
|
boolean testSucceeded = false; |
36 |
< |
try{ |
36 |
> |
try { |
37 |
|
List l = Arrays.asList(null); |
38 |
|
} |
39 |
|
catch (NullPointerException e) { |
43 |
|
throw new Exception("Arrays.asList"); |
44 |
|
|
45 |
|
testSucceeded = false; |
46 |
< |
try{ |
46 |
> |
try { |
47 |
|
Collection c = Collections.unmodifiableCollection(null); |
48 |
|
} |
49 |
|
catch (NullPointerException e) { |
53 |
|
throw new Exception("unmodifiableCollection"); |
54 |
|
|
55 |
|
testSucceeded = false; |
56 |
< |
try{ |
56 |
> |
try { |
57 |
|
Set c = Collections.unmodifiableSet(null); |
58 |
|
} |
59 |
|
catch (NullPointerException e) { |
63 |
|
throw new Exception("unmodifiableSet"); |
64 |
|
|
65 |
|
testSucceeded = false; |
66 |
< |
try{ |
66 |
> |
try { |
67 |
|
List c = Collections.unmodifiableList(null); |
68 |
|
} |
69 |
|
catch (NullPointerException e) { |
73 |
|
throw new Exception("unmodifiableList"); |
74 |
|
|
75 |
|
testSucceeded = false; |
76 |
< |
try{ |
76 |
> |
try { |
77 |
|
Map c = Collections.unmodifiableMap(null); |
78 |
|
} |
79 |
|
catch (NullPointerException e) { |
83 |
|
throw new Exception("unmodifiableMap"); |
84 |
|
|
85 |
|
testSucceeded = false; |
86 |
< |
try{ |
86 |
> |
try { |
87 |
|
SortedSet c = Collections.unmodifiableSortedSet(null); |
88 |
|
} |
89 |
|
catch (NullPointerException e) { |
93 |
|
throw new Exception("unmodifiableSortedSet"); |
94 |
|
|
95 |
|
testSucceeded = false; |
96 |
< |
try{ |
96 |
> |
try { |
97 |
|
SortedMap c = Collections.unmodifiableSortedMap(null); |
98 |
|
} |
99 |
|
catch (NullPointerException e) { |
103 |
|
throw new Exception("unmodifiableSortedMap"); |
104 |
|
|
105 |
|
testSucceeded = false; |
106 |
< |
try{ |
106 |
> |
try { |
107 |
|
Collection c = Collections.synchronizedCollection(null); |
108 |
|
} |
109 |
|
catch (NullPointerException e) { |
113 |
|
throw new Exception("synchronizedCollection"); |
114 |
|
|
115 |
|
testSucceeded = false; |
116 |
< |
try{ |
116 |
> |
try { |
117 |
|
Set c = Collections.synchronizedSet(null); |
118 |
|
} |
119 |
|
catch (NullPointerException e) { |
123 |
|
throw new Exception("synchronizedSet"); |
124 |
|
|
125 |
|
testSucceeded = false; |
126 |
< |
try{ |
126 |
> |
try { |
127 |
|
List c = Collections.synchronizedList(null); |
128 |
|
} |
129 |
|
catch (NullPointerException e) { |
133 |
|
throw new Exception("synchronizedList"); |
134 |
|
|
135 |
|
testSucceeded = false; |
136 |
< |
try{ |
136 |
> |
try { |
137 |
|
Map c = Collections.synchronizedMap(null); |
138 |
|
} |
139 |
|
catch (NullPointerException e) { |
143 |
|
throw new Exception("synchronizedMap"); |
144 |
|
|
145 |
|
testSucceeded = false; |
146 |
< |
try{ |
146 |
> |
try { |
147 |
|
SortedSet c = Collections.synchronizedSortedSet(null); |
148 |
|
} |
149 |
|
catch (NullPointerException e) { |
153 |
|
throw new Exception("synchronizedSortedSet"); |
154 |
|
|
155 |
|
testSucceeded = false; |
156 |
< |
try{ |
156 |
> |
try { |
157 |
|
SortedMap c = Collections.synchronizedSortedMap(null); |
158 |
|
} |
159 |
|
catch (NullPointerException e) { |