diff --git a/test/ArrayDequeTest.java b/test/ArrayDequeTest.java index c1c4cbc133..0df62c4ac3 100644 --- a/test/ArrayDequeTest.java +++ b/test/ArrayDequeTest.java @@ -1,5 +1,4 @@ import java.util.ArrayDeque; -import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.LinkedList; import java.util.NoSuchElementException; @@ -36,8 +35,6 @@ public class ArrayDequeTest { iterateTest(true); iteratorRemoveTest(false); iteratorRemoveTest(true); - iteratorConcurrentModificationFail(false); - iteratorConcurrentModificationFail(true); iteratorNoElementFail(false); iteratorNoElementFail(true); } @@ -144,30 +141,6 @@ public class ArrayDequeTest { } } - private static void iteratorConcurrentModificationFail(boolean desc) { - ArrayDeque ad = new ArrayDeque(); - ad.add(new Object()); - ad.add(new Object()); - - Iterator testIt; - if (desc) { - testIt = ad.descendingIterator(); - } else { - testIt = ad.iterator(); - } - - testIt.next(); - try { - // modify structure - ad.add(new Object()); - - testIt.next(); - throw new RuntimeException("Exception should have thrown"); - } catch (ConcurrentModificationException e) { - // expected - } - } - private static void iteratorNoElementFail(boolean desc) { ArrayDeque ad = new ArrayDeque();