From 4cf3b2bee25ffd53006372173256c25f74ced100 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 12 Nov 2017 01:34:52 +0000 Subject: [PATCH] XWPFTable#getRows() should return an unmodifiable list unless the method can correctly update xmlbeans in response to modifying the list git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1814999 13f79535-47bb-0310-9956-ffa450edef68 --- src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 0b13b27e05..8757e42542 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.EnumMap; import java.util.HashMap; import java.util.List; +import java.util.Collections; import org.apache.poi.POIXMLDocumentPart; import org.apache.poi.util.Internal; @@ -589,7 +590,7 @@ public class XWPFTable implements IBodyElement, ISDTContents { } public List getRows() { - return tableRows; + return Collections.unmodifiableList(tableRows); } /**