RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException
Tejesh R
tr at openjdk.org
Mon Jan 22 09:37:26 UTC 2024
On Mon, 22 Jan 2024 09:19:26 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> As per my analysis `fileCache` is synchronized in other places also. Do you notice any places where it is not synchronized?
>
> `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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17462#discussion_r1461574564
More information about the client-libs-dev
mailing list