ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r720917 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
Date Wed, 26 Nov 2008 16:59:48 GMT
Author: bodewig
Date: Wed Nov 26 08:59:47 2008
New Revision: 720917

URL: http://svn.apache.org/viewvc?rev=720917&view=rev
Log:
Use FileUtils.close

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java?rev=720917&r1=720916&r2=720917&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java Wed Nov
26 08:59:47 2008
@@ -193,20 +193,8 @@
             // make sure to close all handles, otherwise the garbage
             // collector will close them...whenever possible and
             // Windows may complain about not being able to delete files.
-            try {
-                if (fis != null) {
-                    fis.close();
-                }
-            } catch (IOException ignored) {
-                // ignore
-            }
-            try {
-                if (fos != null) {
-                    fos.close();
-                }
-            } catch (IOException ignored) {
-                // ignore
-            }
+            FileUtils.close(fis);
+            FileUtils.close(fos);
         }
     }
 



Mime
View raw message