Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6752

Bean binding to covariant methods throws AmbiguousMethodCallException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.11.1
    • 2.11.2, 2.12.1, 2.13.0
    • camel-core
    • None
    • Patch Available
    • Novice

    Description

      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.

      Attachments

        Activity

          People

            njiang Willem Jiang
            guy127917 Guy Burton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: