--- jsr166/src/test/jtreg/util/Collections/Disjoint.java 2010/09/27 19:15:15 1.3 +++ jsr166/src/test/jtreg/util/Collections/Disjoint.java 2017/10/22 02:59:18 1.7 @@ -26,9 +26,7 @@ * @bug 4339792 * @summary Basic test for Collections.disjoint * @author Josh Bloch - * - * @compile -source 1.5 Disjoint.java - * @run main Disjoint + * @key randomness */ import java.util.*; @@ -36,7 +34,7 @@ import java.util.*; public class Disjoint { static final int N = 20; - public static void main(String args[]) { + public static void main(String[] args) { // Make an array of lists each of which shares a single element // with its "neighbors," and no elements with other lists in the array Random rnd = new Random(); @@ -44,7 +42,7 @@ public class Disjoint { int x = 0; for (int i = 0; i < N; i++) { int size = rnd.nextInt(10) + 2; - List list = new ArrayList(size); + List list = new ArrayList<>(size); for (int j = 1; j < size; j++) list.add(x++); list.add(x);