Bug 64600 - XWPFStyles.styleExist("MyStyle") should return false instead of raising NPE
Summary: XWPFStyles.styleExist("MyStyle") should return false instead of raising NPE
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-14 13:24 UTC by Andreas Küllinger
Modified: 2020-07-14 16:52 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Küllinger 2020-07-14 13:24:07 UTC
XWPFStyles.styleExist should return "false" instead of raising a NPE. It is raised, if the processed document contains styles without ID's.

It should work similar getStyle within XWPFStyles.
Comment 1 Sayi 2020-07-14 16:01:31 UTC
Hi, You are right, I think this bug will be fixed.

You can review the code: https://github.com/apache/poi/pull/186
Comment 3 Andreas Küllinger 2020-07-14 16:52:49 UTC
Hi, I think fix looks good!

Thanks!