Bug 62859 - NPE when creating SDTContent
Summary: NPE when creating SDTContent
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: 2018-10-26 17:39 UTC by Tim Allison
Modified: 2018-10-26 19:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Allison 2018-10-26 17:39:25 UTC
Иван Сорокин reported the following NPE on discuss.elastic.co.  I can't quick replicate it, but I can see how to fix it.

https://discuss.elastic.co/t/error-while-using-ingest-attachment-plugin-on-some-docs/153836/2

Caused by: java.lang.NullPointerException
>       at org.apache.poi.xwpf.usermodel.XWPFSDTContent.<init>(XWPFSDTContent.java:50) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFSDT.<init>(XWPFSDT.java:34) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFParagraph.buildRunsInOrderFromXml(XWPFParagraph.java:136) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFParagraph.<init>(XWPFParagraph.java:63) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFSDTContent.<init>(XWPFSDTContent.java:63) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFSDT.<init>(XWPFSDT.java:39) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:178) ~[?:?]
>       at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:169) ~[?:?]
>       at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:112) ~[?:?]
>       at org.apache.poi.xwpf.extractor.XWPFWordExtractor.<init>(XWPFWordExtractor.java:60) ~[?:?]

Full stacktrace is here:
https://pastebin.com/CHfFMc52
Comment 1 Tim Allison 2018-10-26 17:52:28 UTC
_quickly_

Once local integration tests pass, I'll commit the fix.
Comment 2 Tim Allison 2018-10-26 19:10:40 UTC
r1844920