Fix crash on some corruption when importing CSV

Commons-CSV would throw a RuntimeException in some cases of
bad CSV input. This was later changed to throwing an
IllegalStateException. Updating to v1.5 to pick-up the change.
This commit is contained in:
Branden Archer
2018-01-16 22:04:28 -05:00
parent a3a70d459b
commit 43072e283f
3 changed files with 7 additions and 3 deletions

View File

@@ -198,7 +198,11 @@ public class ImportExportTest
clearDatabase();
String corruptEntry = "ThisStringIsLikelyNotPartOfAnyFormat";
// commons-csv would throw a RuntimeException if an entry was quotes but had
// content after. For example:
// abc,def,""abc,abc
// ^ after the quote there should only be a , \n or EOF
String corruptEntry = "ThisStringIsLikelyNotPartOfAnyFormat,\"\"a";
ByteArrayInputStream inData = new ByteArrayInputStream((outData.toString() + corruptEntry).getBytes());
InputStreamReader inStream = new InputStreamReader(inData);