Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC1E37956 for ; Fri, 28 Oct 2011 20:17:36 +0000 (UTC) Received: (qmail 66025 invoked by uid 500); 28 Oct 2011 20:17:36 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 65997 invoked by uid 500); 28 Oct 2011 20:17:36 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 65990 invoked by uid 99); 28 Oct 2011 20:17:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 20:17:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 20:17:34 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 31C1E2388ABA for ; Fri, 28 Oct 2011 20:17:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@camel.apache.org From: hadrian@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111028201713.31C1E2388ABA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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() {