# | Line 25 | Line 25 | |
---|---|---|
25 | * @test | |
26 | * @bug 4298133 | |
27 | * @summary Due to a bug in Vector's removeAllElements(), | |
28 | < | * the modification counter would not get incremented. |
28 | > | * the modification counter would not get incremented. |
29 | * @author Konstantin Kladko | |
30 | */ | |
31 | ||
# | Line 37 | Line 37 | public class ComodifiedRemoveAllElements | |
37 | v.addElement(null); | |
38 | Iterator it = v.iterator(); | |
39 | v.removeAllElements(); | |
40 | < | try{ |
40 | > | try { |
41 | it.next(); | |
42 | } catch (ConcurrentModificationException cme) { | |
43 | return; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |