You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/10/25 19:44:00 UTC
[jira] [Commented] (CAMEL-20048) camel-core - Find single bean by type should use consistent method
[ https://issues.apache.org/jira/browse/CAMEL-20048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779651#comment-17779651 ]
Claus Ibsen commented on CAMEL-20048:
-------------------------------------
We can have a findBySingleType(boolean mandatory) that can thrown an exception if none found, and maybe we can have an error message, that can find how many beans are there, 0, 2 or more etc.
> camel-core - Find single bean by type should use consistent method
> ------------------------------------------------------------------
>
> Key: CAMEL-20048
> URL: https://issues.apache.org/jira/browse/CAMEL-20048
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.2.0
>
>
> For autowiring and whatelse, then we check for findByType and then if size == 1.
> Howevever we should use findSingleByType instead.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)