camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CAMEL-896) org.apache.camel.spi.Registry should have mandatory lookup methods
Date Thu, 13 Nov 2008 18:28:05 GMT

     [ 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.


Mime
View raw message