I have the following code
class MyClass extends Function<Exchange, String>{
@Override
public String apply(Exchange exchange){...}
}
And in my route...
setHeader(...).method("myInstance", "apply")
In the previous version of camel I was using (2.12.3) this worked fine.
However, I am switching to Java 8 and camel 2.15.0. With this release I get
a method not found error. I have seen this a couple times now and the fix
was to create a different method the does not override an interface method
and use that.
class MyClass extends Function<Exchange, String>{
@Override
public String apply(Exchange exchange){ return doWork();}
public String doWork(Exchange exchange){...}
}
With the above the below works:
setHeader(...).method("myInstance", "doWork")
But the below fails:
setHeader(...).method("myInstance", "apply")
--
View this message in context:
http://camel.465427.n5.nabble.com/Method-not-found-with-new-version-of-Camel-when-method-Overrides-an-interface-method-tp5777616.html
Sent from the Camel - Users mailing list archive at Nabble.com.