From 81f13bb621731ac5a3d8204ef40b7499944136bd Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Thu, 7 Jul 2016 02:25:42 +0000 Subject: [PATCH] Findbugs-JDK8: log ignored exception git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751743 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/xslf/usermodel/XSLFSimpleShape.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 +}