https://bz.apache.org/bugzilla/show_bug.cgi?id=65453
Bug ID: 65453
Summary: [PATCH] Add support for java boxed tyes Number &
Boolean in setCellValue
Product: POI
Version: 5.0.x-dev
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 37958
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37958&action=edit
Represent null values of java's Number & Boolean as blank cells
The current implementation for numeric values forces the usage of the raw type
double. Usually java takes care of the type conversion from boxed types like
Integer.
A special case occurs when the boxed type has the value null. I'm aware of the
comment in #63242 that the developer should check for NPE, but this cuts short
of what the intention of the value null might be.
I would like to argue, then when looking from the perspective of a data
modeling the value null implies that there is no measurable value for something
and a default value is wrong.
Such value can be represented in Excel as an empty cell.
For implementation I choose to use a default method, since to sole purpose is
to check for null values and in case of set the cell to be blank.
The Number supertype provides a way to unbox the values to a double while
catching only the boxed types.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]