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 |
|
} |
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 |
|
} |
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 |
|
} |