Summary: | Dynamically addAbstractNum in XWPFNumbering | ||
---|---|---|---|
Product: | POI | Reporter: | Sayi <adasai90> |
Component: | XWPF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.16-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Mac OS X 10.1 |
Description
Sayi
2017-06-29 10:22:32 UTC
Isn't abstractNum the param you pass in? public BigInteger addAbstractNum(XWPFAbstractNum abstractNum) Can't you ensure that your abstractNum has a non-null value for abstractNum.getAbstractNum()? Eg by using public XWPFAbstractNum(CTAbstractNum abstractNum) Could you provide a full sample of what you are trying to do? (In reply to PJ Fanning from comment #1) > Isn't abstractNum the param you pass in? > > public BigInteger addAbstractNum(XWPFAbstractNum abstractNum) > > Can't you ensure that your abstractNum has a non-null value for > abstractNum.getAbstractNum()? > > Eg by using > public XWPFAbstractNum(CTAbstractNum abstractNum) > > Could you provide a full sample of what you are trying to do? abstractNum.getAbstractNum() is really null,i just want to addAbstractNum。 Java Code allow abstractNum.getAbstractNum() has a null value,but in else block, throw exception,So the else block is dead. Thank you. finally, i found this method to addAbstractNum, it's OK, https://stackoverflow.com/questions/44433347/apache-poi-numbered-list Seems to be ok for now based on last comment. |