RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

Andrey Turbanov aturbanov at openjdk.org
Tue Jan 23 08:43:26 UTC 2024


On Mon, 22 Jan 2024 09:34:48 GMT, Tejesh R <tr at openjdk.org> wrote:

>> `synchronized` _works_ only if synchronized object is the same in all places. In the new method "synchronized object" - is an instance of `FilesLoader`, while in other places `fileCache` is accessed under `synchronized(fileCache)`.
>
> Then adding `synchronized(fileCache)` in `FilesLoader` where list comparison happens would be better idea?

Yes. If you go with `synchronized` then it should be `synchronized (fileCache)`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17462#discussion_r1462913181


More information about the client-libs-dev mailing list