Seems to me that style ID is not optional because it is used to refer to the style from elsewhere in the document, and the style ID must also be unique. However, if the style ID is missing from the document, one should be assigned in any manner we choose, and it won't be able to be referenced. That is ok as the document is mal-formed.
On Tue, Nov 1, 2016 at 2:55 PM, <[email protected]> wrote: > https://bz.apache.org/bugzilla/show_bug.cgi?id=60329 > > Bug ID: 60329 > Summary: Avoid NPE when styleid is null > Product: POI > Version: 3.16-dev > Hardware: PC > Status: NEW > Severity: normal > Priority: P2 > Component: XWPF > Assignee: [email protected] > Reporter: [email protected] > Target Milestone: --- > > On TIKA-2152, Seva Alekseyev submitted a docx file that triggers an NPE > when > trying to get the styleid. If I read OOXML Ecma 1 [1] correctly, styleid > is > optional. We should try to avoid an NPE if the styleid is null. > > [1] > http://www.ecma-international.org/publications/files/ECMA- > ST/ECMA-376,%20Fourth%20Edition,%20Part%201%20-% > 20Fundamentals%20And%20Markup%20Language%20Reference.zip > : pdf page 3861/printed page 3851 > > -- > You are receiving this mail because: > You are the assignee for the bug. > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
