# | 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 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |