camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1190539 - in /camel/trunk/camel-core/src/main/java/org/apache/camel/impl: DefaultComponent.java DefaultEndpoint.java
Date Fri, 28 Oct 2011 20:17:13 GMT
Author: hadrian
Date: Fri Oct 28 20:17:12 2011
New Revision: 1190539

URL: http://svn.apache.org/viewvc?rev=1190539&view=rev
Log:
CAMEL-4256. Patch applied with thanks to keith babo

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java?rev=1190539&r1=1190538&r2=1190539&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java Fri Oct
28 20:17:12 2011
@@ -111,7 +111,9 @@ public abstract class DefaultComponent e
     }
 
     public EndpointConfiguration createConfiguration(String uri) throws Exception {
-        return null;
+        MappedEndpointConfiguration config = new MappedEndpointConfiguration(this);
+        config.setURI(new URI(uri));
+        return config;
     }
 
     /**

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java?rev=1190539&r1=1190538&r2=1190539&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java Fri Oct
28 20:17:12 2011
@@ -311,13 +311,17 @@ public abstract class DefaultEndpoint ex
             config = null;
             return;
         }
-        MappedEndpointConfiguration cfg = new MappedEndpointConfiguration(component);
         try {
-            cfg.setURI(new URI(endpointUri));
-        } catch (URISyntaxException e) {
+            if (component != null) {
+                config = component.createConfiguration(endpointUri);
+            } else {
+                MappedEndpointConfiguration cfg = new MappedEndpointConfiguration(null);
+                cfg.setURI(new URI(endpointUri));
+                config = cfg;
+            }
+        } catch (Exception e) {
             throw new RuntimeCamelException(e);
         }
-        config = cfg;
     }
 
     public boolean isLenientProperties() {



Mime
View raw message