diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ooxml/java/org/apache/poi/util/DocumentHelper.java | 5 | ||||
-rw-r--r-- | src/ooxml/java/org/apache/poi/util/SAXHelper.java | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/ooxml/java/org/apache/poi/util/DocumentHelper.java b/src/ooxml/java/org/apache/poi/util/DocumentHelper.java index 3b7d68ae57..1ec47953ab 100644 --- a/src/ooxml/java/org/apache/poi/util/DocumentHelper.java +++ b/src/ooxml/java/org/apache/poi/util/DocumentHelper.java @@ -121,8 +121,8 @@ public final class DocumentHelper { dbf.setAttribute("http://apache.org/xml/properties/security-manager", mgr); // Stop once one can be setup without error return; - } catch (Throwable t) { - logger.log(POILogger.WARN, "SAX Security Manager could not be setup", t); + } catch (Throwable e) { // NOSONAR - also catch things like NoClassDefError here + logger.log(POILogger.WARN, "SAX Security Manager could not be setup", e); } } } @@ -172,5 +172,4 @@ public final class DocumentHelper { public static void addNamespaceDeclaration(Element element, Namespace namespace) { addNamespaceDeclaration(element, namespace.getPrefix(), namespace.getNamespaceURI()); } - } diff --git a/src/ooxml/java/org/apache/poi/util/SAXHelper.java b/src/ooxml/java/org/apache/poi/util/SAXHelper.java index 1fbe744b05..6a957c2993 100644 --- a/src/ooxml/java/org/apache/poi/util/SAXHelper.java +++ b/src/ooxml/java/org/apache/poi/util/SAXHelper.java @@ -88,10 +88,8 @@ public final class SAXHelper { xmlReader.setProperty("http://apache.org/xml/properties/security-manager", mgr); // Stop once one can be setup without error return; - } catch (Exception e) { + } catch (Throwable e) { // NOSONAR - also catch things like NoClassDefError here logger.log(POILogger.WARN, "SAX Security Manager could not be setup", e); - } catch (Error err) { - logger.log(POILogger.WARN, "SAX Security Manager could not be setup", err); } } } |