aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp
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
parent52a7c30ddc7a60643595c82389d6ca54b0085803 (diff)
xmpp: update dependency
Diffstat (limited to 'juick-xmpp')
-rw-r--r--juick-xmpp/build.gradle3
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/s2s/Connection.java7
2 files changed, 6 insertions, 4 deletions
diff --git a/juick-xmpp/build.gradle b/juick-xmpp/build.gradle
index 1bd0aa62..3f2a5ede 100644
--- a/juick-xmpp/build.gradle
+++ b/juick-xmpp/build.gradle
@@ -5,7 +5,8 @@ apply plugin: 'org.akhikhl.gretty'
dependencies {
compile project(':juick-server-jdbc')
compile project(':juick-server-web')
- compile 'com.github.juick:com.juick.xmpp:483936e0bd'
+ compile 'com.github.juick:com.juick.xmpp:2283c14183'
+ providedCompile 'xpp3:xpp3_min:1.1.4c'
testCompile project(path: ':juick-core', configuration: 'testArtifacts')
testCompile project(path: ':juick-server-web', configuration: 'testArtifacts')
testCompile project(path: ':juick-server-jdbc', configuration: 'testArtifacts')
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);