ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Random/DistinctSeeds.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Random/DistinctSeeds.java (file contents):
Revision 1.8 by jsr166, Tue Sep 15 07:53:31 2015 UTC vs.
Revision 1.9 by jsr166, Wed Jan 4 04:46:19 2017 UTC

# Line 34 | Line 34 | public class DistinctSeeds {
34          }
35          final int threadCount = 2;
36          List<RandomCollector> collectors = new ArrayList<>();
37 <        List<Thread> threads = new ArrayList<Thread>();
37 >        List<Thread> threads = new ArrayList<>();
38          for (int i = 0; i < threadCount; i++) {
39              RandomCollector r = new RandomCollector();
40              collectors.add(r);
# Line 45 | Line 45 | public class DistinctSeeds {
45          for (Thread thread : threads)
46              thread.join();
47          int collisions = 0;
48 <        HashSet<Long> s = new HashSet<Long>();
48 >        HashSet<Long> s = new HashSet<>();
49          for (RandomCollector r : collectors) {
50              for (long x : r.randoms) {
51                  if (s.contains(x))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines