You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christian Müller (JIRA)" <ji...@apache.org> on 2011/01/08 19:27:45 UTC
[jira] Resolved: (CAMEL-3311) bean parameter binding - Add support
for type option to force Camel to pick method with compatible type
[ https://issues.apache.org/jira/browse/CAMEL-3311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Müller resolved CAMEL-3311.
-------------------------------------
Resolution: Fixed
Now, you can use the *type* option to give Camel a hint which method should be called if you have multiple methods with the same name but different parameter types (method overloading) and you want not to fail with an AmbiguousMethodCallException:
{code}
.to("bean:foo?method=bar&type=java.io.InputStream")
{code}
I introduce also a new type converter which converts a String to a Class. I was wondering it doesn't exist, but I couldn't find one.
I hope you like it...
> bean parameter binding - Add support for type option to force Camel to pick method with compatible type
> -------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-3311
> URL: https://issues.apache.org/jira/browse/CAMEL-3311
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Affects Versions: 2.5.0
> Reporter: Claus Ibsen
> Assignee: Christian Müller
> Priority: Minor
> Fix For: 2.6.0
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Ambiguous-method-invocations-in-bean-binding-tp3248536p3248536.html
> We should introduce a type option so you for example can set it to {{java.io.InputStream}} to force Camel to pick a method which this type in the method signature.
> This can reduce problems with ambiguous methods, when people haver overloaded methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.