Menu

#19 NPE in AbstractCsvWriter

2.0.0-beta-1
closed
None
5
2012-09-16
2010-01-06
Anonymous
No

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.

Discussion

  • Kasper B. Graversen

    How would you suggest to resolve this? feel free to send a patch.

    cheers :)

     
  • James Bassett

    James Bassett - 2012-02-13

    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).

     

Log in to post a comment.