commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] Closed: (SANDBOX-316) Infinite loop when the last line is a comment
Date Thu, 15 Jul 2010 01:36:51 GMT

     [ 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.


Mime
View raw message