On Mon, 22 Jan 2024 09:19:26 GMT, Andrey Turbanov <aturba...@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