You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2005/09/29 21:27:26 UTC
svn commit: r292520 -
/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Checksum.java
Author: mbenson
Date: Thu Sep 29 12:27:22 2005
New Revision: 292520
URL: http://svn.apache.org/viewcvs?rev=292520&view=rev
Log:
(judiciously) use FileUtils.close()
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Checksum.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Checksum.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Checksum.java?rev=292520&r1=292519&r2=292520&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Checksum.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Checksum.java Thu Sep 29 12:27:22 2005
@@ -42,6 +42,7 @@
import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.StringUtils;
/**
@@ -543,20 +544,8 @@
} catch (Exception e) {
throw new BuildException(e, getLocation());
} finally {
- if (fis != null) {
- try {
- fis.close();
- } catch (IOException e) {
- // ignore
- }
- }
- if (fos != null) {
- try {
- fos.close();
- } catch (IOException e) {
- // ignore
- }
- }
+ FileUtils.close(fis);
+ FileUtils.close(fos);
}
return checksumMatches;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org