Summary: | [PATCH] NPE when calling getShapeName on XSLFTableCell | ||
---|---|---|---|
Product: | POI | Reporter: | Mate Borcsok <bmateusz> |
Component: | XSLF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 4.0.x-dev | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | Fix in XSLFShape.java and a test for it |
getShapeId id not null safe either I'm not sure if it is meant to be valid to have XLSFShape that has no underlying XMLBean shape object. Comment on attachment 36622 [details] Fix in XSLFShape.java and a test for it I added https://svn.apache.org/viewvc?view=revision&revision=1861172 This is fixed according to the previous comment. |
Created attachment 36622 [details] Fix in XSLFShape.java and a test for it Calling getCNvPr() on a TableCell returns null, then we call .getName() on it without checking it. Please see my patch and test case. I re-used table_test.pptx from the test-data. I'm not sure if returning null is correct, but still better than an NPE.