diff --git a/pom.xml b/pom.xml index d7851856..8ebb9846 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.univocity univocity-parsers - 2.9.1 + 2.9.2-SNAPSOHT univocity-parsers jar univocity's open source parsers for processing different text formats using a consistent API diff --git a/src/test/java/com/univocity/parsers/issues/github/Github_449.java b/src/test/java/com/univocity/parsers/issues/github/Github_449.java new file mode 100644 index 00000000..00017116 --- /dev/null +++ b/src/test/java/com/univocity/parsers/issues/github/Github_449.java @@ -0,0 +1,36 @@ +package com.univocity.parsers.issues.github; + +import com.univocity.parsers.csv.*; +import org.testng.annotations.*; + + +/** + * From: https://github.com/univocity/univocity-parsers/issues/438 + * + * @author Univocity Software Pty Ltd - parsers@univocity.com + */ +public class Github_449 { + + @Test + public void testNoExceptionParsingLine(){ + CsvParserSettings settings = new CsvParserSettings(); + settings.getFormat().setDelimiter("|"); + settings.setIgnoreLeadingWhitespaces(false); + settings.setInputBufferSize(128); + + CsvParser parser = new CsvParser(settings); + String line = "XX |XXX-XXXX |XXXXXX " + + "|XXXXXXXX|XXXXX |XXXXXX " + + "|X|XXXXXXX|XXXXXXXX|XXXX|XXXXXXXXXXXXXXX |XXXXXXXXXXX" + + "|XXXXXX |XXXXXXXXXXXXXXXXXXXXXX|XXXXXX " + + "|XXXXXXXXXXXXXX|XXXXXX |XXXXXXXXXXXXXXXXXXXXXX" + + "|XXXXXX |XXXXXXXXXXXXXXXXXXXXXX|XXXXXX " + + "|XXXXXXXXX|XXXXXX |XXXXXXX| " + + "|| || " + + "|| ||XXXX-XX-XX 00:00:00.0000000" + + "||XXXXX.XXXXXXXXXXXXXXX|XXXXX.XXXXXXXXXXXXXX" + + "|XXXXX.XXXXXXXXXXXXXXX|X|XXXXXX |X"; + + parser.parseLine(line); + } +} \ No newline at end of file