Browse Source

#32941: do not try to catch ThreadDeath when <java fork="false"> is halted.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278075 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 20 years ago
parent
commit
5aeca1e0e3
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java

+ 4
- 0
src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java View File

@@ -146,6 +146,7 @@ public class ExecuteJava implements Runnable, TimeoutObserver {
thread = new Thread(this, "ExecuteJava"); thread = new Thread(this, "ExecuteJava");
Task currentThreadTask Task currentThreadTask
= project.getThreadTask(Thread.currentThread()); = project.getThreadTask(Thread.currentThread());
// XXX is the following really necessary? it is in the same thread group...
project.registerThreadTask(thread, currentThreadTask); project.registerThreadTask(thread, currentThreadTask);
// if we run into a timeout, the run-away thread shall not // if we run into a timeout, the run-away thread shall not
// make the VM run forever - if no timeout occurs, Ant's // make the VM run forever - if no timeout occurs, Ant's
@@ -180,6 +181,9 @@ public class ExecuteJava implements Runnable, TimeoutObserver {
+ " classpath"); + " classpath");
} catch (SecurityException e) { } catch (SecurityException e) {
throw e; throw e;
} catch (ThreadDeath e) {
// XXX could perhaps also call thread.stop(); not sure if anyone cares
throw e;
} catch (Throwable e) { } catch (Throwable e) {
throw new BuildException(e); throw new BuildException(e);
} finally { } finally {


Loading…
Cancel
Save