camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [1/2] camel git commit: Fix formatting
Date Wed, 02 Nov 2016 08:46:14 GMT
Repository: camel
Updated Branches:
  refs/heads/master b86cc8e41 -> 03717f7fb


Fix formatting


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

Branch: refs/heads/master
Commit: 03717f7fbfee2f5aeccf161f3cd9adb77640b6e5
Parents: ca48598
Author: Allan C <allancth@gmail.com>
Authored: Wed Nov 2 16:37:05 2016 +0800
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Wed Nov 2 09:44:32 2016 +0100

----------------------------------------------------------------------
 .../component/xmpp/XmppDirectProducer.java      | 45 ++++++++++----------
 1 file changed, 23 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/03717f7f/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppDirectProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppDirectProducer.java
b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppDirectProducer.java
index bcf6312..f655a4b 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppDirectProducer.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppDirectProducer.java
@@ -26,20 +26,20 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class XmppDirectProducer extends DefaultProducer {
-    
-	private static final transient Logger LOG = LoggerFactory.getLogger(XmppDirectProducer.class);
-    
-	private final XmppEndpoint endpoint;
-	
-	private XMPPConnection connection;
 
-	public XmppDirectProducer(XmppEndpoint endpoint) {
+    private static final transient Logger LOG = LoggerFactory.getLogger(XmppDirectProducer.class);
+
+    private final XmppEndpoint endpoint;
+
+    private XMPPConnection connection;
+
+    public XmppDirectProducer(XmppEndpoint endpoint) {
         super(endpoint);
         this.endpoint = endpoint;
-	}
+    }
 
-	@Override
-	public void process(Exchange exchange) throws Exception {
+    @Override
+    public void process(Exchange exchange) throws Exception {
         try {
             if (connection == null) {
                 connection = endpoint.createConnection();
@@ -54,8 +54,9 @@ public class XmppDirectProducer extends DefaultProducer {
                 connection.connect();
             }
         } catch (XMPPException e) {
-            throw new RuntimeExchangeException("Cannot connect to XMPP Server: " + 
-            								   ((connection != null) ? XmppEndpoint.getConnectionMessage(connection)
: endpoint.getHost()), exchange, e);
+            throw new RuntimeExchangeException("Cannot connect to XMPP Server: "
+                    + ((connection != null) ? XmppEndpoint.getConnectionMessage(connection)
: endpoint.getHost()),
+                    exchange, e);
         }
 
         try {
@@ -64,21 +65,21 @@ public class XmppDirectProducer extends DefaultProducer {
                 connection.sendPacket((Packet) body);
 
             } else if (body instanceof Packet[]) {
-            	final Packet[] packets = (Packet[]) body;
-            	for (final Packet packet : packets) {
+                final Packet[] packets = (Packet[]) body;
+                for (final Packet packet : packets) {
                     connection.sendPacket(packet);
-            	}
-            	
+                }
+
             } else {
                 throw new Exception("Body does not contain Packet/Packet[] object(s)");
             }
         } catch (XMPPException xmppe) {
-            throw new RuntimeExchangeException("Cannot send XMPP direct: from " + endpoint.getUser()
+ 
-            								   " to: " + XmppEndpoint.getConnectionMessage(connection), exchange,
xmppe);
-            
+            throw new RuntimeExchangeException("Cannot send XMPP direct: from " + endpoint.getUser()
+ " to: "
+                    + XmppEndpoint.getConnectionMessage(connection), exchange, xmppe);
+
         } catch (Exception e) {
-            throw new RuntimeExchangeException("Cannot send XMPP direct: from " + endpoint.getUser()
+ 
-            								   " to: " + XmppEndpoint.getConnectionMessage(connection), exchange,
e);
+            throw new RuntimeExchangeException("Cannot send XMPP direct: from " + endpoint.getUser()
+ " to: "
+                    + XmppEndpoint.getConnectionMessage(connection), exchange, e);
         }
-	}
+    }
 }


Mime
View raw message