From 5b890cb228ea85f1748862b0df3cbd626ea6df7e Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Wed, 3 Oct 2018 07:36:12 +0000 Subject: [PATCH] change method to get XMLEventFactory due to issues seen on Android SDK 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/util/StaxHelper.java b/src/java/org/apache/poi/util/StaxHelper.java index 8c0d284304..58a4959699 100644 --- a/src/java/org/apache/poi/util/StaxHelper.java +++ b/src/java/org/apache/poi/util/StaxHelper.java @@ -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) { -- 2.39.5