Bug 64044

Summary: NPE when passing null to setCellValue as LocalDate type in CellBase
Product: POI Reporter: Michał Jaszczyk <jaszczyk.michal.87>
Component: SS CommonAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.1.1-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Michał Jaszczyk 2020-01-02 10:59:40 UTC
If passing null to any setCellValue method for CellBase it would set cell type to blank.
There is only one exception, when passing null as LocalDate type due to default implementation in Cell interface which tries to convert LocalDate to LocalDateTime by invoking atStartOfDay method on given LocalDate.

To be consistent, the default implementation should be removed and CellBase would need to check for null as in other implementations of setCellValue method
Comment 1 PJ Fanning 2020-01-02 14:55:11 UTC
Thanks for reporting this. I'm putting together a fix.

For the time being, users will need to workaround this bug by using cell.setCellValue((String)null) or something similar.
Comment 3 Kevin Seymour 2020-01-06 21:30:43 UTC
Would it be possible to push this into 4.1.2?  I don't see it scheduled for any release yet.

https://poi.apache.org/changes.html