paul-mcculloch opened a new issue, #565:
URL: https://github.com/apache/camel-karaf/issues/565

   [Originally logged as https://issues.apache.org/jira/browse/CAMEL-20436 but 
closed with instructions to log here]
   
   Using OSGi Blueprint a <reference> element can be used to inject an OSGi 
service into Camel. Methods on the injected service can be called via 
"bean:someref?method=foo"
   
   The service is injected as a proxy to the actual OSGi service,
   
   When BeanInfo attempts to resolve the method it sees two methods named 'foo' 
: The abstract method of the interface,  and the concrete method of the proxy.
   
   In camel 3.16 & earlier BeanInfo.findMostSpecificOverride() would determine 
that one method overrode the other, and would return the proxy's method.
   
   From 3.17 onwards a changes was made to look at the method's declaring 
class' isSynthetic() value, and to not consider a synthetic class' method as 
overriding the interface. The blueprint proxy is synthetic so is affected. 
   
    
   
   The changes was made for https://issues.apache.org/jira/browse/CAMEL-17844 
(https://github.com/apache/camel/pull/7261/commits/5d956d2e4914a5c4fe73e5cae2f2ea7d2429f8e3)
   
    
   
   This can be worked around by changing the method to take at least one 
argument. This triggers a different path through the code  - attempting to 
match the exchange body to the parameter. In this path the isSynthetic() flag 
isn't considered.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to