commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamel Boulebiar (JIRA)" <j...@apache.org>
Subject [jira] Created: (SANDBOX-316) Infinite loop when the last line is a comment
Date Thu, 12 Nov 2009 16:51:39 GMT
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


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