]> source.dussan.org Git - poi.git/commitdiff
change method to get XMLEventFactory due to issues seen on Android SDK
authorPJ Fanning <fanningpj@apache.org>
Wed, 3 Oct 2018 07:36:12 +0000 (07:36 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 3 Oct 2018 07:36:12 +0000 (07:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1842683 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/util/StaxHelper.java

index 8c0d2843047276c81d405bbc96e06a5d709b9e4a..58a4959699b4835caa41d03d7c64d97163a28bb5 100644 (file)
@@ -55,7 +55,8 @@ public final class StaxHelper {
      * Creates a new StAX XMLEventFactory, with sensible defaults
      */
     public static XMLEventFactory newXMLEventFactory() {
-        return XMLEventFactory.newFactory();
+        // this method seems safer on Android than getFactory()
+        return XMLEventFactory.newInstance();
     }
             
     private static void trySetProperty(XMLInputFactory factory, String feature, boolean flag) {