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 2D96E1056C for ; Mon, 2 Sep 2013 15:42:03 +0000 (UTC) Received: (qmail 5752 invoked by uid 500); 2 Sep 2013 15:42:00 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 5409 invoked by uid 500); 2 Sep 2013 15:41:59 -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 4586 invoked by uid 99); 2 Sep 2013 15:41:57 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Sep 2013 15:41:57 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7A14E8BBB43; Mon, 2 Sep 2013 15:41:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: davsclaus@apache.org To: commits@camel.apache.org Date: Mon, 02 Sep 2013 15:41:59 -0000 Message-Id: In-Reply-To: <11a6cd499bba4c8a9105dce4cf6ba54e@git.apache.org> References: <11a6cd499bba4c8a9105dce4cf6ba54e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/5] git commit: CAMEL-6699: Fixed using in OSGi Blueprint. CAMEL-6699: Fixed using in OSGi Blueprint. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/72807c48 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/72807c48 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/72807c48 Branch: refs/heads/camel-2.12.x Commit: 72807c48679ec2819b8fcf46712c129c4c4b71cd Parents: 20b60b7 Author: Claus Ibsen Authored: Mon Sep 2 17:40:31 2013 +0200 Committer: Claus Ibsen Committed: Mon Sep 2 17:40:55 2013 +0200 ---------------------------------------------------------------------- .../core/xml/AbstractCamelContextFactoryBean.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/72807c48/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java ---------------------------------------------------------------------- diff --git a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java index 8e0b498..621d645 100644 --- a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java +++ b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java @@ -721,21 +721,14 @@ public abstract class AbstractCamelContextFactoryBean builders = new ArrayList(); - // lets add route builders added from references + // lets add RoutesBuilder's added from references if (getBuilderRefs() != null) { for (RouteBuilderDefinition builderRef : getBuilderRefs()) { - RouteBuilder builder = builderRef.createRouteBuilder(getContext()); - if (builder != null) { - builders.add(builder); + RoutesBuilder routes = builderRef.createRoutes(getContext()); + if (routes != null) { + this.builders.add(routes); } else { - // support to get the route here - RoutesBuilder routes = builderRef.createRoutes(getContext()); - if (routes != null) { - this.builders.add(routes); - } else { - // Throw the exception that we can't find any build here - throw new CamelException("Cannot find any routes with this RouteBuilder reference: " + builderRef); - } + throw new CamelException("Cannot find any routes with this RouteBuilder reference: " + builderRef); } } }