mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
Substitute MXParser with a call to XmlPullParserFactory
This makes Smack more portable, as there are platforms that support the XmlPullParser interface, but not MXParser (e.g. Android). Also enable checkstyle check that MXParser is not used.
This commit is contained in:
parent
4db0b101c2
commit
24b637876f
18 changed files with 40 additions and 35 deletions
|
@ -28,7 +28,7 @@ import java.util.logging.Logger;
|
|||
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smackx.jingle.JingleSession;
|
||||
import org.xmlpull.mxp1.MXParser;
|
||||
import org.xmlpull.v1.XmlPullParserFactory;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class STUNResolver extends TransportResolver {
|
|||
int serverPort;
|
||||
|
||||
try {
|
||||
XmlPullParser parser = new MXParser();
|
||||
XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
|
||||
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
|
||||
parser.setInput(stunConfigStream, "UTF-8");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue