commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1623985 - /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Date Wed, 10 Sep 2014 12:49:53 GMT
Author: ggregory
Date: Wed Sep 10 12:49:53 2014
New Revision: 1623985

URL: http://svn.apache.org/r1623985
Log:
[CSV-130] CSVFormat#withHeader doesn't work well with #printComment, add withHeaderComments(String...).
Adjust test for style.

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java?rev=1623985&r1=1623984&r2=1623985&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/CSVPrinterTest.java Wed
Sep 10 12:49:53 2014
@@ -517,9 +517,9 @@ public class CSVPrinterTest {
         csvPrinter.close();
     }
 
-    private CSVPrinter printWithHeaderComments(final StringWriter sw, Date now, CSVFormat
format)
+    private CSVPrinter printWithHeaderComments(final StringWriter sw, Date now, CSVFormat
baseFormat)
             throws IOException {
-        format = format.withCommentMarker('#').withHeader("Col1", "Col2");
+        CSVFormat format = baseFormat.withCommentMarker('#').withHeader("Col1", "Col2");
         format = format.withHeaderComments("Generated by Apache Commons CSV 1.1", now);
         final CSVPrinter csvPrinter = format.print(sw);
         csvPrinter.printRecord("A", "B");



Mime
View raw message