mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-01-21 05:18:10 -05:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user