Skip to content

Commit 3daeb02

Browse files
committed
Since DEFAULT is supposed to be RFC4180 + ignore blank lines: make it so
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1399048 13f79535-47bb-0310-9956-ffa450edef68
1 parent e04a86a commit 3daeb02

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,31 @@ public class CSVFormat implements Serializable {
6464
private static final CSVFormat PRISTINE = new CSVFormat(DISABLED, null, null, null, null, false, false, null, null);
6565

6666
/**
67-
* Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.
67+
* Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>.
6868
* <ul>
6969
* <li>withDelimiter(',')</li>
7070
* <li>withQuoteChar('"')</li>
71-
* <li>withEmptyLinesIgnored(true)</li>
7271
* <li>withLineSeparator(CRLF)</li>
7372
* </ul>
7473
*/
75-
public static final CSVFormat DEFAULT =
74+
public static final CSVFormat RFC4180 =
7675
PRISTINE
7776
.withDelimiter(COMMA)
7877
.withQuoteChar(DOUBLE_QUOTE)
79-
.withIgnoreEmptyLines(true)
8078
.withRecordSeparator(CRLF);
8179

8280
/**
83-
* Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>.
81+
* Standard comma separated format, as for {@link #RFC4180} but allowing blank lines.
8482
* <ul>
8583
* <li>withDelimiter(',')</li>
8684
* <li>withQuoteChar('"')</li>
85+
* <li>withEmptyLinesIgnored(true)</li>
8786
* <li>withLineSeparator(CRLF)</li>
8887
* </ul>
8988
*/
90-
public static final CSVFormat RFC4180 =
91-
PRISTINE
92-
.withDelimiter(COMMA)
93-
.withQuoteChar(DOUBLE_QUOTE)
94-
.withRecordSeparator(CRLF);
89+
public static final CSVFormat DEFAULT = // TODO rename to something more meaningful
90+
RFC4180
91+
.withIgnoreEmptyLines(true);
9592

9693
/**
9794
* Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is

0 commit comments

Comments
 (0)