https://bz.apache.org/bugzilla/show_bug.cgi?id=62908
Bug ID: 62908
Summary: CellFormatPart getColor warnings are logged and the
method does not return a color
Product: POI
Version: 4.0.0-FINAL
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
When using apache tika which uses apache POI 4.0.0, I stumbled over the follow
logged warnings:
Nov 13, 2018 1:22:16 PM org.apache.poi.ss.format.CellFormatPart getColor
WARNUNG: Unknown color: "Green"
Nov 13, 2018 1:22:21 PM org.apache.poi.ss.format.CellFormatPart getColor
WARNUNG: Unknown color: "Red"
Nov 13, 2018 1:22:21 PM org.apache.poi.ss.format.CellFormatPart getColor
WARNUNG: Unknown color: "Yellow"
Nov 13, 2018 1:22:21 PM org.apache.poi.ss.format.CellFormatPart getColor
WARNUNG: Unknown color: "Blue"
Digging deeper, I found that the issue is caused by the fact that the static
CellFormatPart.NAMED_COLORS-map is empty. It looks like its initialization code
does not work (any more).
See this line in the class:
https://github.com/apache/poi/blob/3885cb0839541211981dc65bc2891d9bac4aa6bb/src/java/org/apache/poi/ss/format/CellFormatPart.java#L66
The name that is returned here is always HSSFColor. (There is no class
extending this class other than CustomColor). As the following condition checks
whether this name is in ALLCAPS, its body is never executed.
I guess this code used to work on something like enums that has been changed in
the mean time.
--
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]