poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1721857 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
Date Sun, 27 Dec 2015 23:17:34 GMT
Author: onealj
Date: Sun Dec 27 23:17:33 2015
New Revision: 1721857

URL: http://svn.apache.org/viewvc?rev=1721857&view=rev
Log:
bug 58740: return unmodifiable list/map when exposing internal data structures
patch from Archie Cobbs

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java?rev=1721857&r1=1721856&r2=1721857&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java Sun Dec 27 23:17:33
2015
@@ -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 POIXMLD
     }
 
     public List<XSSFCellBorder> getBorders(){
-        return borders;
+        return Collections.unmodifiableList(borders);
     }
 
     public List<XSSFCellFill> getFills(){
-        return fills;
+        return Collections.unmodifiableList(fills);
     }
 
     public List<XSSFFont> getFonts(){
-        return fonts;
+        return Collections.unmodifiableList(fonts);
     }
 
     public Map<Integer, String> getNumberFormats(){
-        return numberFormats;
+        return Collections.unmodifiableMap(numberFormats);
     }
 
     public int putFill(XSSFCellFill fill) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message