Menu

#48 Make feature "skip lines of zero length" configurable

2.2.0
closed
nobody
None
1
2015-01-04
2014-11-05
No

As mentioned here:

http://stackoverflow.com/questions/13797616/how-do-i-skip-white-space-only-lines-using-super-csv

Super CSV automatically skips lines of zero length (just a line terminator). Can you please make this behavior configurable so that this can be easily turned off?

Discussion

  • Kasper B. Graversen

    I Think this is a reasonable request. Feel free to do the necesarry changes and send me a bundle and I'll merge it into the code base.

     
  • Andy Schönemann

    Sorry, but I'm not able to do the necessary changes on my own.

     
  • Kasper B. Graversen

    What seems to be the problem?

     
  • James Bassett

    James Bassett - 2014-11-08

    Can I ask why you don't want to skip empty lines? What would the result of reading an empty line be? For example if I read an empty line with CsvBeanReader what would it return? (as null indicates EOF). I think it should throw an exception. If you can give more background on why this is important that would be great.

     
    • Kasper B. Graversen

      In a sense it is fair enough to consider such a scenario an error situation like you say.

       
  • Andy Schönemann

    Sorry for my late answer! In some cases an empty line in an input file could mean missing data which implies an broken input file. In this scenario an exception would be helpful.

    I'm not really into your code and I have no idea whether this new feature could be part of CsvPreference or not.

     
  • James Bassett

    James Bassett - 2015-01-04
    • status: open --> closed
     

Log in to post a comment.