diff --git a/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/api/TestMethodController.java b/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/api/TestMethodController.java index aa8b742a6e3a..85e064ee7d4d 100644 --- a/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/api/TestMethodController.java +++ b/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/api/TestMethodController.java @@ -62,12 +62,10 @@ private static void setTestMethodsImpl(StyledDocument doc, List meth doc.putProperty(TestMethodAnnotation.DOCUMENT_ANNOTATION_LINES_KEY, annotationLines); } - Map removed = new HashMap<>(annotations); - - methods.forEach(tm -> removed.remove(tm)); - Set added = new HashSet<>(methods); + Map removed = new HashMap<>(annotations); + removed.keySet().removeAll(added); added.removeAll(annotations.keySet()); for (TestMethod method : added) {