mirror of https://github.com/apache/poi.git
Sonar issues: Mark two places where we catch Error/Throwable as "On purpose"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1775122 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c74d5cf727
commit
765f613b71
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue