Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Commit 449e9a8

Browse files
committed
Make sure empty lines are ignored by constructing CSVFormat this way. Remove corresponding assert that would have failed if CSVFormat.newBuilder() was changed to withIgnoreEmptyLines(false)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465718 13f79535-47bb-0310-9956-ffa450edef68
1 parent 19cb2ca commit 449e9a8

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/test/java/org/apache/commons/csv/CSVLexerTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,9 @@ public void testIgnoreEmptyLines() throws IOException {
8888
"\n"+
8989
"\n"+
9090
"# Final comment\n"; // 7
91-
final CSVFormat format = CSVFormat.newBuilder().withCommentStart('#').build();
92-
assertTrue("Should ignore empty lines", format.getIgnoreEmptyLines());
93-
91+
final CSVFormat format = CSVFormat.newBuilder().withCommentStart('#').withIgnoreEmptyLines(true).build();
9492
final Lexer parser = getLexer(code, format);
9593

96-
9794
assertThat(parser.nextToken(new Token()), matches(TOKEN, "1"));
9895
assertThat(parser.nextToken(new Token()), matches(TOKEN, "2"));
9996
assertThat(parser.nextToken(new Token()), matches(TOKEN, "3"));

0 commit comments

Comments
 (0)