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

BeanInfo introspection ignores overriden methods

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.15.0
    • Fix Version/s: 2.15.1, 2.16.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: