mirror of https://github.com/apache/poi.git
fix lgtm issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1842218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b3f0d80eb6
commit
93af1ca43a
|
@ -223,7 +223,7 @@ public class POIXMLProperties {
|
||||||
throw new POIXMLException(e);
|
throw new POIXMLException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(extPart != null){
|
if(extPart != null && ext != null && ext.props != null){
|
||||||
try (OutputStream out = extPart.getOutputStream()) {
|
try (OutputStream out = extPart.getOutputStream()) {
|
||||||
if (extPart.getSize() > 0) {
|
if (extPart.getSize() > 0) {
|
||||||
extPart.clear();
|
extPart.clear();
|
||||||
|
@ -231,7 +231,7 @@ public class POIXMLProperties {
|
||||||
ext.props.save(out, DEFAULT_XML_OPTIONS);
|
ext.props.save(out, DEFAULT_XML_OPTIONS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(custPart != null){
|
if(custPart != null && cust != null && cust.props != null){
|
||||||
try (OutputStream out = custPart.getOutputStream()) {
|
try (OutputStream out = custPart.getOutputStream()) {
|
||||||
cust.props.save(out, DEFAULT_XML_OPTIONS);
|
cust.props.save(out, DEFAULT_XML_OPTIONS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue