Browse Source

(judiciously) use FileUtils.close()

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@292520 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
b27c382fec
1 changed files with 3 additions and 14 deletions
  1. +3
    -14
      src/main/org/apache/tools/ant/taskdefs/Checksum.java

+ 3
- 14
src/main/org/apache/tools/ant/taskdefs/Checksum.java View File

@@ -42,6 +42,7 @@ import org.apache.tools.ant.Project;
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 @@ public class Checksum extends MatchingTask implements Condition {
} 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;
}


Loading…
Cancel
Save