Skip to content

Commit

Permalink
Fix created buffered writer not flushing
Browse files Browse the repository at this point in the history
Fixes CadixDev#6.
  • Loading branch information
Juuxel committed Dec 15, 2023
1 parent b4fa7f4 commit d4ac59b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ public void write(Writer writer, AccessTransformSet set) throws IOException {
if (writer instanceof BufferedWriter) {
write((BufferedWriter) writer, set);
} else {
write(new BufferedWriter(writer), set);
BufferedWriter buffered = new BufferedWriter(writer);

try {
write(buffered, set);
} finally {
buffered.flush();
}
}
}

Expand Down

0 comments on commit d4ac59b

Please sign in to comment.