diff --git a/WHATSNEW b/WHATSNEW index 463c10002..35144992d 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -16,6 +16,9 @@ Changes that could break older environments: * now prefers evaluation result/return value over value property. +* 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 diff --git a/src/main/org/apache/tools/ant/taskdefs/Java.java b/src/main/org/apache/tools/ant/taskdefs/Java.java index 2dfa82988..ff6d1501e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Java.java +++ b/src/main/org/apache/tools/ant/taskdefs/Java.java @@ -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; } } }