poi/src/ooxml
Greg Woolsey 11e60eb77e 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
2017-12-11 17:30:04 +00:00
..
java/org/apache/poi Bug 61882 - Some paths can create an XSSFColor instance with a null CTColor reference 2017-12-11 17:30:04 +00:00
resources/org/apache/poi #58617 - Add custom safe XmlBeans type loader / rename vendor specific schema packages 2015-11-21 19:37:26 +00:00
testcases/org/apache/poi Bug 61882 - Some paths can create an XSSFColor instance with a null CTColor reference 2017-12-11 17:30:04 +00:00