RFR: 8296535: Unnecessary Vector usage in AquaFileSystemModel.FilesLoader
Andrey Turbanov
aturbanov at openjdk.org
Tue Nov 8 13:05:38 UTC 2022
On Sun, 6 Nov 2022 04:11:34 GMT, j3graham <duke 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 261:
>
>> 259: }
>> 260:
>> 261: protected void sort(ArrayList<Object> v) {
>
> The custom sort implementation here could be replaced with the standard list.sort with an appropriate comparator
I agree. I will create a separate issue after merging this one.
-------------
PR: https://git.openjdk.org/jdk/pull/10942
More information about the client-libs-dev
mailing list