This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git


The following commit(s) were added to refs/heads/master by this push:
     new d65785f5 [CSV-318] CSVPrinter.printRecord(Stream) hangs if given a 
parallel stream
d65785f5 is described below

commit d65785f52078a96c9cd5fd9bcf9b6b83511e25aa
Author: Gary Gregory <[email protected]>
AuthorDate: Tue May 6 17:46:17 2025 -0400

    [CSV-318] CSVPrinter.printRecord(Stream) hangs if given a parallel
    stream
---
 src/main/java/org/apache/commons/csv/CSVPrinter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/csv/CSVPrinter.java 
b/src/main/java/org/apache/commons/csv/CSVPrinter.java
index 80cab060..a55faae2 100644
--- a/src/main/java/org/apache/commons/csv/CSVPrinter.java
+++ b/src/main/java/org/apache/commons/csv/CSVPrinter.java
@@ -88,8 +88,8 @@ public final class CSVPrinter implements Flushable, Closeable 
{
     private boolean newRecord = true;
 
     private long recordCount;
-    
-    private ReentrantLock lock = new ReentrantLock();
+
+    private final ReentrantLock lock = new ReentrantLock();
 
     /**
      * Creates a printer that will print values to the given stream following 
the CSVFormat.

Reply via email to