Skip to content

Commit

Permalink
FileUtils.close
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@416181 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
steveloughran committed Jun 22, 2006
1 parent 38e3185 commit bccb3a9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/org/apache/tools/ant/util/ScriptRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ public void setSrc(File file) {

int count = (int) file.length();
byte[] data = new byte[count];

FileInputStream inStream = null;
try {
FileInputStream inStream = new FileInputStream(file);
inStream = new FileInputStream(file);
inStream.read(data);
inStream.close();
} catch (IOException e) {
throw new BuildException(e);
} finally {
FileUtils.close(inStream);
}

script += new String(data);
Expand Down

0 comments on commit bccb3a9

Please sign in to comment.