Index: core/src/org/netbeans/core/TopThreadGroup.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/TopThreadGroup.java,v --- core/src/org/netbeans/core/TopThreadGroup.java 13 Jun 2000 00:52:02 -0000 1.12 +++ core/src/org/netbeans/core/TopThreadGroup.java 26 Nov 2001 16:07:44 -0000 @@ -55,36 +55,33 @@ super(parent, name); } - /** The method that gets called when an uncaught exception occurs. - * It notifies the user via the standard IDE's exception notification - * system. - * @param t The Thread in which the exception occured - * @param e The exception - */ public void uncaughtException(Thread t, Throwable e) { - if (!(e instanceof ThreadDeath)) { - // System.err.println("UncaughtException:"); - // e.printStackTrace(); - // if (e instanceof org.netbeans.core.execution.ExitSecurityException) return; + if (!(e instanceof ThreadDeath) + // XXX(-ttran) in Sun JDK 1.3.1_01 Linux (at least) there is a bug + // which can cause this exception to be thrown from a helper + // AWT-Selection thread + && !(e instanceof IllegalMonitorStateException && + "AWT-Selection".equals(t.getName())) // NOI18N + ) { System.err.flush(); TopManager tm = TopManager.getDefault(); if (tm != null) { tm.notifyException(e); } else { - if (System.getProperty ("netbeans.debug.exceptions") != null) e.printStackTrace(); + if (System.getProperty ("netbeans.debug.exceptions") != null) + e.printStackTrace(); } } - else super.uncaughtException(t, e); + else { + super.uncaughtException(t, e); + } } - /** Starts the execution - */ public void start () { Thread t = new Thread (this, this, "main"); // NOI18N t.start (); } - /** Starts the thread */ public void run() { try { Main.main(args); @@ -93,23 +90,3 @@ } } } - -/* - * Log - * 8 Jaga 1.6.1.0 4/10/00 Ales Novak #6120 - * 7 Gandalf 1.6 1/20/00 Petr Hamernik rolled back - * 6 Gandalf 1.5 1/19/00 Petr Nejedly Commented out debug - * messages - * 5 Gandalf 1.4 1/13/00 Jaroslav Tulach I18N - * 4 Gandalf 1.3 10/22/99 Ian Formanek NO SEMANTIC CHANGE - Sun - * Microsystems Copyright in File Comment - * 3 Gandalf 1.2 7/24/99 Ian Formanek Printing stack trace on - * netbeans.debug.exceptions property only - * 2 Gandalf 1.1 6/8/99 Ian Formanek ---- Package Change To - * org.openide ---- - * 1 Gandalf 1.0 1/5/99 Ian Formanek - * $ - * Beta Change History: - * 0 Tuborg 0.12 --/--/98 Jan Formanek ThreadDeath is passed to the super in uncaughtException - * 0 Tuborg 0.13 --/--/98 Ales Novak ExitSecurityException is passed by - */ Index: openide/src/org/openide/execution/ProcessExecutor.java =================================================================== RCS file: /cvs/openide/src/org/openide/execution/ProcessExecutor.java,v --- openide/src/org/openide/execution/ProcessExecutor.java 13 Nov 2001 16:33:43 -0000 1.62 +++ openide/src/org/openide/execution/ProcessExecutor.java 26 Nov 2001 16:07:45 -0000 @@ -224,7 +224,7 @@ * exec info and asks the current executor to start with that * format. *

- * Subclasses can override this to achive the right behaviour, add + * Subclasses can override this to achieve the right behaviour, add * system properties, own format, etc. * * @param info exec info @@ -399,9 +399,9 @@ * by execution engine finishes. */ public void taskFinished(Task t) { - if (fromMe != null) { - fromMe.stop(); - } + if (fromMe != null) { + fromMe.stop(); + } } } @@ -579,11 +579,11 @@ try { int ret = proc.waitFor(); Thread.sleep(2000); // time for copymakers - stop(); return ret; } catch (InterruptedException e) { return 1; // 0 is success } finally { + stop(); notifyFinished(); } } @@ -594,5 +594,5 @@ public void run() { } - } // end of ExternalProcess + } }