ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r368015 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
Date Wed, 11 Jan 2006 12:04:09 GMT
Author: stevel
Date: Wed Jan 11 04:04:05 2006
New Revision: 368015

URL: http://svn.apache.org/viewcvs?rev=368015&view=rev
Log:
use FileUtils

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java?rev=368015&r1=368014&r2=368015&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java Wed Jan 11
04:04:05 2006
@@ -30,6 +30,7 @@
 import org.apache.tools.ant.types.Commandline;
 import org.apache.tools.ant.types.Environment;
 import org.apache.tools.ant.util.StringUtils;
+import org.apache.tools.ant.util.FileUtils;
 
 /**
  * original Cvs.java 1.20
@@ -397,21 +398,8 @@
                 removeCommandline(cloned);
             }
             setCommand(savedCommand);
-
-            if (outputStream != null) {
-                try {
-                    outputStream.close();
-                } catch (IOException e) {
-                    //ignore
-                }
-            }
-            if (errorStream != null) {
-                try {
-                    errorStream.close();
-                } catch (IOException e) {
-                    //ignore
-                }
-            }
+            FileUtils.close(outputStream);
+            FileUtils.close(errorStream);
         }
     }
 



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


Mime
View raw message