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

Comparing jsr166/src/test/tck/CopyOnWriteArrayListTest.java (file contents):
Revision 1.48 by jsr166, Tue Apr 3 00:58:28 2018 UTC vs.
Revision 1.49 by jsr166, Tue Apr 3 05:49:43 2018 UTC

# Line 35 | Line 35 | public class CopyOnWriteArrayListTest ex
35          }
36          class SubListImplementation extends Implementation {
37              public List emptyCollection() {
38 <                return super.emptyCollection().subList(0, 0);
38 >                List list = super.emptyCollection();
39 >                ThreadLocalRandom rnd = ThreadLocalRandom.current();
40 >                if (rnd.nextBoolean())
41 >                    list.add(makeElement(rnd.nextInt()));
42 >                int i = rnd.nextInt(list.size() + 1);
43 >                return list.subList(i, i);
44              }
45          }
46          return newTestSuite(

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines