You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2013/09/16 09:39:52 UTC

[jira] [Comment Edited] (CAMEL-6752) Bean binding to covariant methods throws AmbiguousMethodCallException

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

Willem Jiang edited comment on CAMEL-6752 at 9/16/13 7:37 AM:
--------------------------------------------------------------

Applied patch into master, camel-2.12.x and camel-2.11.x branches with thanks to Guy.
                
      was (Author: njiang):
    Applied patch into master, camel-2.12.x and camel-2.11.x branches.
                  
> Bean binding to covariant methods throws AmbiguousMethodCallException
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-6752
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6752
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.11.1
>            Reporter: Guy Burton
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.2, 2.12.1, 2.13.0
>
>         Attachments: bean-binding-covariant-methods.patch
>
>
> Attached is a patch and test case for an issue in the bean binding code which prevents binding to an overloaded method with a covariant return type from the base class. 
> The fix is to check for method covariance at the last moment before throwing AmbiguousMethodCallException. If all methods remaining are covariant, any one of them can be called. Unfortunately this happens in 3 places in the code- if we pre-filtered the list of methods then we could lose annotations on either of the method signature which could be problematic depending on the resolution type. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira