You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/01/18 09:19:19 UTC

[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2679: Properly stop Maven execution from LSP/DAP

JaroslavTulach commented on a change in pull request #2679:
URL: https://github.com/apache/netbeans/pull/2679#discussion_r559414067



##########
File path: platform/openide.execution/src/org/openide/execution/ExecutionEngine.java
##########
@@ -143,12 +151,14 @@ public InputOutput getInputOutput() {
             }
             
             public void run() {
-                try {
-                    super.run();
-                } catch (RuntimeException x) {
-                    x.printStackTrace();
-                    resultValue = 1;
-                }
+                Lookups.executeWith(originalLookup, () -> {

Review comment:
       Unit test this, please.

##########
File path: platform/core.execution/src/org/netbeans/core/execution/RunClassThread.java
##########
@@ -65,14 +68,20 @@ public RunClassThread(TaskThreadGroup base,
         this.engine = engine;
         this.task = task;
         this.run = run;
+        this.originalLookup = originalLookup;
         // #33789 - this thread must not be daemon otherwise it is immediately destroyed
         setDaemon(false);
         this.start();
     }
 
     /** runs the thread
     */
+    @Override
     public void run() {
+        Lookups.executeWith(originalLookup, this::doRun);

Review comment:
       Unit test this, please.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists