Browse Source

Use close method to close streams, Submitted by Kevin Jackson

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277207 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
0a03dc4b5d
1 changed files with 5 additions and 17 deletions
  1. +5
    -17
      src/main/org/apache/tools/ant/util/FileUtils.java

+ 5
- 17
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -614,9 +614,9 @@ public class FileUtils {
}
out.write(buffer, 0, nRead);
}
} finally {
close(out);
close(in);
} finally {
close(out);
close(in);
}
} else {
FileInputStream in = null;
@@ -1012,20 +1012,8 @@ public class FileUtils {
}
return true;
} finally {
if (in1 != null) {
try {
in1.close();
} catch (IOException e) {
// ignore
}
}
if (in2 != null) {
try {
in2.close();
} catch (IOException e) {
// ignore
}
}
close(in1);
close(in2);
}
}



Loading…
Cancel
Save