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

BeanInfo introspection ignores overriden methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.15.0
    • 2.15.1, 2.16.0
    • camel-core
    • None
    • Unknown

    Description

      When BeanInfo introspects class which implements a interface with one method, implemented method is filtered out and no invocation of the method is possible.

      Interface

      public interface RequestMessageTranslator<I, O> {
      
          O translate(I in);
      }
      

      Implementation

      public class RequestMessageTranslatorImpl implements RequestMessageTranslator<String, String> {
      
          public String translate(String in) {
              return null;
          }
      }
      

      Then calling the class from route:

      from(ROUTE_ID)
                      .id(ROUTE_ID)
                      .bean(requestMessageTranslator)
      

      ends with:

      Caused by: java.lang.IllegalStateException: No method invocation could be created, no matching method could be found on: RequestMessageTranslator@402fbbaf
      	at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:165)
      

      Attachments

        1. beaninfo-issue.zip
          2 kB
          Peter Geletka

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              geletkap Peter Geletka
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: