Browse Source

Br 42377, java, failonerror = false, timeout (or other exception) should have nonzero result value. (error value chosen in-line with the Exec task).

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@552208 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 18 years ago
parent
commit
7259f731ec
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      WHATSNEW
  2. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/Java.java

+ 3
- 0
WHATSNEW View File

@@ -16,6 +16,9 @@ Changes that could break older environments:

* <scriptcondition> now prefers evaluation result/return value over value property.

* <java> with fork now returns gives -1 instead of 0 as result when failonerror
is false and some exception (including timeout) occurs. Br 42377.

Fixed bugs:
-----------
* Regression: Locator fails with URI encoding problem when spaces in path


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/Java.java View File

@@ -228,7 +228,7 @@ public class Java extends Task {
throw e;
} else {
log(e);
return 0;
return -1;
}
} catch (ThreadDeath t) {
throw t; // cf. NB #47191
@@ -237,7 +237,7 @@ public class Java extends Task {
throw new BuildException(t, getLocation());
} else {
log(t);
return 0;
return -1;
}
}
}


Loading…
Cancel
Save