camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/4] camel git commit: Fixed CS
Date Fri, 21 Apr 2017 19:11:25 GMT
Fixed CS


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

Branch: refs/heads/master
Commit: 5bc22d1f1c94f633ac9499ddbf7f20f546c73883
Parents: 7c60d20
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Apr 21 21:01:52 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Apr 21 21:04:47 2017 +0200

----------------------------------------------------------------------
 .../example/kubernetes/fmp/CqlPopulateBean.java | 20 +++---
 .../example/kubernetes/fmp/HazelcastRoute.java  | 68 ++++++++++----------
 .../camel/example/kafka/StringPartitioner.java  |  6 +-
 .../apache/camel/example/mention/Contact.java   |  7 +-
 ...ponentConfigurationAndDocumentationTest.java |  6 +-
 ...nguageConfigurationAndDocumentationTest.java |  3 +-
 6 files changed, 57 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5bc22d1f/examples/camel-example-cassandra-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/CqlPopulateBean.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-cassandra-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/CqlPopulateBean.java
b/examples/camel-example-cassandra-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/CqlPopulateBean.java
index d2b589a..8df7777 100644
--- a/examples/camel-example-cassandra-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/CqlPopulateBean.java
+++ b/examples/camel-example-cassandra-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/CqlPopulateBean.java
@@ -20,15 +20,15 @@ import com.datastax.driver.core.Cluster;
 import com.datastax.driver.core.Session;
 
 public class CqlPopulateBean {
-	
-	public void populate() {
-		Cluster cluster = Cluster.builder().addContactPoint("cassandra").build();
-		Session session = cluster.connect();
-		session.execute("create keyspace if not exists test with replication = {'class':'SimpleStrategy',
'replication_factor':1};");
-		session.execute("create table if not exists test.users ( id int primary key, name text
);");
-		session.execute("insert into test.users (id,name) values (1, 'oscerd') if not exists;");
-		session.close();
-		cluster.close();
-	}
+
+    public void populate() {
+        Cluster cluster = Cluster.builder().addContactPoint("cassandra").build();
+        Session session = cluster.connect();
+        session.execute("create keyspace if not exists test with replication = {'class':'SimpleStrategy',
'replication_factor':1};");
+        session.execute("create table if not exists test.users ( id int primary key, name
text );");
+        session.execute("insert into test.users (id,name) values (1, 'oscerd') if not exists;");
+        session.close();
+        cluster.close();
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/5bc22d1f/examples/camel-example-hazelcast-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/HazelcastRoute.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-hazelcast-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/HazelcastRoute.java
b/examples/camel-example-hazelcast-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/HazelcastRoute.java
index d11cae6..b851680 100644
--- a/examples/camel-example-hazelcast-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/HazelcastRoute.java
+++ b/examples/camel-example-hazelcast-kubernetes/src/main/java/org/apache/camel/example/kubernetes/fmp/HazelcastRoute.java
@@ -18,47 +18,47 @@ package org.apache.camel.example.kubernetes.fmp;
 
 import java.util.UUID;
 
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.hazelcast.HazelcastComponent;
-import org.apache.camel.component.hazelcast.HazelcastConstants;
-
 import com.hazelcast.client.HazelcastClient;
 import com.hazelcast.client.config.ClientConfig;
 import com.hazelcast.config.GroupConfig;
 import com.hazelcast.config.SSLConfig;
 import com.hazelcast.core.HazelcastInstance;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.hazelcast.HazelcastComponent;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
 
 public class HazelcastRoute extends RouteBuilder {
 
-	@Override
-	public void configure() throws Exception {
-		
-		HazelcastComponent component = new HazelcastComponent();
-		ClientConfig config = new ClientConfig();
-		config.getNetworkConfig().addAddress("hazelcast");
-		config.getNetworkConfig().setSSLConfig(new SSLConfig().setEnabled(false));
-                config.setGroupConfig(new GroupConfig("someGroup"));
-		HazelcastInstance instance = HazelcastClient.newHazelcastClient(config);
-		component.setHazelcastInstance(instance);
-		getContext().addComponent("hazelcast", component);
-		
-		from("timer:foo?period=5000")
-		    .log("Producer side: Sending data to Hazelcast topic..")
-		    .process(new Processor() {
-				
-				@Override
-				public void process(Exchange exchange) throws Exception {
-					exchange.getIn().setHeader(HazelcastConstants.OPERATION, HazelcastConstants.PUBLISH_OPERATION);
-					String payload = "Test " + UUID.randomUUID();
-					exchange.getIn().setBody(payload);
-				}
-			})
-		    .to("hazelcast:topic:foo");
-		
-		from("hazelcast:topic:foo")
-	        .log("Consumer side: Detected following action: $simple{in.header.CamelHazelcastListenerAction}");
-	}
+    @Override
+    public void configure() throws Exception {
+        // setup hazelcast
+        ClientConfig config = new ClientConfig();
+        config.getNetworkConfig().addAddress("hazelcast");
+        config.getNetworkConfig().setSSLConfig(new SSLConfig().setEnabled(false));
+        config.setGroupConfig(new GroupConfig("someGroup"));
+        HazelcastInstance instance = HazelcastClient.newHazelcastClient(config);
+
+        // setup camel hazelcast
+        HazelcastComponent hazelcast = new HazelcastComponent();
+        hazelcast.setHazelcastInstance(instance);
+        getContext().addComponent("hazelcast", hazelcast);
+
+        from("timer:foo?period=5000")
+            .log("Producer side: Sending data to Hazelcast topic..")
+            .process(new Processor() {
+                @Override
+                public void process(Exchange exchange) throws Exception {
+                    exchange.getIn().setHeader(HazelcastConstants.OPERATION, HazelcastConstants.PUBLISH_OPERATION);
+                    String payload = "Test " + UUID.randomUUID();
+                    exchange.getIn().setBody(payload);
+                }
+            })
+            .to("hazelcast:topic:foo");
+
+        from("hazelcast:topic:foo")
+            .log("Consumer side: Detected following action: $simple{in.header.CamelHazelcastListenerAction}");
+    }
 
 } 

http://git-wip-us.apache.org/repos/asf/camel/blob/5bc22d1f/examples/camel-example-kafka/src/main/java/org/apache/camel/example/kafka/StringPartitioner.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-kafka/src/main/java/org/apache/camel/example/kafka/StringPartitioner.java
b/examples/camel-example-kafka/src/main/java/org/apache/camel/example/kafka/StringPartitioner.java
index 0566bd1..77f5bfd 100644
--- a/examples/camel-example-kafka/src/main/java/org/apache/camel/example/kafka/StringPartitioner.java
+++ b/examples/camel-example-kafka/src/main/java/org/apache/camel/example/kafka/StringPartitioner.java
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

http://git-wip-us.apache.org/repos/asf/camel/blob/5bc22d1f/examples/camel-example-twitter-salesforce/src/main/java/org/apache/camel/example/mention/Contact.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-twitter-salesforce/src/main/java/org/apache/camel/example/mention/Contact.java
b/examples/camel-example-twitter-salesforce/src/main/java/org/apache/camel/example/mention/Contact.java
index 220c912..abf7088 100644
--- a/examples/camel-example-twitter-salesforce/src/main/java/org/apache/camel/example/mention/Contact.java
+++ b/examples/camel-example-twitter-salesforce/src/main/java/org/apache/camel/example/mention/Contact.java
@@ -21,11 +21,10 @@
  */
 package org.apache.camel.example.mention;
 
-import org.apache.camel.component.salesforce.api.dto.AbstractDescribedSObjectBase;
-import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.camel.component.salesforce.api.dto.AbstractDescribedSObjectBase;
+import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
 
 /**
  * Contact Data Transfer Object (DTO) needed for Salesforce component.
@@ -36,6 +35,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
  * and generates {@link AbstractDescribedSObjectBase} based classes,
  * which are needed for some of the operations (like composite API).
  */
+// CHECKSTYLE:OFF
 public class Contact extends AbstractSObjectBase {
 
     @JsonProperty("LastName")
@@ -59,3 +59,4 @@ public class Contact extends AbstractSObjectBase {
         this.screenName = screenName;
     }
 }
+// CHECKSTYLE:ON

http://git-wip-us.apache.org/repos/asf/camel/blob/5bc22d1f/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
index a316e3b..95c62af 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/FtpComponentConfigurationAndDocumentationTest.java
@@ -42,8 +42,10 @@ public class FtpComponentConfigurationAndDocumentationTest extends CamelTestSupp
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
-        assertTrue(json.contains("\"minDepth\": { \"kind\": \"parameter\", \"displayName\":
\"Min Depth\", \"group\": \"filter\", \"label\": \"consumer,filter\", \"type\": \"integer\",
\"javaType\": \"int\""));
-        assertTrue(json.contains("\"username\": { \"kind\": \"parameter\", \"displayName\":
\"Username\", \"group\": \"security\", \"label\": \"security\", \"type\": \"string\""));
+        assertTrue(json.contains("\"minDepth\": { \"kind\": \"parameter\", \"displayName\":
\"Min Depth\", \"group\": \"filter\""
+            + ", \"label\": \"consumer,filter\", \"type\": \"integer\", \"javaType\": \"int\""));
+        assertTrue(json.contains("\"username\": { \"kind\": \"parameter\", \"displayName\":
\"Username\", \"group\": \"security\""
+            + ", \"label\": \"security\", \"type\": \"string\""));
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/5bc22d1f/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
index bd8e839..7064ed2 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/doc/SimpleLanguageConfigurationAndDocumentationTest.java
@@ -37,7 +37,8 @@ public class SimpleLanguageConfigurationAndDocumentationTest extends CamelTestSu
 
         assertTrue(json.contains("\"name\": \"simple\""));
         assertTrue(json.contains("\"modelName\": \"simple\""));
-        assertTrue(json.contains("\"resultType\": { \"kind\": \"attribute\", \"displayName\":
\"Result Type\", \"required\": false, \"type\": \"string\", \"javaType\": \"java.lang.String\",
\"deprecated\": false"));
+        assertTrue(json.contains("\"resultType\": { \"kind\": \"attribute\", \"displayName\":
\"Result Type\", \"required\": false, \"type\": \"string\""
+            + ", \"javaType\": \"java.lang.String\", \"deprecated\": false"));
     }
 
 }


Mime
View raw message