This is an automated email from the ASF dual-hosted git repository.
neilcsmith pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/delivery by this push:
new 93a9e2f [NETBEANS-5740] Not taking write lock inside the parsing lock.
new 55c0402 Merge pull request #3108 from jlahoda/NETBEANS-5740
93a9e2f is described below
commit 93a9e2f55c20dfb2be76caa1a1d8b16a51b077d6
Author: Jan Lahoda <[email protected]>
AuthorDate: Tue Aug 17 07:35:19 2021 +0200
[NETBEANS-5740] Not taking write lock inside the parsing lock.
---
.../netbeans/modules/java/testrunner/ui/ComputeTestMethodsImpl.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/java/java.testrunner.ui/src/org/netbeans/modules/java/testrunner/ui/ComputeTestMethodsImpl.java
b/java/java.testrunner.ui/src/org/netbeans/modules/java/testrunner/ui/ComputeTestMethodsImpl.java
index 4b2bd43..6236049 100644
---
a/java/java.testrunner.ui/src/org/netbeans/modules/java/testrunner/ui/ComputeTestMethodsImpl.java
+++
b/java/java.testrunner.ui/src/org/netbeans/modules/java/testrunner/ui/ComputeTestMethodsImpl.java
@@ -36,6 +36,7 @@ import
org.netbeans.modules.java.testrunner.ui.spi.ComputeTestMethods.Factory;
import org.netbeans.modules.parsing.spi.TaskIndexingMode;
import org.openide.filesystems.FileObject;
import org.openide.util.Lookup;
+import org.openide.util.RequestProcessor;
import org.openide.util.lookup.ServiceProvider;
/**
@@ -45,6 +46,8 @@ import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service=JavaSourceTaskFactory.class)
public class ComputeTestMethodsImpl extends EditorAwareJavaSourceTaskFactory {
+ private static final RequestProcessor WORKER = new
RequestProcessor(ComputeTestMethodsImpl.class.getName(), 1, false, false);
+
public ComputeTestMethodsImpl() {
super(Phase.ELEMENTS_RESOLVED, Priority.NORMAL,
TaskIndexingMode.ALLOWED_DURING_SCAN);
}
@@ -100,7 +103,7 @@ public class ComputeTestMethodsImpl extends
EditorAwareJavaSourceTaskFactory {
}
if (!cancel.get()) {
- TestMethodController.setTestMethods(doc, methods);
+ WORKER.post(() -> TestMethodController.setTestMethods(doc,
methods));
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists