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

DASHBUILDE-223: fix NPE when exporting to Excel #323

Closed
wants to merge 1 commit into from
Closed

DASHBUILDE-223: fix NPE when exporting to Excel #323

wants to merge 1 commit into from

Conversation

jhrcek
Copy link
Contributor

@jhrcek jhrcek commented May 10, 2017

I just extracted the "DataSet to SXSSFWorkbook" functionality to separate function for testability purposes (so that I don't have to deal with niogit FS etc) and changed the NPE causing line

cell.setCellValue(value.toString());

to

String val = value == null ? "" : value.toString();
cell.setCellValue(val);

Also used try-with-resources for output stream closing.

Reproduced the issue in showcase and after this fix applied it's working fine.

@dgutierr
Copy link
Member

Merged.

Thanks! @jhrcek

@dgutierr dgutierr closed this May 16, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants