camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r663047 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/converter/ camel-core/src/main/java/org/apache/camel/impl/ camel-cor...
Date Wed, 04 Jun 2008 10:12:34 GMT
Author: ningjiang
Date: Wed Jun  4 03:12:34 2008
New Revision: 663047

URL: http://svn.apache.org/viewvc?rev=663047&view=rev
Log:
Fixed the build error and some CS errors in camel-core

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Routes.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorHandleTest.java
    activemq/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Routes.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Routes.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Routes.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/Routes.java Wed Jun  4
03:12:34 2008
@@ -20,9 +20,9 @@
 import java.util.List;
 
 public interface Routes {
-	
+
     CamelContext getContext();
-    
+
     void setContext(CamelContext context);
 
     List<Route> getRouteList() throws Exception;

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
Wed Jun  4 03:12:34 2008
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.builder;
 
-import static org.apache.camel.util.ObjectHelper.compare;
-import static org.apache.camel.util.ObjectHelper.notNull;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -27,6 +25,10 @@
 import org.apache.camel.Predicate;
 import org.apache.camel.util.ObjectHelper;
 
+import static org.apache.camel.util.ObjectHelper.compare;
+import static org.apache.camel.util.ObjectHelper.notNull;
+
+
 /**
  * A helper class for working with predicates
  *

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/ObjectConverter.java
Wed Jun  4 03:12:34 2008
@@ -48,7 +48,7 @@
     @SuppressWarnings("unchecked")
     @Converter
     public static Iterator iterator(Object value) {
-    	return ObjectHelper.createIterator(value);
+        return ObjectHelper.createIterator(value);
     }
 
     /**
@@ -72,7 +72,7 @@
      */
     @Converter
     public static Boolean toBoolean(Object value) {
-    	return ObjectHelper.toBoolean(value);
+        return ObjectHelper.toBoolean(value);
     }
 
     /**

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
Wed Jun  4 03:12:34 2008
@@ -32,14 +32,13 @@
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
+import org.apache.camel.ProducerTemplate;
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.Route;
 import org.apache.camel.Routes;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.Service;
 import org.apache.camel.TypeConverter;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.converter.DefaultTypeConverter;
 import org.apache.camel.model.RouteType;
 import org.apache.camel.spi.ComponentResolver;
@@ -59,8 +58,6 @@
 
 import static org.apache.camel.util.ServiceHelper.startServices;
 import static org.apache.camel.util.ServiceHelper.stopServices;
-
-
 /**
  * Represents the context used to configure routes and the policies to use.
  *

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Wed Jun  4 03:12:34 2008
@@ -30,12 +30,14 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.camel.Converter;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
 import org.apache.camel.RuntimeCamelException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
+
 
 /**
  * A number of useful helper methods for working with Objects
@@ -618,15 +620,15 @@
         return bean != null ? bean.getClass() : null;
     }
 
-	/**
-	 * Evaluate the value as a predicate which attempts to convert the value to
-	 * a boolean otherwise true is returned if the value is not null
-	 */
-	public static boolean evaluateValuePredicate(Object value) {
-	    if (value instanceof Boolean) {
-	        Boolean aBoolean = (Boolean)value;
-	        return aBoolean.booleanValue();
-	    }
-	    return value != null;
-	}
+    /**
+     * Evaluate the value as a predicate which attempts to convert the value to
+     * a boolean otherwise true is returned if the value is not null
+     */
+    public static boolean evaluateValuePredicate(Object value) {
+        if (value instanceof Boolean) {
+            Boolean aBoolean = (Boolean)value;
+            return aBoolean.booleanValue();
+        }
+        return value != null;
+    }
 }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
Wed Jun  4 03:12:34 2008
@@ -22,7 +22,6 @@
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.ProducerTemplate;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.Language;

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
Wed Jun  4 03:12:34 2008
@@ -22,8 +22,8 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
-import org.apache.camel.TestSupport;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.TestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.log4j.Logger;
@@ -49,7 +49,7 @@
 */
         context = new DefaultCamelContext();
         context.start();
-        template = context.createProducerTemplate(); 
+        template = context.createProducerTemplate();
     }
 
     @Override

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorHandleTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorHandleTest.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorHandleTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TryProcessorHandleTest.java
Wed Jun  4 03:12:34 2008
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Processor;
 import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * Unit test for try .. handle routing (CAMEL-564).
@@ -69,5 +69,5 @@
             assertEquals("Force to fail", e.getMessage());
         }
     }
-    
+
 }

Modified: activemq/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java?rev=663047&r1=663046&r2=663047&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTest.java
Wed Jun  4 03:12:34 2008
@@ -39,7 +39,6 @@
     protected void setUp() throws Exception {
         clean();
         super.setUp();
-        template.setDefaultEndpointUri("direct:a");
     }
 
     private void clean() throws IOException {
@@ -54,7 +53,7 @@
 
     public void testJcrRoute() throws Exception {
         Exchange exchange = createExchangeWithBody("<hello>world!</hello>");
-        Exchange out = template.send(exchange);
+        Exchange out = template.send("direct:a", exchange);
         assertNotNull(out);
         String uuid = out.getOut().getBody(String.class);
         Session session = repository.login(new SimpleCredentials("user", "pass".toCharArray()));



Mime
View raw message