aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-10-04 12:55:17 +0300
committerGravatar Vitaly Takmazov2017-10-04 12:55:17 +0300
commit50236d510bdd6a3433821979b475cb5583e1a63b (patch)
treee80f8f8a83c347d02ffbe7a4872936e8d1fc6800 /juick-xmpp/src/main/java/com
parent52a7c30ddc7a60643595c82389d6ca54b0085803 (diff)
xmpp: update dependency
Diffstat (limited to 'juick-xmpp/src/main/java/com')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java7
1 files changed, 4 insertions, 3 deletions
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);