Skip to content

Conversation

@Sayi
Copy link
Member

@Sayi Sayi commented Mar 23, 2020

XWPFNumbering.addAbstractNum code is an if branch. There are two points to note:

  1. When abstractNum.getAbstractNum () is not null, you must ensure that AbstractNumId has a value, so in order for users to find the correct AbstractNumId value, two getter methods are exposed, of course, the list cannot be modified.

  2. When abstractNum.getAbstractNum () is null, an exception will be thrown when cascading the method of abstractNum.getAbstractNum (), so you need to set the attribute CtAbstractNum of the abstractNum.

PS: For the first point, we can also assert in the XWPFNumbering.addAbstractNum that AbstractNumId is not null, fail fast.

@Alain-Bearez
Copy link
Contributor

applied by commit r1875747

this PR can be closed

@Sayi Sayi closed this Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants