Skip to content

Commit 676a580

Browse files
committed
Call flush instead of duplicating the logic
1 parent 47dbc8f commit 676a580

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/main/java/org/apache/commons/csv/CSVPrinter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ public void close() throws IOException {
9494
*/
9595
public void close(final boolean flush) throws IOException {
9696
if (flush || format.getAutoFlush()) {
97-
if (out instanceof Flushable) {
98-
((Flushable) out).flush();
99-
}
97+
flush();
10098
}
10199
if (out instanceof Closeable) {
102100
((Closeable) out).close();

0 commit comments

Comments
 (0)