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

BeanInfo#introspect does not work correctly with bridge methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.17.3, 2.18.0
    • 2.18.1, 2.19.0
    • camel-core
    • None
    • Unknown

    Description

      Instead of selecting implementation method, bridge method is used. We faced an issue with conversion of parameter when bean implements generic interface.
      For example having bean implementation like this:

          public interface Service<R> {
      
              int process(R request);
          }
      
          public static class MyService implements Service<Request> {
      
              public int process(Request request) {
                  return request.x + 1;
              }
          }
      

      would lead to beanInfo containing Method with signature

      public abstract int process(Object request)
      

      in methodMap

      This is not correct as conversion of parameter is not possible in this case.

      I could find an issue with the same problem that was previously fixed (CAMEL-8940), but later on it was broken with CAMEL-9656 (commit 5639b78).

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              bduisenov Babur Duisenov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: