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.
This commit is contained in:
Florian Schmaus 2014-02-03 20:21:59 +01:00
parent c06b0a7720
commit 2cb3d5a0d4
1 changed files with 1 additions and 1 deletions

View File

@ -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();