1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-19 17:17:57 +01:00

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

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