Skip to content

Commit

Permalink
Narrow failure condition
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 20, 2024
1 parent 589e18e commit f05568b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -825,9 +825,9 @@ public void testCollectionIteratorFailFast() {
}

resetFull();
final Iterator<E> iter = getCollection().iterator();
getCollection().clear();
try {
final Iterator<E> iter = getCollection().iterator();
getCollection().clear();
iter.next();
fail("next after clear should raise ConcurrentModification");
} catch (final ConcurrentModificationException | NoSuchElementException e) {
Expand Down

0 comments on commit f05568b

Please sign in to comment.