diff options
author | Greg Woolsey <gwoolsey@apache.org> | 2017-12-11 17:30:04 +0000 |
---|---|---|
committer | Greg Woolsey <gwoolsey@apache.org> | 2017-12-11 17:30:04 +0000 |
commit | f90801d3662c3cb63302bbf836a6a45239e5c44a (patch) | |
tree | d1fc8448218731e952f7ef071485810db9f1ac2a /test-data | |
parent | f182b44c62425854a1dfc5fc384ba8fc2fd70dbf (diff) | |
download | poi-f90801d3662c3cb63302bbf836a6a45239e5c44a.tar.gz poi-f90801d3662c3cb63302bbf836a6a45239e5c44a.zip |
Bug 61882 - Some paths can create an XSSFColor instance with a null CTColor reference
Protect against this in the future by introducing a factory method to create XSSFColor instances from a CTColor instance and the associated workbook style indexed color map.
If the CTColor instance is null, the factory returns null. All callers already are prepared for a null instance, but many had their own null check on the CTColor object. This centralizes that.
This also further forces the requirement for the indexed color map. Any time a color is created, the workbook or styleTable is available in the same context, so passing this is extra parameter is trivial and allows XSSFColor to properly reference custom/themed indexed colors.
Did not remove any methods yet, only deprecated them. Changed the signature to one internal test-only constructor.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1817796 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test-data')
0 files changed, 0 insertions, 0 deletions