[camel] branch master updated: Upgrade Smack to version 4.3.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: Upgrade Smack to version 4.3.0

acosentino
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new bbd58e6  Upgrade Smack to version 4.3.0
bbd58e6 is described below

commit bbd58e6594a6b96334f9e0a4ca7eb612d8b70fed
Author: Andrea Cosentino <[hidden email]>
AuthorDate: Fri Aug 3 13:21:40 2018 +0200

    Upgrade Smack to version 4.3.0
---
 .../main/java/org/apache/camel/component/xmpp/XmppEndpoint.java   | 8 ++++----
 .../src/main/java/org/apache/camel/component/xmpp/XmppLogger.java | 2 +-
 parent/pom.xml                                                    | 3 ++-
 platforms/karaf/features/src/main/resources/features.xml          | 1 +
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
index 45c5803..ffee678 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
@@ -41,8 +41,8 @@ import org.jivesoftware.smack.XMPPConnection;
 import org.jivesoftware.smack.XMPPException;
 import org.jivesoftware.smack.XMPPException.XMPPErrorException;
 import org.jivesoftware.smack.packet.Stanza;
-import org.jivesoftware.smack.packet.XMPPError;
-import org.jivesoftware.smack.packet.XMPPError.Condition;
+import org.jivesoftware.smack.packet.StanzaError;
+import org.jivesoftware.smack.packet.StanzaError.Condition;
 import org.jivesoftware.smack.tcp.XMPPTCPConnection;
 import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
 import org.jivesoftware.smackx.iqregister.AccountManager;
@@ -252,7 +252,7 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
         List<DomainBareJid> xmppServiceDomains = multiUserChatManager.getXMPPServiceDomains();
         if (xmppServiceDomains.isEmpty()) {
             throw new XMPPErrorException(null,
-                    XMPPError.from(Condition.item_not_found, "Cannot find any XMPPServiceDomain by MultiUserChatManager on connection: " + getConnectionMessage(connection)).build());
+                    StanzaError.from(Condition.item_not_found, "Cannot find any XMPPServiceDomain by MultiUserChatManager on connection: " + getConnectionMessage(connection)).build());
         }
 
         return room + "@" + xmppServiceDomains.iterator().next();
@@ -263,7 +263,7 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
     }
 
     public static String getConnectionMessage(XMPPConnection connection) {
-        return connection.getHost() + ":" + connection.getPort() + "/" + connection.getServiceName();
+        return connection.getHost() + ":" + connection.getPort() + "/" + connection.getXMPPServiceDomain();
     }
 
     public String getChatId() {
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppLogger.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppLogger.java
index 17c6d68..5dbcd0b 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppLogger.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppLogger.java
@@ -32,7 +32,7 @@ public class XmppLogger implements StanzaListener {
 
     public void processStanza(Stanza stanza) {
         if (LOG.isDebugEnabled()) {
-            LOG.debug("{} : {}", direction, stanza.toXML());
+            LOG.debug("{} : {}", direction, stanza.toXML(null));
         }
     }
 }
diff --git a/parent/pom.xml b/parent/pom.xml
index cca2e41..e9690fb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -500,6 +500,7 @@
     <mina-bundle-version>1.1.7_6</mina-bundle-version>
     <mina-version>1.1.7</mina-version>
     <mina2-version>2.0.17</mina2-version>
+    <minidns-version>0.3.1</minidns-version>
     <minimal-json-version>0.9.4</minimal-json-version>
     <mock-javamail-version>1.9</mock-javamail-version>
     <mockwebserver-version>0.0.17</mockwebserver-version>
@@ -620,7 +621,7 @@
     <sip-api-version>1.1</sip-api-version>
     <slf4j-api-version>1.7.25</slf4j-api-version>
     <slf4j-version>1.7.25</slf4j-version>
-    <smack-version>4.2.4</smack-version>
+    <smack-version>4.3.0</smack-version>
     <snakeyaml-version>1.21</snakeyaml-version>
     <snappy-version>1.1.4</snappy-version>
     <snmp4j-version>2.6.2_1</snmp4j-version>
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index 25fb95b..08d2d41 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -2441,6 +2441,7 @@
     <bundle dependency='true'>mvn:org.igniterealtime.smack/smack-java7/${smack-version}</bundle>
     <bundle dependency='true'>mvn:org.igniterealtime.smack/smack-im/${smack-version}</bundle>
     <bundle dependency='true'>mvn:org.igniterealtime.smack/smack-tcp/${smack-version}</bundle>
+    <bundle dependency='true'>wrap:mvn:org.minidns/minidns-core/${minidns-version}</bundle>
     <bundle>mvn:org.apache.camel/camel-xmpp/${project.version}</bundle>
   </feature>
   <feature name='camel-xstream' version='${project.version}' resolver='(obr)' start-level='50'>