diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 268a994a1..d11f5d21a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -196,6 +196,7 @@ Tim Stephenson Tom Dimock Tom Eugelink Ulrich Schmidt +Will Wang William Ferguson Wolfgang Werner Wolf Siberski diff --git a/WHATSNEW b/WHATSNEW index c0324ed87..21ed616f6 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -28,12 +28,27 @@ Other changes: specification of multiple sub-build targets, which are executed with a single dependency analysis. -Changes from Ant 1.6.1 to current Ant 1.6 CVS version +Changes from Ant 1.6.2 to current Ant 1.6 CVS version ===================================================== Changes that could break older environments: -------------------------------------------- +Other changes: +-------------- + +Fixed bugs: +----------- + +* AbstractCvsTask prematurely closed its outputStream and errorStream. + Bugzilla 30097. + +Changes from Ant 1.6.1 to Ant 1.6.2 +=================================== + +Changes that could break older environments: +-------------------------------------------- + * The import task used the canonical version of a file path. This has been changed to use the absolute path. Bugzilla 28505. diff --git a/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java b/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java index 278274bd9..532a8eef2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java @@ -365,21 +365,6 @@ public abstract class AbstractCvsTask extends Task { } else { log("Caught exception: " + e.getMessage(), Project.MSG_WARN); } - } finally { - if (outputStream != null) { - try { - outputStream.close(); - } catch (IOException e) { - //ignore - } - } - if (errorStream != null) { - try { - errorStream.close(); - } catch (IOException e) { - //ignore - } - } } } @@ -413,6 +398,21 @@ public abstract class AbstractCvsTask extends Task { removeCommandline(cloned); } setCommand(savedCommand); + + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + //ignore + } + } + if (errorStream != null) { + try { + errorStream.close(); + } catch (IOException e) { + //ignore + } + } } }