camel git commit: CAMEL-10544: Polish & fix CS violations

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

camel git commit: CAMEL-10544: Polish & fix CS violations

bvahdat
Repository: camel
Updated Branches:
  refs/heads/master 341e66ecd -> 572f3cee3


CAMEL-10544: Polish & fix CS violations


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/572f3cee
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/572f3cee
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/572f3cee

Branch: refs/heads/master
Commit: 572f3cee35fe7098b53d056a647abbed839f82f7
Parents: 341e66e
Author: Babak Vahdat <[hidden email]>
Authored: Thu May 18 21:14:51 2017 +0200
Committer: Babak Vahdat <[hidden email]>
Committed: Thu May 18 21:14:51 2017 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/xmpp/XmppBinding.java    |  4 ++--
 .../org/apache/camel/component/xmpp/XmppConsumer.java   | 12 +++++-------
 .../camel/component/xmpp/XmppGroupChatProducer.java     |  8 ++++----
 .../camel/component/xmpp/EmbeddedXmppTestServer.java    |  7 +++----
 4 files changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/572f3cee/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppBinding.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppBinding.java
index 202c947..b6f0a02 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppBinding.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppBinding.java
@@ -75,7 +75,7 @@ public class XmppBinding {
                 } else {
                     try {
                         JivePropertiesManager.addProperty(message, name, value);
-                        LOG.trace("Added property name: {} value: {}", name, value.toString());
+                        LOG.trace("Added property name: {} value: {}", name, value);
                     } catch (IllegalArgumentException iae) {
                         if (LOG.isDebugEnabled()) {
                             LOG.debug("Cannot add property " + name + " to XMPP message due: ", iae);
@@ -102,7 +102,7 @@ public class XmppBinding {
             if (!headerFilterStrategy.applyFilterToCamelHeaders(name, value, exchange)) {
                 try {
                     JivePropertiesManager.addProperty(stanza, name, value);
-                    LOG.debug("Added property name: " + name + " value: " + value.toString());
+                    LOG.debug("Added property name: " + name + " value: " + value);
                 } catch (IllegalArgumentException iae) {
                     LOG.debug("Not adding property " + name + " to XMPP message due to " + iae);
                 }

http://git-wip-us.apache.org/repos/asf/camel/blob/572f3cee/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
index 22b9347..31b0502 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppConsumer.java
@@ -103,11 +103,11 @@ public class XmppConsumer extends DefaultConsumer implements IncomingChatMessage
             MultiUserChatManager mucm = MultiUserChatManager.getInstanceFor(connection);
             muc = mucm.getMultiUserChat(JidCreate.entityBareFrom(endpoint.resolveRoom(connection)));
             muc.addMessageListener(this);
-            MucEnterConfiguration mucc = muc.getEnterConfigurationBuilder(Resourcepart.from(endpoint.getNickname())).requestNoHistory().build();
+            MucEnterConfiguration mucc = muc.getEnterConfigurationBuilder(Resourcepart.from(endpoint.getNickname()))
+                    .requestNoHistory()
+                    .build();
             muc.join(mucc);
-            if (LOG.isInfoEnabled()) {
-                LOG.info("Joined room: {} as: {}", muc.getRoom(), endpoint.getNickname());
-            }
+            LOG.info("Joined room: {} as: {}", muc.getRoom(), endpoint.getNickname());
         }
 
         this.startRobustConnectionMonitor();
@@ -176,9 +176,7 @@ public class XmppConsumer extends DefaultConsumer implements IncomingChatMessage
         }
 
         if (muc != null) {
-            if (LOG.isInfoEnabled()) {
-                LOG.info("Leaving room: {}", muc.getRoom());
-            }
+            LOG.info("Leaving room: {}", muc.getRoom());
             muc.removeMessageListener(this);
             muc.leave();
             muc = null;

http://git-wip-us.apache.org/repos/asf/camel/blob/572f3cee/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppGroupChatProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppGroupChatProducer.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppGroupChatProducer.java
index 9b8ee7a..3042636 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppGroupChatProducer.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppGroupChatProducer.java
@@ -126,11 +126,11 @@ public class XmppGroupChatProducer extends DefaultProducer {
             room = endpoint.resolveRoom(connection);
             MultiUserChatManager chatManager = MultiUserChatManager.getInstanceFor(connection);
             chat = chatManager.getMultiUserChat(JidCreate.entityBareFrom(room));
-            MucEnterConfiguration mucc = chat.getEnterConfigurationBuilder(Resourcepart.from(endpoint.getNickname())).requestNoHistory().build();
+            MucEnterConfiguration mucc = chat.getEnterConfigurationBuilder(Resourcepart.from(endpoint.getNickname()))
+                    .requestNoHistory()
+                    .build();
             chat.join(mucc);
-            if (LOG.isInfoEnabled()) {
-                LOG.info("Joined room: {} as: {}", room, endpoint.getNickname());
-            }
+            LOG.info("Joined room: {} as: {}", room, endpoint.getNickname());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/572f3cee/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
index 78cc419..b252f90 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
@@ -22,6 +22,9 @@ import java.security.KeyStore;
 import java.security.SecureRandom;
 import java.util.Arrays;
 
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
+
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.vysper.mina.TCPEndpoint;
@@ -39,10 +42,6 @@ import org.apache.vysper.xmpp.server.XMPPServer;
 import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
 import org.jxmpp.jid.impl.JidCreate;
 
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManagerFactory;
-
-
 public final class EmbeddedXmppTestServer {
 
     private static EmbeddedXmppTestServer instance;