Skip to content

Commit

Permalink
Fix ConcurrentModificationException in TestMethodController
Browse files Browse the repository at this point in the history
  • Loading branch information
lkishalmi committed Nov 13, 2023
1 parent 7f6f105 commit 9316fb5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,10 @@ private static void setTestMethodsImpl(StyledDocument doc, List<TestMethod> meth
doc.putProperty(TestMethodAnnotation.DOCUMENT_ANNOTATION_LINES_KEY, annotationLines);
}

Map<TestMethod, TestMethodAnnotation> removed = new HashMap<>(annotations);

methods.forEach(tm -> removed.remove(tm));

Set<TestMethod> added = new HashSet<>(methods);
Map<TestMethod, TestMethodAnnotation> removed = new HashMap<>(annotations);

removed.keySet().removeAll(added);
added.removeAll(annotations.keySet());

for (TestMethod method : added) {
Expand Down

0 comments on commit 9316fb5

Please sign in to comment.