From 1938207e5904149770fbc41d6466b10b16da1e60 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 12 Nov 2017 01:32:43 +0000 Subject: [PATCH] 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 --- src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java | 4 +--- 1 file changed, 1 insertion(+), 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 tableRows; + protected final List tableRows = new ArrayList<>(); // Unused: UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD //protected List 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);