commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1399048 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
Date Wed, 17 Oct 2012 00:06:10 GMT
Author: sebb
Date: Wed Oct 17 00:06:10 2012
New Revision: 1399048

URL: http://svn.apache.org/viewvc?rev=1399048&view=rev
Log:
Since DEFAULT is supposed to be RFC4180 + ignore blank lines: make it so

Modified:
    commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java

Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java?rev=1399048&r1=1399047&r2=1399048&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java (original)
+++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java Wed Oct 17
00:06:10 2012
@@ -64,34 +64,31 @@ public class CSVFormat implements Serial
     private static final CSVFormat PRISTINE = new CSVFormat(DISABLED, null, null, null, null,
false, false, null, null);
 
     /**
-     * Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.
+     * Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC
4180</a>.
      * <ul>
      * <li>withDelimiter(',')</li>
      * <li>withQuoteChar('"')</li>
-     * <li>withEmptyLinesIgnored(true)</li>
      * <li>withLineSeparator(CRLF)</li>
      * </ul>
      */
-    public static final CSVFormat DEFAULT =
+    public static final CSVFormat RFC4180 =
             PRISTINE
             .withDelimiter(COMMA)
             .withQuoteChar(DOUBLE_QUOTE)
-            .withIgnoreEmptyLines(true)
             .withRecordSeparator(CRLF);
 
     /**
-     * Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC
4180</a>.
+     * Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.
      * <ul>
      * <li>withDelimiter(',')</li>
      * <li>withQuoteChar('"')</li>
+     * <li>withEmptyLinesIgnored(true)</li>
      * <li>withLineSeparator(CRLF)</li>
      * </ul>
      */
-    public static final CSVFormat RFC4180 =
-            PRISTINE
-            .withDelimiter(COMMA)
-            .withQuoteChar(DOUBLE_QUOTE)
-            .withRecordSeparator(CRLF);
+    public static final CSVFormat DEFAULT = // TODO rename to something more meaningful
+            RFC4180
+            .withIgnoreEmptyLines(true);
 
     /**
      * Excel file format (using a comma as the value delimiter). Note that the actual value
delimiter used by Excel is



Mime
View raw message