Author: ningjiang
Date: Wed Oct 15 20:43:28 2008
New Revision: 705131

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

Modified:
    
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithMatchingRoutes.java
    
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithRouteTypes.java
    
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
    
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
    
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/ConciseGuiceRouteTest.java
    
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceRouteWithNamedKeysTest.java
    
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceTest.java
    
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/MainTest.java
    
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/TraditionalGuiceRouteTest.java
    
activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcServerEngine.java
    
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
    
activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java

Modified: 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithMatchingRoutes.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithMatchingRoutes.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithMatchingRoutes.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithMatchingRoutes.java
 Wed Oct 15 20:43:28 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,
@@ -17,15 +16,16 @@
  */
 package org.apache.camel.guice;
 
+import java.util.Set;
+
 import com.google.inject.Injector;
 import com.google.inject.Provides;
 import com.google.inject.matcher.Matcher;
 import com.google.inject.matcher.Matchers;
+
 import org.apache.camel.Routes;
 import org.guiceyfruit.Injectors;
 
-import java.util.Set;
-
 /**
  * A Guice Module which injects the CamelContext with all available 
implementations
  * of [EMAIL PROTECTED] Routes} which are bound to Guice with an optional 
[EMAIL PROTECTED] Matcher} to filter out the classes required.

Modified: 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithRouteTypes.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithRouteTypes.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithRouteTypes.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/CamelModuleWithRouteTypes.java
 Wed Oct 15 20:43:28 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,
@@ -17,12 +16,14 @@
  */
 package org.apache.camel.guice;
 
+import java.util.Set;
+
 import com.google.common.collect.Sets;
 import com.google.inject.Injector;
 import com.google.inject.Provides;
 import org.apache.camel.Routes;
 
-import java.util.Set;
+
 
 /**
  * A Guice Module which injects the CamelContext with the specified [EMAIL 
PROTECTED] Routes} types - which are then injected by Guice.

Modified: 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
 Wed Oct 15 20:43:28 2008
@@ -16,7 +16,12 @@
  */
 package org.apache.camel.guice;
 
+import java.util.List;
+import java.util.Set;
+import javax.naming.Context;
+
 import com.google.inject.Inject;
+
 import org.apache.camel.Route;
 import org.apache.camel.Routes;
 import org.apache.camel.TypeConverter;
@@ -31,10 +36,6 @@
 import org.apache.camel.spi.LifecycleStrategy;
 import org.apache.camel.spi.Registry;
 
-import javax.naming.Context;
-import java.util.List;
-import java.util.Set;
-
 /**
  * The default CamelContext implementation for working with Guice.
  *

Modified: 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/Main.java
 Wed Oct 15 20:43:28 2008
@@ -16,23 +16,25 @@
  */
 package org.apache.camel.guice;
 
+import java.util.Map;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Maps;
 import com.google.inject.Binding;
 import com.google.inject.Injector;
 import com.google.inject.Key;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.view.ModelFileGenerator;
 import org.apache.camel.util.MainSupport;
+import org.apache.camel.view.ModelFileGenerator;
 import org.guiceyfruit.Injectors;
 
-import javax.naming.InitialContext;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import java.util.Map;
-import java.util.Set;
-
 /**
  * A command line tool for booting up a CamelContext using a Guice Injector 
via JNDI
  * assuming that a valid jndi.properties is on the classpath
@@ -116,22 +118,23 @@
         if (injector != null) {
             Set<Map.Entry<Key<?>, Binding<?>>> entries = 
injector.getBindings().entrySet();
             for (Map.Entry<Key<?>, Binding<?>> entry : entries) {
-              Key<?> key = entry.getKey();
-              Class<?> keyType = Injectors.getKeyType(key);
-              if (keyType != null && 
CamelContext.class.isAssignableFrom(keyType)) {
-                Binding<?> binding = entry.getValue();
-                Object value = binding.getProvider().get();
-                if (value != null) {
-                  CamelContext castValue = CamelContext.class.cast(value);
-                  answer.put(key.toString(), castValue);
+                Key<?> key = entry.getKey();
+                Class<?> keyType = Injectors.getKeyType(key);
+                if (keyType != null && 
CamelContext.class.isAssignableFrom(keyType)) {
+                    Binding<?> binding = entry.getValue();
+                    Object value = binding.getProvider().get();
+                    if (value != null) {
+                        CamelContext castValue = 
CamelContext.class.cast(value);
+                        answer.put(key.toString(), castValue);
+                    }
                 }
-              }
             }
         }
         return answer;
     }
 
     protected ModelFileGenerator createModelFileGenerator() throws 
JAXBException {
-        return new 
ModelFileGenerator(JAXBContext.newInstance("org.apache.camel.model:org.apache.camel.model.config:org.apache.camel.model.dataformat:org.apache.camel.model.language:org.apache.camel.model.loadbalancer"));
+        return new ModelFileGenerator(
+            
JAXBContext.newInstance("org.apache.camel.model:org.apache.camel.model.config:org.apache.camel.model.dataformat:org.apache.camel.model.language:org.apache.camel.model.loadbalancer"));
     }
 }
\ No newline at end of file

Modified: 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/ConciseGuiceRouteTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/ConciseGuiceRouteTest.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/ConciseGuiceRouteTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/ConciseGuiceRouteTest.java
 Wed Oct 15 20:43:28 2008
@@ -16,9 +16,11 @@
  */
 package org.apache.camel.guice;
 
+import junit.framework.TestCase;
+
 import com.google.inject.Guice;
 import com.google.inject.Injector;
-import junit.framework.TestCase;
+
 import org.apache.camel.CamelContext;
 
 

Modified: 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceRouteWithNamedKeysTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceRouteWithNamedKeysTest.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceRouteWithNamedKeysTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceRouteWithNamedKeysTest.java
 Wed Oct 15 20:43:28 2008
@@ -16,26 +16,22 @@
  */
 package org.apache.camel.guice;
 
-import com.google.common.collect.Sets;
-import com.google.inject.AbstractModule;
-import com.google.inject.Binding;
+import java.util.Collection;
+
+import junit.framework.TestCase;
+
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Key;
 import com.google.inject.Provides;
-import com.google.inject.matcher.Matcher;
 import com.google.inject.matcher.Matchers;
 import com.google.inject.name.Named;
 import com.google.inject.name.Names;
-import junit.framework.TestCase;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.guiceyfruit.Injectors;
 
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
 /**
  * Lets use a custom CamelModule to perform explicit binding of route builders
  *

Modified: 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceTest.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/GuiceTest.java
 Wed Oct 15 20:43:28 2008
@@ -16,10 +16,12 @@
  */
 package org.apache.camel.guice;
 
+import junit.framework.TestCase;
+
 import com.google.inject.Guice;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
-import junit.framework.TestCase;
+
 import org.apache.camel.CamelContext;
 
 /**

Modified: 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/MainTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/MainTest.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/MainTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/MainTest.java
 Wed Oct 15 20:43:28 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,
@@ -17,13 +16,14 @@
  */
 package org.apache.camel.guice;
 
+import java.util.List;
+
 import junit.framework.TestCase;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import java.util.List;
-
 /**
  * @version $Revision: 1.1 $
  */

Modified: 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/TraditionalGuiceRouteTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/TraditionalGuiceRouteTest.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/TraditionalGuiceRouteTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-guice/src/test/java/org/apache/camel/guice/TraditionalGuiceRouteTest.java
 Wed Oct 15 20:43:28 2008
@@ -16,9 +16,11 @@
  */
 package org.apache.camel.guice;
 
+import junit.framework.TestCase;
+
 import com.google.inject.Guice;
 import com.google.inject.Injector;
-import junit.framework.TestCase;
+
 import org.apache.camel.CamelContext;
 
 /**

Modified: 
activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcServerEngine.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcServerEngine.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcServerEngine.java
 (original)
+++ 
activemq/camel/trunk/components/camel-jhc/src/main/java/org/apache/camel/component/jhc/JhcServerEngine.java
 Wed Oct 15 20:43:28 2008
@@ -27,11 +27,11 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.http.impl.nio.DefaultServerIOEventDispatch;
+import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor;
 import org.apache.http.impl.nio.reactor.SSLServerIOEventDispatch;
 import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.IOReactorException;
 import org.apache.http.nio.reactor.ListeningIOReactor;
-import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.HttpRequestHandlerRegistry;
 

Modified: 
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java?rev=705131&r1=705130&r2=705131&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
 (original)
+++ 
activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
 Wed Oct 15 20:43:28 2008
@@ -34,7 +34,11 @@
  * @version $Revision$
  */
 @Converter
-public class MailConverters {
+public final class MailConverters {
+    
+    private MailConverters() {
+        //Utility Class
+    }
 
     /**
      * Converts the given JavaMail message to a String body.

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=705131&r1=705130&r2=705131&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
 Wed Oct 15 20:43:28 2008
@@ -16,23 +16,23 @@
  */
 package org.apache.camel.spring;
 
+import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.Set;
-import java.util.HashMap;
+
+import javax.xml.bind.JAXBException;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.spring.handler.CamelNamespaceHandler;
-import org.apache.camel.view.ModelFileGenerator;
 import org.apache.camel.util.MainSupport;
+import org.apache.camel.view.ModelFileGenerator;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
 
-import javax.xml.bind.JAXBException;
-
 /**
  * A command line tool for booting up a CamelContext using an optional Spring
  * ApplicationContext
@@ -198,7 +198,7 @@
         }
     }
 
-    protected Map<String,CamelContext> getCamelContextMap() {
+    protected Map<String, CamelContext> getCamelContextMap() {
         Map<String, SpringCamelContext> map = 
applicationContext.getBeansOfType(SpringCamelContext.class);
         Set<Map.Entry<String, SpringCamelContext>> entries = map.entrySet();
         Map<String, CamelContext> answer = new HashMap<String, CamelContext>();


Reply via email to