From 50236d510bdd6a3433821979b475cb5583e1a63b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 4 Oct 2017 12:55:17 +0300 Subject: xmpp: update dependency --- juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'juick-xmpp/src/main/java/com') diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java b/juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java index 86b77ad6..693b278e 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java @@ -20,9 +20,9 @@ package com.juick.components.s2s; import com.juick.components.XMPPServer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.xmlpull.mxp1.MXParser; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlPullParserFactory; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; @@ -52,7 +52,8 @@ public class Connection { public static final String NS_DB = "jabber:server:dialback"; public static final String NS_TLS = "urn:ietf:params:xml:ns:xmpp-tls"; public static final String NS_STREAM = "http://etherx.jabber.org/streams"; - XmlPullParser parser = new MXParser(); + XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); + XmlPullParser parser = factory.newPullParser(); OutputStreamWriter writer; private boolean secured = false; SSLContext sc; @@ -145,7 +146,7 @@ public class Connection { } public void restartParser() throws XmlPullParserException, IOException { - parser = new MXParser(); + parser = factory.newPullParser(); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); parser.setInput(new InputStreamReader(socket.getInputStream())); writer = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.UTF_8); -- cgit v1.2.3