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:
Sebastian Bazley 2012-03-28 14:05:25 +00:00
parent e922bf949a
commit fcfb6dc7c5
2 changed files with 1 additions and 1 deletions

View File

@ -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);

View File

@ -352,7 +352,6 @@ public class CSVParserTest {
String[][] res_comments = {
{"a", "b"},
{"\n", " "},
{},
};
format = CSVFormat.DEFAULT.withCommentStart('#');