ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Collections/WrappedNull.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Collections/WrappedNull.java (file contents):
Revision 1.3 by jsr166, Sun Sep 5 21:32:19 2010 UTC vs.
Revision 1.4 by jsr166, Sat Oct 16 16:00:28 2010 UTC

# Line 33 | Line 33 | import java.util.*;
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) {
# Line 43 | Line 43 | public class WrappedNull {
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) {
# Line 53 | Line 53 | public class WrappedNull {
53                throw new Exception("unmodifiableCollection");
54  
55            testSucceeded = false;
56 <          try{
56 >          try {
57                Set c = Collections.unmodifiableSet(null);
58            }
59            catch (NullPointerException e) {
# Line 63 | Line 63 | public class WrappedNull {
63                throw new Exception("unmodifiableSet");
64  
65            testSucceeded = false;
66 <          try{
66 >          try {
67                List c = Collections.unmodifiableList(null);
68            }
69            catch (NullPointerException e) {
# Line 73 | Line 73 | public class WrappedNull {
73                throw new Exception("unmodifiableList");
74  
75            testSucceeded = false;
76 <          try{
76 >          try {
77                Map c = Collections.unmodifiableMap(null);
78            }
79            catch (NullPointerException e) {
# Line 83 | Line 83 | public class WrappedNull {
83                throw new Exception("unmodifiableMap");
84  
85            testSucceeded = false;
86 <          try{
86 >          try {
87                SortedSet c = Collections.unmodifiableSortedSet(null);
88            }
89            catch (NullPointerException e) {
# Line 93 | Line 93 | public class WrappedNull {
93                throw new Exception("unmodifiableSortedSet");
94  
95            testSucceeded = false;
96 <          try{
96 >          try {
97                SortedMap c = Collections.unmodifiableSortedMap(null);
98            }
99            catch (NullPointerException e) {
# Line 103 | Line 103 | public class WrappedNull {
103                throw new Exception("unmodifiableSortedMap");
104  
105            testSucceeded = false;
106 <          try{
106 >          try {
107                Collection c = Collections.synchronizedCollection(null);
108            }
109            catch (NullPointerException e) {
# Line 113 | Line 113 | public class WrappedNull {
113                throw new Exception("synchronizedCollection");
114  
115            testSucceeded = false;
116 <          try{
116 >          try {
117                Set c = Collections.synchronizedSet(null);
118            }
119            catch (NullPointerException e) {
# Line 123 | Line 123 | public class WrappedNull {
123                throw new Exception("synchronizedSet");
124  
125            testSucceeded = false;
126 <          try{
126 >          try {
127                List c = Collections.synchronizedList(null);
128            }
129            catch (NullPointerException e) {
# Line 133 | Line 133 | public class WrappedNull {
133                throw new Exception("synchronizedList");
134  
135            testSucceeded = false;
136 <          try{
136 >          try {
137                Map c = Collections.synchronizedMap(null);
138            }
139            catch (NullPointerException e) {
# Line 143 | Line 143 | public class WrappedNull {
143                throw new Exception("synchronizedMap");
144  
145            testSucceeded = false;
146 <          try{
146 >          try {
147                SortedSet c = Collections.synchronizedSortedSet(null);
148            }
149            catch (NullPointerException e) {
# Line 153 | Line 153 | public class WrappedNull {
153                throw new Exception("synchronizedSortedSet");
154  
155            testSucceeded = false;
156 <          try{
156 >          try {
157                SortedMap c = Collections.synchronizedSortedMap(null);
158            }
159            catch (NullPointerException e) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines