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