--- jsr166/src/test/jtreg/util/Vector/ComodifiedRemoveAllElements.java 2010/09/05 21:32:20 1.2 +++ jsr166/src/test/jtreg/util/Vector/ComodifiedRemoveAllElements.java 2018/01/08 03:12:03 1.5 @@ -25,11 +25,13 @@ * @test * @bug 4298133 * @summary Due to a bug in Vector's removeAllElements(), - * the modification counter would not get incremented. + * the modification counter would not get incremented. * @author Konstantin Kladko */ -import java.util.*; +import java.util.ConcurrentModificationException; +import java.util.Iterator; +import java.util.Vector; public class ComodifiedRemoveAllElements { public static void main(String[] args) { @@ -37,7 +39,7 @@ public class ComodifiedRemoveAllElements v.addElement(null); Iterator it = v.iterator(); v.removeAllElements(); - try{ + try { it.next(); } catch (ConcurrentModificationException cme) { return;