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/10/26 19:05:33 UTC
[Bug 58552] New: NPE at XWPFStyles.getUsedStyleList()
https://bz.apache.org/bugzilla/show_bug.cgi?id=58552
Bug ID: 58552
Summary: NPE at XWPFStyles.getUsedStyleList()
Product: POI
Version: 3.11-FINAL
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: XWPF
Assignee: dev@poi.apache.org
Reporter: ggg204@yandex.ru
I tried to find used styles of style, which have 'next style', but has no 'link
style', using XWPFStyles.getUsedStyleList(XWPFStyle) method and got NPE at 174
line.
https://github.com/apache/poi/blob/REL_3_11_BRANCH/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java#L191
This part of code looks really suspicious:
String nextStyleID = style.getNextStyleID();
XWPFStyle nextStyle = getStyle(nextStyleID);
if((nextStyle!=null)&&(!usedStyleList.contains(nextStyle))){
usedStyleList.add(linkStyle);
getUsedStyleList(linkStyle, usedStyleList);
}
Probably this is a bug, and author mentioned that:
usedStyleList.add(nextStyle);
getUsedStyleList(nextStyle, usedStyleList);
So, trunk version of this class contains same part of code too.
--
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 58552] NPE at XWPFStyles.getUsedStyleList()
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58552
Stanislav Kashirin <gg...@yandex.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
Severity|critical |major
--
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 58552] NPE at XWPFStyles.getUsedStyleList()
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58552
Stanislav Kashirin <gg...@yandex.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|3.11-FINAL |3.15-dev
--- Comment #1 from Stanislav Kashirin <gg...@yandex.ru> ---
https://github.com/apache/poi/blob/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java#L245
Current version has same piece of code.
--
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