Closed DanielMartensson closed 4 years ago
Hi,
I also have this problem. I have an empty CSV file and I get Nullpointer exception, which is not good.
Even javadoc on "read" method says that null is never returned, but it is.
Please fix it so null is never returned, or at least update javadoc.
Thanks for pointing that out! The bug (null CsvContainer) is fixed with 474de29. Please let me know if there are doubts! Your other issue (append to an existing file) is tracked in #24.
Hi!
I have a issue here. I know that you have write the code like this, but this line gives null
CsvContainer csvContainer = csvReader.read(file, StandardCharsets.UTF_8);
Even if I have a header. I understand if
csvContainer
is null if the CSV file is empty, but it should not be null ifcsvContainer
has at least one row or a header.Edit:
Found out that this can be done this way.
FastCSV should have a method where to append text to files. I know that you have such method, but that will first remove all data, then fill.
It's a great library and I will use it with Deeplearning4j. But I wonder if you could make an interface so it would be easier to use?
Easier I mean by a programmer should not need to write this much code for null exceptions