RFR: 8296535: Unnecessary Vector usage in AquaFileSystemModel.FilesLoader
j3graham
duke at openjdk.org
Tue Nov 8 16:37:26 UTC 2022
On Wed, 2 Nov 2022 08:19:41 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> Couple of local variables in `com.apple.laf.AquaFileSystemModel.FilesLoader#run` are used only within the method from single thread. So we can avoid usage of legacy synchronized `Vector` here and use `ArrayList` instead.
src/java.desktop/macosx/classes/com/apple/laf/AquaFileSystemModel.java line 428:
> 426: }
> 427: final DoChangeContents runnable = new DoChangeContents(chunk, fid);
> 428: runnables.addElement(runnable);
I think the “chunk” doesn’t need to be a vector either.
-------------
PR: https://git.openjdk.org/jdk/pull/10942
More information about the client-libs-dev
mailing list