Browse Source

If SQLExec reads the statements from a file this file is now propertly

closed after execution.

Submitted By: "Nico Seessle" <Nico.Seessle@epost.de>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268492 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
6c9755c318
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/SQLExec.java

+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/SQLExec.java View File

@@ -610,7 +610,9 @@ public class SQLExec extends Task {
if (tSrcFile != null) {
log("Executing file: " + tSrcFile.getAbsolutePath(),
Project.MSG_INFO);
runStatements(new FileReader(tSrcFile), out);
FileReader reader = new FileReader(tSrcFile);
runStatements(reader, out);
reader.close();
}
}
}


Loading…
Cancel
Save