Skip to content
Snippets Groups Projects
Commit b759c8a7 authored by Jürgen Walter's avatar Jürgen Walter
Browse files

fix writing SLA report to file

close writer
parent c7001db2
No related branches found
No related tags found
No related merge requests found
......@@ -143,12 +143,23 @@ public class SLAReporter {
}
private void writeToFile(String file, String content) {
BufferedWriter writer = null;
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(file));
bw.write(content);
writer = new BufferedWriter(new FileWriter(file));
writer.write(content);
System.out.println("-------------------");
System.out.println(content);
System.out.println("-------------------");
System.out.println("Done");
} catch (IOException e) {
log.error(e);
} finally {
try {
if (writer != null)
writer.close();
} catch (IOException e) {
log.error(e);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment