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:
[email protected]



---------------------------------------------------------------------
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

Reply via email to