Skip to content

Commit

Permalink
8307091: A few client tests intermittently throw ConcurrentModificati…
Browse files Browse the repository at this point in the history
…onException

Backport-of: 465bdd9e416cacc6cc7dd91a29cc84adf2eaf1ed
  • Loading branch information
TheRealMDoerr committed Jun 7, 2024
1 parent ce19e61 commit 43a6746
Showing 1 changed file with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,15 @@ public DoChangeContents call() {
break;
}
}
if (start >= 0 && end > start
&& newFileCache.subList(end, newSize).equals(fileCache.subList(start, oldSize))) {
if (loadThread.isInterrupted()) {
return null;

if (start >= 0 && end > start) {
List<File> listStart_OldSize = new Vector<>(fileCache.subList(start, oldSize));
if (newFileCache.subList(end, newSize).equals(listStart_OldSize)) {
if (loadThread.isInterrupted()) {
return null;
}
return new DoChangeContents(newFileCache.subList(start, end), start, null, 0, fid);
}
return new DoChangeContents(newFileCache.subList(start, end), start, null, 0, fid);
}
} else if (newSize < oldSize) {
//see if interval is removed
Expand All @@ -378,12 +381,15 @@ public DoChangeContents call() {
break;
}
}
if (start >= 0 && end > start
&& fileCache.subList(end, oldSize).equals(newFileCache.subList(start, newSize))) {
if (loadThread.isInterrupted()) {
return null;

if (start >= 0 && end > start) {
List<File> listEnd_OldSize = new Vector<>(fileCache.subList(end, oldSize));
if (listEnd_OldSize.equals(newFileCache.subList(start, newSize))) {
if (loadThread.isInterrupted()) {
return null;
}
return new DoChangeContents(null, 0, new Vector<>(fileCache.subList(start, end)), start, fid);
}
return new DoChangeContents(null, 0, new Vector<>(fileCache.subList(start, end)), start, fid);
}
}
if (!fileCache.equals(newFileCache)) {
Expand Down

1 comment on commit 43a6746

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.