camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Created: (CAMEL-896) org.apache.camel.spi.Registry should have mandatory lookup methods
Date Sun, 14 Sep 2008 08:30:52 GMT
org.apache.camel.spi.Registry should have mandatory lookup methods

                 Key: CAMEL-896
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.5.0
            Reporter: 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:
            FTPClientConfig ftpClientConfig = this.getCamelContext().getRegistry().lookup(ref,
            if (ftpClientConfig == null) {
                throw new IllegalArgumentException("Damm can not find it");

Should just be:
            FTPClientConfig ftpClientConfig = this.getCamelContext().getRegistry().mandatoryLookup(ref,

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message