Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in writeCell #53

Open
j256 opened this issue Nov 21, 2014 · 1 comment
Open

NPE in writeCell #53

j256 opened this issue Nov 21, 2014 · 1 comment

Comments

@j256
Copy link

j256 commented Nov 21, 2014

So I suspect that this is because the writer is not expecting a cell to be null. At the very least a better exception should be thrown that explains that field XXX was null.

java.lang.NullPointerException: null
at org.csveed.row.RowWriterImpl.writeCell(RowWriterImpl.java:107) ~[csveed-0.4.0.jar:na]
at org.csveed.row.RowWriterImpl.writeCells(RowWriterImpl.java:87) ~[csveed-0.4.0.jar:na]
at org.csveed.row.RowWriterImpl.writeRow(RowWriterImpl.java:57) ~[csveed-0.4.0.jar:na]

What I seem to be missing is null handling when writing bean fields. Maybe a setter which says outputBlankCellForNull(boolean) or something?

@j256
Copy link
Author

j256 commented Nov 21, 2014

Wow, this is frustrating. Not sure what CSVeed is expecting. Do I really need to write custom converters for all of my fields just to handle nulls? Geez. Ok.

hazendaz added a commit that referenced this issue Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant