From 2cb3d5a0d4f88298fcbdb919bbdf66fe3c7ad1fd Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 3 Feb 2014 20:21:59 +0100 Subject: [PATCH] Move 'new MXParser()' in try/catch block aSmack replaces 'new MXParser()' with 'XmlPullParserFactory.newInstance().newPullParser()' which can throw a XmlPullParserException. In order to build aSmack, we need to move the 'new MXParser()' within a try/catch block. --- source/org/jivesoftware/smack/SmackConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/SmackConfiguration.java b/source/org/jivesoftware/smack/SmackConfiguration.java index 57ff2b76e..43f334fcc 100644 --- a/source/org/jivesoftware/smack/SmackConfiguration.java +++ b/source/org/jivesoftware/smack/SmackConfiguration.java @@ -415,8 +415,8 @@ public final class SmackConfiguration { } private static void readFile(InputStream cfgFileStream) { - XmlPullParser parser = new MXParser(); try { + XmlPullParser parser = new MXParser(); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); parser.setInput(cfgFileStream, "UTF-8"); int eventType = parser.getEventType();