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
This commit is contained in:
PJ Fanning 2018-10-03 07:36:12 +00:00
parent 09f441ca46
commit 5b890cb228
1 changed files with 2 additions and 1 deletions

View 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) {