bug 58740: return unmodifiable list/map when exposing internal data structures
patch from Archie Cobbs git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1721857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d89168fa51
commit
19e5db9602
@ -24,6 +24,7 @@ import java.io.InputStream;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -301,19 +302,19 @@ public class StylesTable extends POIXMLDocumentPart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<XSSFCellBorder> getBorders(){
|
public List<XSSFCellBorder> getBorders(){
|
||||||
return borders;
|
return Collections.unmodifiableList(borders);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<XSSFCellFill> getFills(){
|
public List<XSSFCellFill> getFills(){
|
||||||
return fills;
|
return Collections.unmodifiableList(fills);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<XSSFFont> getFonts(){
|
public List<XSSFFont> getFonts(){
|
||||||
return fonts;
|
return Collections.unmodifiableList(fonts);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Integer, String> getNumberFormats(){
|
public Map<Integer, String> getNumberFormats(){
|
||||||
return numberFormats;
|
return Collections.unmodifiableMap(numberFormats);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int putFill(XSSFCellFill fill) {
|
public int putFill(XSSFCellFill fill) {
|
||||||
|
Loading…
Reference in New Issue
Block a user