You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/04/17 09:34:53 UTC
[Bug 57826] New: XSSFSimpleShape.getText throws NullPointerException
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: dev@poi.apache.org
Reporter: jon_s@aisan-cs.co.jp
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57826] [PATCH] XSSFSimpleShape.getText throws
NullPointerException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57826
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
Summary|XSSFSimpleShape.getText |[PATCH]
|throws NullPointerException |XSSFSimpleShape.getText
| |throws NullPointerException
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57826] XSSFSimpleShape.getText throws NullPointerException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57826
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #32663|[patch] testcase for the |[patch] testcase for the
description|bug (made with ant -f |bug (made with ant -f
|patch.xml) |patch.xml).
--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
Comment on attachment 32663
--> https://bz.apache.org/bugzilla/attachment.cgi?id=32663
[patch] testcase for the bug (made with ant -f patch.xml).
.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57826] XSSFSimpleShape.getText throws NullPointerException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57826
Jon Scharff <jo...@aisan-cs.co.jp> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #32657|0 |1
is obsolete| |
--- Comment #1 from Jon Scharff <jo...@aisan-cs.co.jp> ---
Created attachment 32663
--> https://bz.apache.org/bugzilla/attachment.cgi?id=32663&action=edit
[patch] testcase for the bug (made with ant -f patch.xml)
includes an xlsx that exhibits the issue and a junit test added to
usermodel.TestUnfixedBugs in ooxml/testcases.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57826] XSSFSimpleShape.getText throws NullPointerException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57826
Jon Scharff <jo...@aisan-cs.co.jp> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
CC| |jon_s@aisan-cs.co.jp
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57826] [PATCH] XSSFSimpleShape.getText throws
NullPointerException
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57826
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Nick Burch <ap...@gagravarr.org> ---
Thanks! Fixed in r1676831, using your test to verify it's all working
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org