diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java index 6116941cf..6f1f199ba 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java @@ -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(); } -} \ No newline at end of file +}