Description
In *AutoConfiguration classes generated by camel-package-plugin, there is a check like
if (myInstance instanceof CamelContextAware) { ((CamelContextAware) dataformat).setCamelContext(camelContext); }
This check may fail at compile time if myInstance is final and it is not an instance of CamelContextAware which make not possible to write final classes.
We should do something like:
if (CamelContextAware.class.isAssignableFrom(MyInstanceType.class)) { CamelContextAware context = CamelContextAware.class.cast(myInstance); if (context != null) { context.setCamelContext(camelContext); } }