https://bz.apache.org/bugzilla/show_bug.cgi?id=57826
Bug ID: 57826
Summary: XSSFSimpleShape.getText throws NullPointerException
Product: POI
Version: 3.11-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 32657
--> https://bz.apache.org/bugzilla/attachment.cgi?id=32657&action=edit
An xlsx file that exhibits the issue
A NullPointerException occurs when running extractor.XSSFExcelExtractor on the
attached xlsx file.
It is possible have a shape containing a paragraph with property BuFont but
none of the properties BuNone, BuChar, and BuAutoNum. This is the case with the
text box containing text "test fail" in the attached file. *
In this case, usermodel.XSSFTextParagraph.isBullet() returns true.
usermodel.XSSFSimpleShape.getText() expects that if p.isBullet() is true then
either p.isBulletAutoNumber() is true or p.getBulletCharacter() returns a
non-null string. However, with the attached file, this is not the case.
Excel 2010 treats the textbox as not being bulleted, so perhaps
XSSFTextParagraph.isBullet() should return false in this case. Otherwise,
XSSFSimpleShape.getText() should perform a null check before using the result
of p.getBulletCharacter() (or both?).
* I have no idea how the text box got in this state, but it was mostly likely
done with Microsoft products...
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]