Skip to content

Commit d65785f

Browse files
committed
[CSV-318] CSVPrinter.printRecord(Stream) hangs if given a parallel
stream
1 parent 410175c commit d65785f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public final class CSVPrinter implements Flushable, Closeable {
8888
private boolean newRecord = true;
8989

9090
private long recordCount;
91-
92-
private ReentrantLock lock = new ReentrantLock();
91+
92+
private final ReentrantLock lock = new ReentrantLock();
9393

9494
/**
9595
* Creates a printer that will print values to the given stream following the CSVFormat.

0 commit comments

Comments
 (0)