// -----------------------------------------------------------------------
@SuppressWarnings("deprecation")
protected void checkInitialized() throws Exception {
if (initialized.compareAndSet(false, true)) {
// Set the CamelContext ErrorHandler here
ModelCamelContext camelContext = getContext();
if (camelContext.getErrorHandlerBuilder() != null) {
setErrorHandlerBuilder(camelContext.getErrorHandlerBuilder());
}
configure();
// mark all route definitions as custom prepared because
// a route builder prepares the route definitions correctly already
for (RouteDefinition route : getRouteCollection().getRoutes()) {