Bug 60341

Summary: Handle null SdtPr in SdtBlock
Product: POI Reporter: Tim Allison <tallison>
Component: XWPFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.16-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   

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
r1768048
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...

r1768505