Skip to content

Commit c81ad03

Browse files
committed
[CSV-128] CSVFormat.EXCEL should ignore empty header names
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1620902 13f79535-47bb-0310-9956-ffa450edef68
1 parent bc50411 commit c81ad03

3 files changed

Lines changed: 120 additions & 179 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
<title>Release Notes</title>
3939
</properties>
4040
<body>
41-
41+
<release version="1.1" date="2014-mm-dd" description="Feature and bug fix release">
42+
<action issue="CSV-128" type="fix" dev="britter">CSVFormat.EXCEL should ignore empty header names</action>
43+
</release>
4244
<release version="1.0" date="2014-08-14" description="First release">
4345
<action issue="CSV-125" type="fix" dev="britter">No longer works with Java 6</action>
4446
<action issue="CSV-122" type="fix" dev="britter" due-to="Mike Lewis">NullPointerException when empty header string and and null string of ""</action>

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,17 @@ public final class CSVFormat implements Serializable {
206206
* Settings are:
207207
* </p>
208208
* <ul>
209-
* <li>withDelimiter(',')</li>
210-
* <li>withQuoteChar('"')</li>
211-
* <li>withRecordSeparator("\r\n")</li>
212-
* <li>withIgnoreEmptyLines(false)</li>
209+
* <li>{@link #withDelimiter(char) withDelimiter(',')}</li>
210+
* <li>{@link #withQuoteChar(String) withQuoteChar('"')}</li>
211+
* <li>{@link #withRecordSeparator(String) withRecordSeparator("\r\n")}</li>
212+
* <li>{@link #withIgnoreEmptyLines(boolean) withIgnoreEmptyLines(false)}</li>
213+
* <li>{@link #withAllowMissingColumnNames(boolean) withAllowMissingColumnNames(true)}</li>
213214
* </ul>
214215
* <p>
215-
* Note: this is currently the same as {@link #RFC4180}.
216+
* Note: this is currently like {@link #RFC4180} plus {@link #withAllowMissingColumnNames(boolean) withAllowMissingColumnNames(true)}.
216217
* </p>
217218
*/
218-
public static final CSVFormat EXCEL = DEFAULT.withIgnoreEmptyLines(false);
219+
public static final CSVFormat EXCEL = DEFAULT.withIgnoreEmptyLines(false).withAllowMissingColumnNames(true);
219220

220221
/**
221222
* Tab-delimited format.

0 commit comments

Comments
 (0)