https://issues.apache.org/bugzilla/show_bug.cgi?id=51787
Bug #: 51787
Summary: First row is duplicated in the XWPFTable constructor
Product: POI
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: XWPF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
In the case when row (or rows) is already present in tableRows, the folowing
code in the constructor will anyway add it for the second time:
XWPFTableRow tabRow = (getRow(i) == null) ? createRow() : getRow(i);
tableRows.add(tabRow);
I've fixed that problem by replacing the code above with:
XWPFTableRow tabRow = getRow(i);
if (tabRow == null) {
tabRow = createRow();
tableRows.add(tabRow);
}
and it is working for me. However, I can not guarantee that I did not misssed
something important.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]