return new DefaultCamelBeanPostProcessor(camelContext);
} else {
throw new IllegalArgumentException("No such CamelContext '" + context + "' available!");
}
}
<BUG>protected CamelContext getCamelContext(String context) {
</BUG>
if (camelContextMap == null) {
<BUG>camelContextMap = BeanProvider.getContextualReference(CamelContextMap.class);
ObjectHelper.notNull(camelContextMap, "Could not resolve CamelContextMap");</BUG>
}

return new DefaultCamelBeanPostProcessor(camelContext);
} else {
throw new IllegalArgumentException("No such CamelContext '" + context + "' available!");
}
}
protected CamelContext getCamelContext(String context, BeanManager beanManager) {
if (camelContextMap == null) {
Set<Bean<?>> beans = beanManager.getBeans(CamelContextMap.class);
Bean<?> bean = beanManager.resolve(beans);
CreationalContext<?> creationalContext = beanManager.createCreationalContext(bean);
camelContextMap = (CamelContextMap) beanManager.getReference(bean, bean.getBeanClass(), creationalContext);
ObjectHelper.notNull(camelContextMap, "Could not resolve CamelContextMap");
}
