camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r900309 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apache/camel/util/ camel-core/src/test/java/org/apache/camel/issues/ components/camel-spring/src/main/java/org/apache/camel/spring/
Date Mon, 18 Jan 2010 08:58:08 GMT
Author: davsclaus
Date: Mon Jan 18 08:58:07 2010
New Revision: 900309

URL: http://svn.apache.org/viewvc?rev=900309&view=rev
Log:
Fixed test on windows box. Endpoint uri is normalized for endpoint matching. Fixed spelling.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=900309&r1=900308&r2=900309&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Mon
Jan 18 08:58:07 2010
@@ -933,7 +933,7 @@
                         DefaultRouteStartupOrder other = inputs.get(startupOrder);
                         if (other != null) {
                             String otherId = other.getRoute().getId();
-                            throw new FailedToStartRouteException(holder.getRoute().getId(),
"starupOrder clash. Route " + otherId + " already has startupOrder "
+                            throw new FailedToStartRouteException(holder.getRoute().getId(),
"startupOrder clash. Route " + otherId + " already has startupOrder "
                                 + startupOrder + " configured which this route have as well.
Please correct startupOrder to be unique among all your routes.");
                         } else {
                             // no clash then add the holder to the existing inputs of routes
to be started

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java?rev=900309&r1=900308&r2=900309&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java Mon Jan
18 08:58:07 2010
@@ -29,6 +29,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.PollingConsumer;
 import org.apache.camel.Processor;
+import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -98,6 +99,13 @@
      * @return <tt>true</tt> if match, <tt>false</tt> otherwise.
      */
     public static boolean matchEndpoint(String uri, String pattern) {
+        // normalize uri so we can do endpoint hits with minor mistakes and parameters is
not in the same order
+        try {
+            uri = URISupport.normalizeUri(uri);
+        } catch (Exception e) {
+            throw new ResolveEndpointFailedException(uri, e);
+        }
+
         // we need to test with and without scheme separators (//)
         if (uri.indexOf("://") != -1) {
             // try without :// also
@@ -122,7 +130,7 @@
 
     private static boolean doMatchEndpoint(String uri, String pattern) {
         if (uri.equals(pattern)) {
-            // excact match
+            // exact match
             return true;
         }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java?rev=900309&r1=900308&r2=900309&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
Mon Jan 18 08:58:07 2010
@@ -60,6 +60,7 @@
             @Override
             public void configure() throws Exception {
                 from("file://target/file/splitprop?move=done")
+                    .convertBodyTo(String.class)
                     .split(new MyCustomExpression())
                     .recipientList(header("myCustomDestination"));
             }

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=900309&r1=900308&r2=900309&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Mon Jan 18 08:58:07 2010
@@ -883,7 +883,6 @@
                         throw new CamelException("Cannot find any routes with this RouteBuilder
reference: " + builderRef);
                     }
                 }
-                
             }
         }
 



Mime
View raw message