Bug 63788 - XWPFNumbering.removeAbstractNum removes by list index, not abstractNumId
Summary: XWPFNumbering.removeAbstractNum removes by list index, not abstractNumId
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 13:02 UTC by patrick
Modified: 2020-01-01 19:23 UTC (History)
0 users



Attachments
A demonstration of the described bug (1.52 KB, text/plain)
2019-09-30 13:02 UTC, patrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description patrick 2019-09-30 13:02:13 UTC
Created attachment 36804 [details]
A demonstration of the described bug

The XWPFNumbering.removeAbstractNum method removes by list index, while the documentation indicates that it removes by abstractNumId. The class does not ensure that the two are the same.
Demonstration file attached.
Comment 1 Dominik Stadler 2020-01-01 19:23:21 UTC
Fixed via r1872187, the method now iterates over the available numbers and removes the first one where the abstractNumId matches. 

Thanks for the report.