1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-23 06:42:05 +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) { private static void readFile(InputStream cfgFileStream) {
XmlPullParser parser = new MXParser();
try { try {
XmlPullParser parser = new MXParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(cfgFileStream, "UTF-8"); parser.setInput(cfgFileStream, "UTF-8");
int eventType = parser.getEventType(); int eventType = parser.getEventType();