camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Geletka (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8492) BeanInfo introspection ignores overriden methods
Date Mon, 16 Mar 2015 10:52:38 GMT

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

Peter Geletka commented on CAMEL-8492:
--------------------------------------

I tested it with 2.14.0 - test passes as well

> BeanInfo introspection ignores overriden methods
> ------------------------------------------------
>
>                 Key: CAMEL-8492
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8492
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.15.0
>            Reporter: Peter Geletka
>         Attachments: beaninfo-issue.zip
>
>
> 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
> {code}
> public interface RequestMessageTranslator<I, O> {
>     O translate(I in);
> }
> {code}
> Implementation
> {code}
> public class RequestMessageTranslatorImpl implements RequestMessageTranslator<String,
String> {
>     public String translate(String in) {
>         return null;
>     }
> }
> {code}
> Then calling the class from route:
> {code}
> from(ROUTE_ID)
>                 .id(ROUTE_ID)
>                 .bean(requestMessageTranslator)
> {code}
> ends with:
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message