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

Comparing jsr166/src/test/loops/MapWordLoops.java (file contents):
Revision 1.12 by jsr166, Mon Aug 10 03:13:33 2015 UTC vs.
Revision 1.13 by jsr166, Sun Oct 23 03:03:23 2016 UTC

# Line 66 | Line 66 | public class MapWordLoops {
66  
67      static Map<String,String> newMap(Class<?> cl) {
68          try {
69 <            Map m = (Map<String,String>)cl.newInstance();
70 <            return m;
69 >            return (Map<String,String>) cl.getConstructor().newInstance();
70          } catch (Exception e) {
71              throw new RuntimeException("Can't instantiate " + cl + ": " + e);
72          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines