Log Message: |
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.
|