Findbugs-JDK8: log ignored exception

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-07-07 02:25:42 +00:00
parent 56d11479de
commit 81f13bb621

View File

@ -675,7 +675,7 @@ public abstract class XSLFSimpleShape extends XSLFShape
*
* @return definition of the shape geometry
*/
public CustomGeometry getGeometry(){
public CustomGeometry getGeometry() {
XSLFGeometryProperties gp = XSLFPropertiesDelegate.getGeometryDelegate(getShapeProperties());
if (gp == null) {
@ -693,8 +693,13 @@ public abstract class XSLFSimpleShape extends XSLFShape
} else if (gp.isSetCustGeom()){
XMLStreamReader staxReader = gp.getCustGeom().newXMLStreamReader();
geom = PresetGeometries.convertCustomGeometry(staxReader);
try { staxReader.close(); }
catch (XMLStreamException e) {}
try {
staxReader.close();
}
catch (XMLStreamException e) {
LOG.log(POILogger.WARN,
"An error occurred while closing a Custom Geometry XML Stream Reader: " + e.getMessage());
}
} else {
geom = dict.get("rect");
}
@ -1082,4 +1087,4 @@ public abstract class XSLFSimpleShape extends XSLFShape
CTShapeProperties spr = (CTShapeProperties)pr;
return (spr.isSetLn() || !create) ? spr.getLn() : spr.addNewLn();
}
}
}