You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/07/17 14:51:50 UTC
svn commit: r677571 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
Author: bodewig
Date: Thu Jul 17 05:51:49 2008
New Revision: 677571
URL: http://svn.apache.org/viewvc?rev=677571&view=rev
Log:
Swallow stacktrace of timeout exception. PR 32853.
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java?rev=677571&r1=677570&r2=677571&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java Thu Jul 17 05:51:49 2008
@@ -76,6 +76,9 @@
private boolean spawn = false;
private boolean incompatibleWithSpawn = false;
+ private static final String TIMEOUT_MESSAGE =
+ "Timeout: killed the sub-process";
+
/**
* Normal constructor
*/
@@ -228,7 +231,11 @@
if (failOnError) {
throw e;
} else {
- log(e);
+ if (TIMEOUT_MESSAGE.equals(e.getMessage())) {
+ log(TIMEOUT_MESSAGE);
+ } else {
+ log(e);
+ }
return -1;
}
} catch (ThreadDeath t) {
@@ -764,7 +771,7 @@
exe.execute(getProject());
redirector.complete();
if (exe.killedProcess()) {
- throw new BuildException("Timeout: killed the sub-process");
+ throw new BuildException(TIMEOUT_MESSAGE);
}
} catch (IOException e) {
throw new BuildException(e);
@@ -784,7 +791,7 @@
int rc = exe.execute();
redirector.complete();
if (exe.killedProcess()) {
- throw new BuildException("Timeout: killed the sub-process");
+ throw new BuildException(TIMEOUT_MESSAGE);
}
return rc;
} catch (IOException e) {