You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/03/31 07:18:55 UTC

svn commit: r642879 - in /activemq/camel/trunk/components: camel-bam/src/main/java/org/apache/camel/bam/processor/ camel-csv/src/test/java/org/apache/camel/dataformat/csv/ camel-jms/src/main/java/org/apache/camel/component/jms/ camel-spring/src/main/ja...

Author: ningjiang
Date: Sun Mar 30 22:18:36 2008
New Revision: 642879

URL: http://svn.apache.org/viewvc?rev=642879&view=rev
Log:
Fixed more CS errors of the camel components

Modified:
    activemq/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
    activemq/camel/trunk/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
    activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java
    activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java
    activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java
    activemq/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlRouteTest.java
    activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/Main.java
    activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingBrowser.java
    activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingComponent.java
    activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/ExampleSender.java
    activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/UFaceTest.java
    activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceBrowser.java
    activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceComponent.java
    activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceEndpoint.java
    activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/ExampleSender.java
    activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/UFaceTest.java

Modified: activemq/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java (original)
+++ activemq/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessorSupport.java Sun Mar 30 22:18:36 2008
@@ -42,7 +42,7 @@
 public class JpaBamProcessorSupport<T> extends BamProcessorSupport<T> {
     private static final transient Log LOG = LogFactory.getLog(JpaBamProcessorSupport.class);
 
-    private static final Lock lock = new ReentrantLock(); // lock used for concurrency issues
+    private static final Lock LOCK = new ReentrantLock(); // lock used for concurrency issues
     private ActivityRules activityRules;
     private JpaTemplate template;
     private String findByKeyQuery;
@@ -110,7 +110,7 @@
     // Implementatiom methods
     // -----------------------------------------------------------------------
     protected T loadEntity(Exchange exchange, Object key) throws Exception {
-        lock.lock();
+        LOCK.lock();
         try {
             T entity = findEntityByCorrelationKey(key);
             if (entity == null) {
@@ -129,7 +129,7 @@
             }
             return entity;
         } finally {
-            lock.unlock();
+            LOCK.unlock();
         }
     }
 

Modified: activemq/camel/trunk/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvRouteTest.java Sun Mar 30 22:18:36 2008
@@ -14,6 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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
+ *
+ *      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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.dataformat.csv;
 
 import java.util.HashMap;
@@ -57,7 +73,7 @@
             assertEquals("text body", "abc,123", text.trim());
         }
     }
-    
+
     public void testUnMarshal() throws Exception {
         MockEndpoint endpoint = getMockEndpoint("mock:daltons");
         endpoint.expectedMessageCount(1);
@@ -66,9 +82,8 @@
         // START SNIPPET : unmarshalResult
         List<List<String>> data = (List<List<String>>) exchange.getIn().getBody();
         for (List<String> line : data) {
-            LOG.debug(
-              String.format("%s has an IQ of %s and is currently %s",
-                            line.get(0), line.get(1), line.get(2)));
+            LOG.debug(String.format("%s has an IQ of %s and is currently %s",
+                                    line.get(0), line.get(1), line.get(2)));
         }
         // END SNIPPET : unmarshalResult
     }
@@ -78,14 +93,14 @@
             public void configure() {
                 // START SNIPPET: marshalRoute
                 from("direct:start").
-                   marshal().csv().
-                   to("mock:result");
+                    marshal().csv().
+                    to("mock:result");
                 // END SNIPPET: marshalRoute
-                
+
                 // START SNIPPET: unmarshalRoute
                 from("file:src/test/resources/daltons.csv?noop=true").
-                   unmarshal().csv().
-                   to("mock:daltons");
+                    unmarshal().csv().
+                    to("mock:daltons");
                 // END SNIPPET: unmarshalRoute
             }
         };

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java Sun Mar 30 22:18:36 2008
@@ -18,7 +18,6 @@
 
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.TimeUnit;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeoutException;
 
 import javax.jms.Destination;
@@ -99,13 +98,11 @@
                     } else {
                         message = (Message)future.get(requestTimeout, TimeUnit.MILLISECONDS);
                     }
-                }
-                catch (InterruptedException e) {
+                } catch (InterruptedException e) {
                     if (LOG.isDebugEnabled()) {
                         LOG.debug("Future interupted: " + e, e);
                     }
-                }
-                catch (TimeoutException e) {
+                } catch (TimeoutException e) {
                     if (LOG.isDebugEnabled()) {
                         LOG.debug("Future timed out: " + e, e);
                     }

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java Sun Mar 30 22:18:36 2008
@@ -346,7 +346,7 @@
     }
 
     protected void postProcessContext() throws Exception {
-        Map<String,SpringCamelContext> map = applicationContext.getBeansOfType(SpringCamelContext.class);
+        Map<String, SpringCamelContext> map = applicationContext.getBeansOfType(SpringCamelContext.class);
         Set<Map.Entry<String, SpringCamelContext>> entries = map.entrySet();
         int size = entries.size();
         for (Map.Entry<String, SpringCamelContext> entry : entries) {
@@ -360,7 +360,8 @@
                     outputDir += "/" + name;
                 }
                 RouteDotGenerator generator = new RouteDotGenerator(outputDir);
-                LOG.info("Generating DOT file for routes: " + outputDir + " for: " + camelContext + " with name: " + name);
+                LOG.info("Generating DOT file for routes: " + outputDir + " for: " + camelContext
+                         + " with name: " + name);
                 generator.drawRoutes(camelContext);
             }
             postProcesCamelContext(camelContext);

Modified: activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java (original)
+++ activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlComponent.java Sun Mar 30 22:18:36 2008
@@ -11,7 +11,7 @@
  * 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.
- * See the License for the specific language governing pejdbcssions and
+ * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package org.apache.camel.component.sql;
@@ -30,23 +30,22 @@
  */
 public class SqlComponent extends DefaultComponent<DefaultExchange> {
 
-	private DataSource dataSource;
+    private DataSource dataSource;
 
-	public SqlComponent() {
-	}
+    public SqlComponent() {
+    }
 
-	public SqlComponent(CamelContext context) {
-		super(context);
-	}
-
-	@Override
-	protected Endpoint<DefaultExchange> createEndpoint(String uri,
-			String remaining, Map parameters) throws Exception {
-		return new SqlEndpoint(uri, remaining.replaceAll("#", "?"), this,
-				dataSource);
-	}
-
-	public void setDataSource(DataSource dataSource) {
-		this.dataSource = dataSource;
-	}
+    public SqlComponent(CamelContext context) {
+        super(context);
+    }
+
+    @Override
+    protected Endpoint<DefaultExchange> createEndpoint(String uri, String remaining, Map parameters)
+        throws Exception {
+        return new SqlEndpoint(uri, remaining.replaceAll("#", "?"), this, dataSource);
+    }
+
+    public void setDataSource(DataSource dataSource) {
+        this.dataSource = dataSource;
+    }
 }

Modified: activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java Sun Mar 30 22:18:36 2008
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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
+ *
+ *      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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.component.sql;
 
 import javax.sql.DataSource;
@@ -11,38 +27,34 @@
 import org.springframework.jdbc.core.JdbcTemplate;
 
 /**
- * SQL Endpoint.
- * 
- * Endpoint URI should contain valid SQL statement, but instead of question
- * marks (that are parameter placeholders), sharp signs should be used. This is
- * because in camel question mark has other meaning.
- * 
+ * SQL Endpoint. Endpoint URI should contain valid SQL statement, but instead of
+ * question marks (that are parameter placeholders), sharp signs should be used.
+ * This is because in camel question mark has other meaning.
+ *
  * @author romkal
  */
 public class SqlEndpoint extends DefaultEndpoint<DefaultExchange> {
 
-	private JdbcTemplate jdbcTemplate;
+    private JdbcTemplate jdbcTemplate;
 
-	private String query;
+    private String query;
 
-	public SqlEndpoint(String uri, String query, Component component,
-			DataSource dataSource) {
-		super(uri, component);
-		this.jdbcTemplate = new JdbcTemplate(dataSource);
-		this.query = query;
-	}
-
-	public Consumer<DefaultExchange> createConsumer(Processor arg0)
-			throws Exception {
-		throw new UnsupportedOperationException("Not yet implemented");
-	}
-
-	public Producer<DefaultExchange> createProducer() throws Exception {
-		return new SqlProducer(this, query, jdbcTemplate);
-	}
-
-	public boolean isSingleton() {
-		return false;
-	}
+    public SqlEndpoint(String uri, String query, Component component, DataSource dataSource) {
+        super(uri, component);
+        this.jdbcTemplate = new JdbcTemplate(dataSource);
+        this.query = query;
+    }
+
+    public Consumer<DefaultExchange> createConsumer(Processor arg0) throws Exception {
+        throw new UnsupportedOperationException("Not yet implemented");
+    }
+
+    public Producer<DefaultExchange> createProducer() throws Exception {
+        return new SqlProducer(this, query, jdbcTemplate);
+    }
+
+    public boolean isSingleton() {
+        return false;
+    }
 
 }

Modified: activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java (original)
+++ activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java Sun Mar 30 22:18:36 2008
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * 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
+ *
+ *      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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.component.sql;
 
 import java.util.ArrayList;
@@ -11,26 +27,24 @@
 
 public class SqlProducer extends DefaultProducer<DefaultExchange> {
 
-	private String query;
+    private String query;
 
-	private JdbcTemplate jdbcTemplate;
+    private JdbcTemplate jdbcTemplate;
 
-	public SqlProducer(SqlEndpoint endpoint, String query,
-			JdbcTemplate jdbcTemplate) {
-		super(endpoint);
-		this.jdbcTemplate = jdbcTemplate;
-		this.query = query;
-	}
-
-	public void process(Exchange exchange) throws Exception {
-		List<Object> arguments = new ArrayList<Object>();
-		for (Iterator<?> i = exchange.getIn().getBody(Iterator.class);
-				i.hasNext();) {
-			arguments.add(i.next());
-		}
-
-		List result = jdbcTemplate.queryForList(query, arguments.toArray());
-		exchange.getOut().setBody(result);
-	}
+    public SqlProducer(SqlEndpoint endpoint, String query, JdbcTemplate jdbcTemplate) {
+        super(endpoint);
+        this.jdbcTemplate = jdbcTemplate;
+        this.query = query;
+    }
+
+    public void process(Exchange exchange) throws Exception {
+        List<Object> arguments = new ArrayList<Object>();
+        for (Iterator<?> i = exchange.getIn().getBody(Iterator.class); i.hasNext();) {
+            arguments.add(i.next());
+        }
+
+        List result = jdbcTemplate.queryForList(query, arguments.toArray());
+        exchange.getOut().setBody(result);
+    }
 
 }

Modified: activemq/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlRouteTest.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlRouteTest.java Sun Mar 30 22:18:36 2008
@@ -36,86 +36,81 @@
     protected String url = "jdbc:hsqldb:mem:camel_jdbc";
     protected String user = "sa";
     protected String password = "";
-	private DataSource ds;
+    private DataSource ds;
 
     public void testSimpleBody() throws Exception {
-    	MockEndpoint mock = getMockEndpoint("mock:result");
-    	mock.expectedMessageCount(1);
-    	template.sendBody("direct:simple", "GPL");
-    	mock.assertIsSatisfied();
-    	List received = assertIsInstanceOf(List.class,
-    			mock.getReceivedExchanges().get(0).getIn().getBody());
-    	Map row = assertIsInstanceOf(Map.class, received.get(0));
-    	assertEquals("Linux", row.get("PROJECT"));
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+        template.sendBody("direct:simple", "GPL");
+        mock.assertIsSatisfied();
+        List received = assertIsInstanceOf(List.class, mock.getReceivedExchanges().get(0).getIn().getBody());
+        Map row = assertIsInstanceOf(Map.class, received.get(0));
+        assertEquals("Linux", row.get("PROJECT"));
     }
 
     public void testListBody() throws Exception {
-    	MockEndpoint mock = getMockEndpoint("mock:result");
-    	mock.expectedMessageCount(1);
-    	List<Object> body = new ArrayList<Object>();
-    	body.add("ASF");
-    	body.add("Camel");
-    	template.sendBody("direct:list", body);
-    	mock.assertIsSatisfied();
-    	List received = assertIsInstanceOf(List.class,
-    			mock.getReceivedExchanges().get(0).getIn().getBody());
-    	Map row = assertIsInstanceOf(Map.class, received.get(0));
-    	assertEquals(1, row.get("ID"));
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+        List<Object> body = new ArrayList<Object>();
+        body.add("ASF");
+        body.add("Camel");
+        template.sendBody("direct:list", body);
+        mock.assertIsSatisfied();
+        List received = assertIsInstanceOf(List.class, mock.getReceivedExchanges().get(0).getIn().getBody());
+        Map row = assertIsInstanceOf(Map.class, received.get(0));
+        assertEquals(1, row.get("ID"));
     }
-    
+
     public void testListResult() throws Exception {
-    	MockEndpoint mock = getMockEndpoint("mock:result");
-    	mock.expectedMessageCount(1);
-    	List<Object> body = new ArrayList<Object>();
-    	body.add("ASF");
-    	template.sendBody("direct:simple", body);
-    	mock.assertIsSatisfied();
-    	List received = assertIsInstanceOf(List.class,
-    			mock.getReceivedExchanges().get(0).getIn().getBody());
-    	assertEquals(2, received.size());
-    	Map row1 = assertIsInstanceOf(Map.class, received.get(0));
-    	assertEquals("Camel", row1.get("PROJECT"));
-    	Map row2 = assertIsInstanceOf(Map.class, received.get(1));
-    	assertEquals("AMQ", row2.get("PROJECT"));
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+        List<Object> body = new ArrayList<Object>();
+        body.add("ASF");
+        template.sendBody("direct:simple", body);
+        mock.assertIsSatisfied();
+        List received = assertIsInstanceOf(List.class, mock.getReceivedExchanges().get(0).getIn().getBody());
+        assertEquals(2, received.size());
+        Map row1 = assertIsInstanceOf(Map.class, received.get(0));
+        assertEquals("Camel", row1.get("PROJECT"));
+        Map row2 = assertIsInstanceOf(Map.class, received.get(1));
+        assertEquals("AMQ", row2.get("PROJECT"));
     }
-    
+
     protected void setUp() throws Exception {
-    	Class.forName(driverClass);
+        Class.forName(driverClass);
         super.setUp();
-        
+
         JdbcTemplate jdbcTemplate = new JdbcTemplate(ds);
         jdbcTemplate.execute("create table projects (id integer primary key,"
-        		+ "project varchar(10), license varchar(5))");
+                             + "project varchar(10), license varchar(5))");
         jdbcTemplate.execute("insert into projects values (1, 'Camel', 'ASF')");
         jdbcTemplate.execute("insert into projects values (2, 'AMQ', 'ASF')");
         jdbcTemplate.execute("insert into projects values (3, 'Linux', 'GPL')");
     }
 
     protected void tearDown() throws Exception {
-    	super.tearDown();
-    	JdbcTemplate jdbcTemplate = new JdbcTemplate(ds);
-    	jdbcTemplate.execute("drop table projects");
-    }
-    
-	@Override
-	protected RouteBuilder createRouteBuilder() throws Exception {
-		return new RouteBuilder() {
+        super.tearDown();
+        JdbcTemplate jdbcTemplate = new JdbcTemplate(ds);
+        jdbcTemplate.execute("drop table projects");
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
             public void configure() {
-            	ds = new SingleConnectionDataSource(url, user, password, true);
-            	
-            	getContext().getComponent("sql", SqlComponent.class).setDataSource(ds);
-            	
-                from("direct:simple")
-                	.to("sql:select * from projects where license = # order by id")
-                	.to("mock:result");
-                
+                ds = new SingleConnectionDataSource(url, user, password, true);
+
+                getContext().getComponent("sql", SqlComponent.class).setDataSource(ds);
+
+                from("direct:simple").to("sql:select * from projects where license = # order by id")
+                    .to("mock:result");
+
                 from("direct:list")
-	            	.to("sql:select * from projects where license = # and project = # order by id")
-	            	.to("mock:result");
+                    .to("sql:select * from projects where license = # and project = # order by id")
+                    .to("mock:result");
 
             }
         };
-	}
-    
-    
+    }
+
 }

Modified: activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/Main.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/Main.java (original)
+++ activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/Main.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -35,8 +34,7 @@
         try {
             SwingBrowser browser = new SwingBrowser((DefaultCamelContext) camelContext);
             browser.run();
-        }
-        catch (RuntimeException e) {
+        } catch (RuntimeException e) {
             System.out.println("Caught: " + e);
             e.printStackTrace();
             throw e;

Modified: activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingBrowser.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingBrowser.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingBrowser.java (original)
+++ activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingBrowser.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -36,7 +35,7 @@
     static {
         SwingRealm.createDefault();
     }
-    
+
     public SwingBrowser(DefaultCamelContext camelContext) {
         super(camelContext);
     }

Modified: activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingComponent.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingComponent.java (original)
+++ activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/swing/SwingComponent.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -19,8 +18,8 @@
 
 import java.util.Map;
 
-import org.apache.camel.component.uface.UFaceComponent;
 import org.apache.camel.Endpoint;
+import org.apache.camel.component.uface.UFaceComponent;
 import org.ufacekit.ui.swing.databinding.swing.SwingRealm;
 
 /**

Modified: activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/ExampleSender.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/ExampleSender.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/ExampleSender.java (original)
+++ activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/ExampleSender.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -19,8 +18,8 @@
 
 import java.util.Date;
 
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
 import org.springframework.beans.factory.InitializingBean;
 
 /**

Modified: activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/UFaceTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/UFaceTest.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/UFaceTest.java (original)
+++ activemq/camel/trunk/components/camel-swing/src/test/java/org/apache/camel/component/swing/UFaceTest.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,

Modified: activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceBrowser.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceBrowser.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceBrowser.java (original)
+++ activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceBrowser.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,

Modified: activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceComponent.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceComponent.java (original)
+++ activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceComponent.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -19,9 +18,8 @@
 
 import java.util.Map;
 
-import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.Endpoint;
-import org.apache.camel.component.list.ListEndpoint;
+import org.apache.camel.impl.DefaultComponent;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceEndpoint.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/UFaceEndpoint.java Sun Mar 30 22:18:36 2008
@@ -19,13 +19,11 @@
 
 import java.util.List;
 
-import org.apache.camel.component.list.ListEndpoint;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Component;
 import org.apache.camel.Exchange;
+import org.apache.camel.component.list.ListEndpoint;
 import org.apache.camel.util.ObjectHelper;
-import org.eclipse.core.databinding.observable.list.WritableList;
 import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.databinding.observable.list.WritableList;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/ExampleSender.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/ExampleSender.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/ExampleSender.java (original)
+++ activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/ExampleSender.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,
@@ -19,8 +18,8 @@
 
 import java.util.Date;
 
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
 import org.springframework.beans.factory.InitializingBean;
 
 /**

Modified: activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/UFaceTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/UFaceTest.java?rev=642879&r1=642878&r2=642879&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/UFaceTest.java (original)
+++ activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/UFaceTest.java Sun Mar 30 22:18:36 2008
@@ -1,5 +1,4 @@
 /**
- *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *      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,