aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2017-11-12 01:32:43 +0000
committerJaven O'Neal <onealj@apache.org>2017-11-12 01:32:43 +0000
commit1938207e5904149770fbc41d6466b10b16da1e60 (patch)
tree7d30cc854909fcff096969cb9b4e4c9eda0f1302
parent145b69b1c6568036aaafef2e0acdea8d3b7fa8f1 (diff)
downloadpoi-1938207e5904149770fbc41d6466b10b16da1e60.tar.gz
poi-1938207e5904149770fbc41d6466b10b16da1e60.zip
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
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
index b7762828e0..0b13b27e05 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
@@ -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);