#7 Unclosed quote test?

closed
nobody
None
5
2011-03-02
2010-11-05
Anonymous
No

I'm using CSVReader reader = new CSVReader(new StringReader(input)); and then pulling the lines in with reader.readNext(). Is there any way to test whether the user forgot to put a closing quote somewhere and gobbled up the rest of the input?

Discussion

  • Scott Conway

    Scott Conway - 2010-12-25

    The only way I can think of offhand is to look at the size of the array returned by the readNext() method and if its not equal to the number of columns you should have then there was a problem.

    Hope that helps.

    Scott :)

     
  • Scott Conway

    Scott Conway - 2011-03-02
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks