On Thu, 4 May 2023 04:57:11 GMT, Tejesh R <[email protected]> wrote:
>> Few test are throwing Concurrent Modification Exception Intermittently.
>> Since the issue is intermittent and from the log and code review, It is
>> found that the shared variable `fileCache` is used in comparison with the
>> `newFileCache` where the comparison invokes the iterator method in
>> AbstractList class. Since based on vector documentation it was evident that
>> listIterator are fail-fast iterators and hence it would be better to make a
>> separate local copy of vectors for comparing operations.
>> The same is implemented and tested in CI system which shows green.
>
> Tejesh R has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Updated based on review comments
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 ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13783#discussion_r1185358653