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

Comparing jsr166/src/test/loops/CollectionWordLoops.java (file contents):
Revision 1.10 by jsr166, Thu Jan 15 18:34:18 2015 UTC vs.
Revision 1.12 by jsr166, Sun Oct 23 03:03:23 2016 UTC

# Line 37 | Line 37 | public class CollectionWordLoops {
37  
38          for (int s = WORDS_FILES.length-1; s >= 0; --s)
39              tests(collectionClass, numTests, s);
40
40      }
41  
42      static void tests(Class<?> collectionClass, int numTests, int sizeIndex) {
# Line 65 | Line 64 | public class CollectionWordLoops {
64  
65      static Collection<String> newCollection(Class<?> cl) {
66          try {
67 <            Collection m = (Collection<String>) cl.newInstance();
69 <            return m;
67 >            return (Collection<String>) cl.getConstructor().newInstance();
68          } catch (Exception e) {
69              throw new RuntimeException("Can't instantiate " + cl + ": " + e);
70          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines