42BV / CSVeed

Light-weight, easy-to-use Java-based CSV utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Map nulls to empty values when writing beans

spatula75 opened this issue · comments

Currently if a mapped field in a bean is null, CSVeed will throw a NullPointerException when writing the row for that bean, because of the way RowWriterImpl.java line 107 works.

It would be nice if CSVeed could interpret null field values as empty, or offer an option to @CsvCell to enable that behavior.

A plausible workaround is to provide custom mappers for every field, but this is somewhat messy.