CSV-84 Clarify comment handling
Test was wrong; line comment should have been dropped entirely. Fix record handling accordingly git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306342 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e922bf949a
commit
fcfb6dc7c5
|
@ -155,6 +155,7 @@ public class CSVParser implements Iterable<CSVRecord> {
|
|||
case INVALID:
|
||||
throw new IOException("(line " + getLineNumber() + ") invalid parse sequence");
|
||||
case COMMENT: // Ignored currently
|
||||
reusableToken.type = TOKEN; // Read another token
|
||||
break;
|
||||
}
|
||||
} while (reusableToken.type == TOKEN);
|
||||
|
|
|
@ -352,7 +352,6 @@ public class CSVParserTest {
|
|||
String[][] res_comments = {
|
||||
{"a", "b"},
|
||||
{"\n", " "},
|
||||
{},
|
||||
};
|
||||
|
||||
format = CSVFormat.DEFAULT.withCommentStart('#');
|
||||
|
|
Loading…
Reference in New Issue