You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2010/07/15 03:36:51 UTC
[jira] Closed: (SANDBOX-316) Infinite loop when the last line is a
comment
[ https://issues.apache.org/jira/browse/SANDBOX-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley closed SANDBOX-316.
--------------------------------
Resolution: Duplicate
> Infinite loop when the last line is a comment
> ---------------------------------------------
>
> Key: SANDBOX-316
> URL: https://issues.apache.org/jira/browse/SANDBOX-316
> Project: Commons Sandbox
> Issue Type: Bug
> Components: CSV
> Affects Versions: Nightly Builds
> Environment: Linux ubuntu jaunty
> Reporter: Kamel Boulebiar
> Priority: Minor
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> 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();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.