NPE in AbstractCsvWriter
A fast, programmer-friendly, free CSV library for Java
Brought to you by:
jamesbassett,
kbg
In version 1.52 in AbstractCsvWriter on line 136/137 a NullInputException is created with the last parameter set to 'null':
throw new NullInputException("Object at position " + i + " is null", new CSVContext(getLineNumber(), i), (Throwable) null);
This ends up in the constructor of SuperCSVException where the parameter is referenced in 't.getMessage()' which causes a NPE.
How would you suggest to resolve this? feel free to send a patch.
cheers :)
I removed the concatenation of a nested Throwable's message from all Exception classes. It was the cause of the NPE in this issue, and isn't necessary as the Exception and stacktrace contain the nested message anyway (i.e. in the cause).