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/04/01 07:18:00 UTC

[jira] [Commented] (CAMEL-19104) camel-bean - Move parameter type matching to a new parameterTypes option

    [ https://issues.apache.org/jira/browse/CAMEL-19104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17707510#comment-17707510 ] 

Claus Ibsen commented on CAMEL-19104:
-------------------------------------

It's likely better to force types declared with .class, eg 

method=foo(String.class, int.class)

And anything without .class, is considered a value, eg

method=foo(Hello, 3)

And for string literals its best to quote (single or double)

method=foo('Hello', 3)


> camel-bean - Move parameter type matching to a new parameterTypes option
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-19104
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19104
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-bean
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.0-M3, 4.0
>
>
> See CAMEL-19098
> When invoking a method 
> myBean?method=foo(hello)
> Then Camel will match by type (was implemented first), eg to see if the method has a parameter of type 'hello'. 
> This is intended for
> myBean?method=foo(String, int)
> To match a method that has String, int as types.
> However users want to pass in that as parameter values instead (implemented later). So instead lets move the parameter type matching away
> myBean?method=foo&parameterTypes=String,int



--
This message was sent by Atlassian Jira
(v8.20.10#820010)