On Tue, 14 Mar 2023 10:06:47 GMT, Tejesh R <[email protected]> wrote:

> The issue is intermittent and was not able to reproduce it. Though through 
> code analysis and bug reported logs, the issue seems to be in COM thread of 
> `FilesLoader` class in `BasicDirectoryModel` file. Looks like there are 
> certain places where the `filecache` variable isn't thread-safe, and this fix 
> address the issue. 
> Mach5 test runs are fine, no regressions were found.

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java 
line 198:

> 196: 
> 197:     public int getSize() {
> 198:         return fileCache.size();

The fileCache is a Vector, and the methods of that object are already 
synchronized on "this"

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

PR: https://git.openjdk.org/jdk/pull/13012

Reply via email to