You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Originally logged as https://issues.apache.org/jira/browse/CAMEL-20436 but closed with instructions to log here]
Using OSGi Blueprint a 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.
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.
The text was updated successfully, but these errors were encountered:
[Originally logged as https://issues.apache.org/jira/browse/CAMEL-20436 but closed with instructions to log here]
Using OSGi Blueprint a 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 (apache/camel@5d956d2)
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.
The text was updated successfully, but these errors were encountered: