Bug 63200

Summary: [PATCH] Fix rare NPE on getFillPaint
Product: POI Reporter: Mate Borcsok <bmateusz>
Component: XSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.0.x-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: test-data/slideshow/gradient-fill-in-group.pptx
test case and fix for bug63200

Description Mate Borcsok 2019-02-22 14:41:01 UTC
Created attachment 36452 [details]
test-data/slideshow/gradient-fill-in-group.pptx

I found an edge case where calling getFillColor on a shape which calls getFillPaint throws a NullPointerException.
The fill of the shape is gradient fill, but the CTGradientStopList is null.

Attached example pptx, test case, and the fix.
Comment 1 Mate Borcsok 2019-02-22 14:42:58 UTC
Created attachment 36453 [details]
test case and fix for bug63200
Comment 2 Dominik Stadler 2019-03-02 12:29:56 UTC
Thanks for the patch, applied via r1854639 with some more changes that were visible in our integration-tests via this sample file.