Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
-
Linux ubuntu jaunty
Description
I try to parse a simple file bl.csv that contains:
-----------------------------------
#The simplest good test
00000000
0001
0000002
00003
0000004
#comment at the end
------------------------------------
I wrote several test and I notice that when the last line is a comment , I get lock in an infinite loop when parsing the file.
This is the only problem I notice, Others basic case work fine.
Below is the parser I have configured:
CSVStrategy strategy = CSVStrategy.DEFAULT_STRATEGY;
strategy.setCommentStart('#');
strategy.setIgnoreEmptyLines(true);
strategy.setIgnoreLeadingWhitespaces(true);
CSVParser csvparser = new CSVParser(new FileReader(csvFile), strategy);
String[][] data = csvparser.getAllValues();
Attachments
Issue Links
- duplicates
-
CSV-36 Endless loops in CSV parser
- Closed