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

Comparing jsr166/src/test/jtreg/util/Collections/CheckedSetBash.java (file contents):
Revision 1.7 by jsr166, Sun Oct 18 17:34:26 2015 UTC vs.
Revision 1.8 by jsr166, Sat Oct 21 00:59:54 2017 UTC

# Line 122 | Line 122 | public class CheckedSetBash {
122      }
123  
124      static void AddRandoms(Set s, int n) {
125 <        for (int i=0; i<n; i++) {
126 <            int r = rnd.nextInt() % n;
127 <            Integer e = new Integer(r < 0 ? -r : r);
125 >        for (int i = 0; i < n; i++) {
126 >            Integer e = rnd.nextInt(n);
127  
128              int preSize = s.size();
129              boolean prePresent = s.contains(e);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines