diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-10-20 20:30:03 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-10-20 20:30:03 +0000 |
commit | 9c367c57c05c18b63cf35ebfbb8e6e82d5a1c20c (patch) | |
tree | cd274311a35e2191a092613340cb1e63502e3079 /src | |
parent | 02da9fd353991497d8e56dac5f5396f5df2ad78d (diff) | |
download | poi-9c367c57c05c18b63cf35ebfbb8e6e82d5a1c20c.tar.gz poi-9c367c57c05c18b63cf35ebfbb8e6e82d5a1c20c.zip |
Handle errors from GraalVM native mode runs - UnsupportedFeature on setting Sax features together with missing ErrorMessages from the java.xml module
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1882714 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/poi/util/XMLHelper.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/org/apache/poi/util/XMLHelper.java b/src/java/org/apache/poi/util/XMLHelper.java index d9e00d9a3c..77d06b6430 100644 --- a/src/java/org/apache/poi/util/XMLHelper.java +++ b/src/java/org/apache/poi/util/XMLHelper.java @@ -269,7 +269,7 @@ public final class XMLHelper { return true; } catch (Exception e) { logThrowable(e, "SAX Feature unsupported", name); - } catch (AbstractMethodError ame) { + } catch (Error ame) { logThrowable(ame, "Cannot set SAX feature because outdated XML parser in classpath", name); } return false; @@ -281,7 +281,8 @@ public final class XMLHelper { return true; } catch (Exception e) { logThrowable(e, "SAX Feature unsupported", name); - } catch (AbstractMethodError ame) { + } catch (Error ame) { + // ignore all top error object - GraalVM in native mode is not coping with java.xml error message resources logThrowable(ame, "Cannot set SAX feature because outdated XML parser in classpath", name); } return false; |