Browse Source

Prevent AbstractCvsTask from closing its output and error streams

prematurely
PR: 30097
Submitted by: Will Wang (telerice at yahoo dot com)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276705 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 21 years ago
parent
commit
236873d6eb
3 changed files with 32 additions and 16 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +16
    -1
      WHATSNEW
  3. +15
    -15
      src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java

+ 1
- 0
CONTRIBUTORS View File

@@ -196,6 +196,7 @@ Tim Stephenson
Tom Dimock Tom Dimock
Tom Eugelink Tom Eugelink
Ulrich Schmidt Ulrich Schmidt
Will Wang
William Ferguson William Ferguson
Wolfgang Werner Wolfgang Werner
Wolf Siberski Wolf Siberski


+ 16
- 1
WHATSNEW View File

@@ -28,12 +28,27 @@ Other changes:
specification of multiple sub-build targets, which are executed specification of multiple sub-build targets, which are executed
with a single dependency analysis. 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: 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 * The import task used the canonical version of a file path. This
has been changed to use the absolute path. Bugzilla 28505. has been changed to use the absolute path. Bugzilla 28505.




+ 15
- 15
src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java View File

@@ -365,21 +365,6 @@ public abstract class AbstractCvsTask extends Task {
} else { } else {
log("Caught exception: " + e.getMessage(), Project.MSG_WARN); 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); removeCommandline(cloned);
} }
setCommand(savedCommand); setCommand(savedCommand);

if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
//ignore
}
}
if (errorStream != null) {
try {
errorStream.close();
} catch (IOException e) {
//ignore
}
}
} }
} }




Loading…
Cancel
Save