You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2011/10/28 22:17:13 UTC

svn commit: r1190539 - in /camel/trunk/camel-core/src/main/java/org/apache/camel/impl: DefaultComponent.java DefaultEndpoint.java

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() {