RFR: 8307091: A few client tests intermittently throw ConcurrentModificationException [v2]

Phil Race prr at openjdk.org
Fri May 5 17:41:28 UTC 2023


On Fri, 5 May 2023 05:25:55 GMT, Tejesh R <tr at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java line 365:
>> 
>>> 363: 
>>> 364:                         if (start >= 0 && end > start) {
>>> 365:                             List<File> listStart_OldSize = new Vector<>(fileCache.subList(start, oldSize));
>> 
>> Why Vector was used instead of ArrayList ?
>
> Nothing specific reason why I choose vector apart from the main object is of Vector type and since in this context (where both the objects are not shared) both Vector/Arraylist comparison remains same. Does Arraylist comparison has any advantage here?

I already looked at this and Vector is what this class uses already and there's no reason to be different and definitely no reason to change the rest.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13783#discussion_r1186348473



More information about the client-libs-dev mailing list