Bug 60341 - Handle null SdtPr in SdtBlock
Summary: Handle null SdtPr in SdtBlock
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: 3.16-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2016-11-04 14:51 UTC by Tim Allison
Modified: 2016-11-07 12:12 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Allison 2016-11-04 14:51:49 UTC
On TIKA-2160, Seva Alekseyev shared a document that contains an SdtBlock that does not have an SdtPr.  According to the ECMA standard [1] (pdf page 3842, printed page number 3832), an SdtBlock does not need to have an SdtPr.  We should handle the case of a non-existent SdtPr.

[1] http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Fourth%20Edition,%20Part%201%20-%20Fundamentals%20And%20Markup%20Language%20Reference.zip
Comment 1 Tim Allison 2016-11-04 15:06:39 UTC
Comment 2 Mark Murphy 2016-11-05 05:31:05 UTC
(In reply to Tim Allison from comment #1)
> r1768048

I converted the unit test to junit 4 syntax, and marked test60341() @Ignore until you add the test data Bug60341.docx to the project. I need tests to pass so I can promote some changes.
Comment 3 Tim Allison 2016-11-07 12:12:03 UTC
The horror!  Sorry, forgot to add the test doc to svn.  Is 3kb worth the npe check? Not sure...