On Mon, 22 Jan 2024 07:27:50 GMT, Tejesh R <[email protected]> wrote: >> Vector.iterator and Vector.subList.iterator are still check for modification >> on iteration (see usages of the method >> `java.util.AbstractList.SubList#checkForComodification`). It means, if >> vector was concurrently modified during iteration - iteration will fail with >> the `ConcurrentModificationException` > > Yes, which is why I am using Synchronized to handle > `concurrentModificationException`.
It doesn't work like this. Modification happen in another thread in another method. This `synchronized` doesn't affect another method. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17462#discussion_r1461448973
