You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by an...@apache.org on 2004/07/17 17:10:11 UTC

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs AbstractCvsTask.java

antoine     2004/07/17 08:10:11

  Modified:    .        WHATSNEW CONTRIBUTORS
               src/main/org/apache/tools/ant/taskdefs AbstractCvsTask.java
  Log:
  Prevent AbstractCvsTask from closing its output and error streams
  prematurely
  PR: 30097
  Submitted by: Will Wang (telerice at yahoo dot com)
  
  Revision  Changes    Path
  1.638     +16 -1     ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.637
  retrieving revision 1.638
  diff -u -r1.637 -r1.638
  --- WHATSNEW	15 Jul 2004 16:43:13 -0000	1.637
  +++ WHATSNEW	17 Jul 2004 15:10:10 -0000	1.638
  @@ -28,8 +28,23 @@
     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:
   --------------------------------------------
  
  
  
  1.27      +1 -0      ant/CONTRIBUTORS
  
  Index: CONTRIBUTORS
  ===================================================================
  RCS file: /home/cvs/ant/CONTRIBUTORS,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- CONTRIBUTORS	2 Jul 2004 07:23:53 -0000	1.26
  +++ CONTRIBUTORS	17 Jul 2004 15:10:11 -0000	1.27
  @@ -196,6 +196,7 @@
   Tom Dimock
   Tom Eugelink
   Ulrich Schmidt
  +Will Wang
   William Ferguson
   Wolfgang Werner
   Wolf Siberski
  
  
  
  1.35      +15 -15    ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
  
  Index: AbstractCvsTask.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- AbstractCvsTask.java	14 Apr 2004 15:42:06 -0000	1.34
  +++ AbstractCvsTask.java	17 Jul 2004 15:10:11 -0000	1.35
  @@ -365,21 +365,6 @@
               } 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 @@
                   removeCommandline(cloned);
               }
               setCommand(savedCommand);
  +
  +            if (outputStream != null) {
  +                try {
  +                    outputStream.close();
  +                } catch (IOException e) {
  +                    //ignore
  +                }
  +            }
  +            if (errorStream != null) {
  +                try {
  +                    errorStream.close();
  +                } catch (IOException e) {
  +                    //ignore
  +                }
  +            }
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org