camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r669380 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/util/ camel-core/src/test/java/org/apache/camel/component/dataset/ components/camel-spring-integration/src/main/j...
Date Thu, 19 Jun 2008 04:02:34 GMT
Author: ningjiang
Date: Wed Jun 18 21:02:33 2008
New Revision: 669380

URL: http://svn.apache.org/viewvc?rev=669380&view=rev
Log:
Fixed some CS errors

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
    activemq/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/converter/SpringIntegrationConverter.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
    activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptType.java
Wed Jun 18 21:02:33 2008
@@ -72,7 +72,7 @@
     public ProceedType getProceed() {
         return proceed;
     }
-    
+
     public InterceptType createProxy() {
         InterceptType answer = new InterceptType();
         answer.getOutputs().addAll(this.getOutputs());
@@ -82,27 +82,27 @@
         // in its outputs (if proceed() was called) and/or in the
         // outputs of the otherwise or last when clause for the predicated version.
         proxifyProceed(this.getProceed(), answer.getProceed(), answer);
-        
+
         if (answer.getOutputs().size() > 0) {
             // this is for the predicate version
-            ProcessorType<?> processor = answer; 
+            ProcessorType<?> processor = answer;
             processor = (ProcessorType<?>) answer.getOutputs().get(0);
             if (processor instanceof ChoiceType) {
-        	    ChoiceType choice = (ChoiceType) processor;
-                proxifyProceed(this.getProceed(), answer.getProceed(), 
+                ChoiceType choice = (ChoiceType) processor;
+                proxifyProceed(this.getProceed(), answer.getProceed(),
                         choice.getWhenClauses().get(choice.getWhenClauses().size() - 1));
                 proxifyProceed(this.getProceed(), answer.getProceed(), choice.getOtherwise());
             }
         }
         return answer;
     }
-    
+
     private void proxifyProceed(ProceedType orig, ProceedType proxy, ProcessorType<?>
processor) {
-    	int index = processor.getOutputs().indexOf(orig);
+        int index = processor.getOutputs().indexOf(orig);
         if (index >= 0) {
             // replace original proceed with proxy
             processor.addOutput(proxy);
-        
+
             List<ProcessorType<?>> outs = processor.getOutputs();
             outs.remove(proxy);
             outs.set(index, proxy);

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesType.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesType.java Wed
Jun 18 21:02:33 2008
@@ -164,9 +164,9 @@
         }
         List<InterceptType> intercepts = getIntercepts();
         for (InterceptType intercept : intercepts) {
-            // need to create a proxy for this one and use the 
+            // need to create a proxy for this one and use the
             // proceed of the proxy which will be local to this route
-            InterceptType proxy = intercept.createProxy();       	
+            InterceptType proxy = intercept.createProxy();
             route.addOutput(proxy);
             route.pushBlock(proxy.getProceed());
         }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ResolverUtil.java
Wed Jun 18 21:02:33 2008
@@ -356,29 +356,32 @@
         }
     }
 
-    private static class OsgiUtil {
-	    static Set<String> getImplementationsInBundle(Test test, String packageName, ClassLoader
loader, Method mth) {
-	        try {
-	            org.osgi.framework.Bundle bundle = (org.osgi.framework.Bundle) mth.invoke(loader);
-	            org.osgi.framework.Bundle[] bundles = bundle.getBundleContext().getBundles();
+    private static final class OsgiUtil {
+        private OsgiUtil() {
+            // Helper class
+        }
+        static Set<String> getImplementationsInBundle(Test test, String packageName,
ClassLoader loader, Method mth) {
+            try {
+                org.osgi.framework.Bundle bundle = (org.osgi.framework.Bundle) mth.invoke(loader);
+                org.osgi.framework.Bundle[] bundles = bundle.getBundleContext().getBundles();
                 Set<String> urls = new HashSet<String>();
-	            for (org.osgi.framework.Bundle bd : bundles) {
-	                if (LOG.isTraceEnabled()) {
-	                    LOG.trace("Searching in bundle:" + bd);
-	                }
+                for (org.osgi.framework.Bundle bd : bundles) {
+                    if (LOG.isTraceEnabled()) {
+                        LOG.trace("Searching in bundle:" + bd);
+                    }
                     Enumeration<URL> paths = bd.findEntries("/" + packageName, "*.class",
true);
-			        while (paths != null && paths.hasMoreElements()) {
-			            URL path = paths.nextElement();
+                    while (paths != null && paths.hasMoreElements()) {
+                        URL path = paths.nextElement();
                         urls.add(path.getPath().substring(1));
                     }
                 }
                 return urls;
-	        } catch (Throwable t) {
-	            LOG.error("Could not search osgi bundles for classes matching criteria: " +
test
-	                      + "due to an Exception: " + t.getMessage());
+            } catch (Throwable t) {
+                LOG.error("Could not search osgi bundles for classes matching criteria: "
+ test
+                          + "due to an Exception: " + t.getMessage());
                 return null;
-	        }
-	    }
+            }
+        }
     }
 
 

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetSedaTest.java
Wed Jun 18 21:02:33 2008
@@ -19,8 +19,8 @@
 import javax.naming.Context;
 
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * Unit test to demonstrate high concurrency with seda. Offspring by CAMEL-605.

Modified: activemq/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/converter/SpringIntegrationConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/converter/SpringIntegrationConverter.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/converter/SpringIntegrationConverter.java
(original)
+++ activemq/camel/trunk/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/converter/SpringIntegrationConverter.java
Wed Jun 18 21:02:33 2008
@@ -61,7 +61,7 @@
         if (camelMessage instanceof SpringIntegrationMessage) {
             SpringIntegrationMessage siMessage = (SpringIntegrationMessage)camelMessage;
             org.springframework.integration.message.Message message =  siMessage.getMessage();
-            if( message != null) {
+            if (message != null) {
                 return message;
             }
         }
@@ -69,7 +69,7 @@
         // Create a new spring message and copy the attributes and body from the camel message
         MessageHeader messageHeader = new MessageHeader();
         Map<String, Object> headers = camelMessage.getHeaders();
-        for(String key : headers.keySet()) {
+        for (String key : headers.keySet()) {
             Object value = headers.get(key);
             messageHeader.setAttribute(key, value);
         }

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Wed Jun 18 21:02:33 2008
@@ -164,7 +164,7 @@
         classes.add(org.apache.camel.model.config.StreamResequencerConfig.class);
         classes.add(org.apache.camel.model.dataformat.DataFormatType.class);
         classes.add(org.apache.camel.model.language.ExpressionType.class);
-        classes.add(org.apache.camel.model.loadbalancer.LoadBalancerType.class) ;
+        classes.add(org.apache.camel.model.loadbalancer.LoadBalancerType.class);
         return classes;
     }
 

Modified: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
(original)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClient.java
Wed Jun 18 21:02:33 2008
@@ -18,7 +18,6 @@
 
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.CamelContext;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -28,6 +27,9 @@
  * Requires that the JMS broker is running, as well as CamelServer
  */
 public final class CamelClient {
+    private CamelClient() {
+        // Helper class
+    }
 
     // START SNIPPET: e1
     public static void main(final String[] args) throws Exception {
@@ -39,7 +41,7 @@
         ProducerTemplate camelTemplate = (ProducerTemplate) context.getBean("camelTemplate");
 
         System.out.println("Invoking the multiply with 22");
-        // as opposed to the CamelClientRemoting example we need to define the service URI
in this java code 
+        // as opposed to the CamelClientRemoting example we need to define the service URI
in this java code
         int response = (Integer)camelTemplate.sendBody("jms:queue:numbers", ExchangePattern.InOut,
22);
         System.out.println("... the result is: " + response);
 

Modified: activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java?rev=669380&r1=669379&r2=669380&view=diff
==============================================================================
--- activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
(original)
+++ activemq/camel/trunk/examples/camel-example-spring-jms/src/main/java/org/apache/camel/example/client/CamelClientRemoting.java
Wed Jun 18 21:02:33 2008
@@ -26,6 +26,9 @@
  * Requires that the JMS broker is running, as well as CamelServer
  */
 public final class CamelClientRemoting {
+    private CamelClientRemoting() {
+        //Helper class
+    }
 
     // START SNIPPET: e1
     public static void main(final String[] args) {



Mime
View raw message