On Wed, 17 Jan 2024 12:55:52 GMT, Tejesh R <[email protected]> wrote:
> Suggested fix [JDK-8307091](https://bugs.openjdk.org/browse/JDK-8307091) also
> created concurrent exception intermittently (monthly once/quarterly once) on
> CI system. The issue was not able to be reproduced yet, hence proposing an
> alternative fix which uses iterators to compare the List.
> CI testing shows green.
src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java
line 417:
> 415: }
> 416:
> 417: private synchronized <T> boolean compareIterators(Iterator<T>
> iterator1, Iterator<T> iterator2) {
I'm not sure I understand, how this `synchronized` helps to avoid the issue.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17462#discussion_r1460487345