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:
Javen O'Neal 2017-11-12 01:32:43 +00:00
parent 145b69b1c6
commit 1938207e59
1 changed files with 1 additions and 3 deletions

View File

@ -74,7 +74,7 @@ public class XWPFTable implements IBodyElement, ISDTContents {
}
protected StringBuilder text = new StringBuilder(64);
protected List<XWPFTableRow> tableRows;
protected final List<XWPFTableRow> tableRows = new ArrayList<>();
// Unused: UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD
//protected List<String> styleIDs;
@ -98,8 +98,6 @@ public class XWPFTable implements IBodyElement, ISDTContents {
this.part = part;
this.ctTbl = table;
tableRows = new ArrayList<>();
// is an empty table: I add one row and one column as default
if (table.sizeOfTrArray() == 0)
createEmptyTable(table);