Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 58674 invoked from network); 13 Nov 2008 18:28:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2008 18:28:26 -0000 Received: (qmail 37974 invoked by uid 500); 13 Nov 2008 18:28:33 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 37956 invoked by uid 500); 13 Nov 2008 18:28:33 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 37941 invoked by uid 99); 13 Nov 2008 18:28:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2008 10:28:33 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2008 18:27:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 83F1A234C286 for ; Thu, 13 Nov 2008 10:28:05 -0800 (PST) Message-ID: <1431298305.1226600885538.JavaMail.jira@brutus> Date: Thu, 13 Nov 2008 10:28:05 -0800 (PST) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Assigned: (CAMEL-896) org.apache.camel.spi.Registry should have mandatory lookup methods In-Reply-To: <5746148.1221381052588.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen reassigned CAMEL-896: --------------------------------- Assignee: Claus Ibsen > org.apache.camel.spi.Registry should have mandatory lookup methods > ------------------------------------------------------------------ > > Key: CAMEL-896 > URL: https://issues.apache.org/activemq/browse/CAMEL-896 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 1.5.0 > Reporter: Claus Ibsen > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.0.0 > > > The Registry only has lookup methods that return null if the bean was not found. Then we need to manually throw exception if the bean was expected. > We need to expose mandatoryLookup methods that will do null check > For instance: > {code} > FTPClientConfig ftpClientConfig = this.getCamelContext().getRegistry().lookup(ref, FTPClientConfig.class); > if (ftpClientConfig == null) { > throw new IllegalArgumentException("Damm can not find it"); > } > {code} > Should just be: > {code} > FTPClientConfig ftpClientConfig = this.getCamelContext().getRegistry().mandatoryLookup(ref, FTPClientConfig.class); > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.