On Fri, 5 May 2023 05:25:55 GMT, Tejesh R <t...@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