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 ff73496a Use try-with-resources
ff73496a is described below

commit ff73496a80bcf000341da493541fc954a3504531
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Thu Mar 13 11:16:32 2025 -0400

    Use try-with-resources
---
 src/test/java/org/apache/commons/csv/CSVParserTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/csv/CSVParserTest.java 
b/src/test/java/org/apache/commons/csv/CSVParserTest.java
index e4fdb5d4..7b5b0c4f 100644
--- a/src/test/java/org/apache/commons/csv/CSVParserTest.java
+++ b/src/test/java/org/apache/commons/csv/CSVParserTest.java
@@ -794,8 +794,9 @@ public class CSVParserTest {
     public void testGetOneLineOneParser() throws IOException {
         final CSVFormat format = CSVFormat.DEFAULT;
         try (PipedWriter writer = new PipedWriter();
+                PipedReader origin = new PipedReader(writer);
                 CSVParser parser = CSVParser.builder()
-                        .setReader(new PipedReader(writer))
+                        .setReader(origin)
                         .setFormat(format)
                         .get()) {
             writer.append(CSV_INPUT_1);

Reply via email to