RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException
Andrey Turbanov
aturbanov at openjdk.org
Mon Jan 22 07:41:26 UTC 2024
On Mon, 22 Jan 2024 07:27:50 GMT, Tejesh R <tr at openjdk.org> 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
More information about the client-libs-dev
mailing list