ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/MapCheck.java
(Generate patch)

Comparing jsr166/src/test/loops/MapCheck.java (file contents):
Revision 1.7 by jsr166, Thu Oct 29 23:11:03 2009 UTC vs.
Revision 1.8 by jsr166, Mon Nov 2 23:42:46 2009 UTC

# Line 40 | Line 40 | public class MapCheck {
40          if (args.length > 0) {
41              try {
42                  mapClass = Class.forName(args[0]);
43 <            } catch(ClassNotFoundException e) {
43 >            } catch (ClassNotFoundException e) {
44                  throw new RuntimeException("Class " + args[0] + " not found.");
45              }
46          }
# Line 99 | Line 99 | public class MapCheck {
99  
100      static Map newMap() {
101          try {
102 <            return (Map)mapClass.newInstance();
103 <        } catch(Exception e) {
102 >            return (Map) mapClass.newInstance();
103 >        } catch (Exception e) {
104              throw new RuntimeException("Can't instantiate " + mapClass + ": " + e);
105          }
106      }
# Line 134 | Line 134 | public class MapCheck {
134          try {
135              m.put(null, x);
136              v = m.get(null);
137 <        } catch(NullPointerException npe) {
137 >        } catch (NullPointerException npe) {
138              System.out.println("Map does not allow null keys");
139              return;
140          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines