make tableRows final; initialize where defined rather than in constructor.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814998 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1e6c2eef7
commit
fd29e87402
@ -74,7 +74,7 @@ public class XWPFTable implements IBodyElement, ISDTContents {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected StringBuilder text = new StringBuilder(64);
|
protected StringBuilder text = new StringBuilder(64);
|
||||||
protected List<XWPFTableRow> tableRows;
|
protected final List<XWPFTableRow> tableRows = new ArrayList<>();
|
||||||
|
|
||||||
// Unused: UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD
|
// Unused: UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD
|
||||||
//protected List<String> styleIDs;
|
//protected List<String> styleIDs;
|
||||||
@ -98,8 +98,6 @@ public class XWPFTable implements IBodyElement, ISDTContents {
|
|||||||
this.part = part;
|
this.part = part;
|
||||||
this.ctTbl = table;
|
this.ctTbl = table;
|
||||||
|
|
||||||
tableRows = new ArrayList<>();
|
|
||||||
|
|
||||||
// is an empty table: I add one row and one column as default
|
// is an empty table: I add one row and one column as default
|
||||||
if (table.sizeOfTrArray() == 0)
|
if (table.sizeOfTrArray() == 0)
|
||||||
createEmptyTable(table);
|
createEmptyTable(table);
|
||||||
|
Loading…
Reference in New Issue
Block a user