diff --git a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java index d413b64c5..3c40725ad 100644 --- a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java +++ b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java @@ -24,6 +24,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -301,19 +302,19 @@ public class StylesTable extends POIXMLDocumentPart { } public List getBorders(){ - return borders; + return Collections.unmodifiableList(borders); } public List getFills(){ - return fills; + return Collections.unmodifiableList(fills); } public List getFonts(){ - return fonts; + return Collections.unmodifiableList(fonts); } public Map getNumberFormats(){ - return numberFormats; + return Collections.unmodifiableMap(numberFormats); } public int putFill(XSSFCellFill fill) {