Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5437 to avoid FastCamelContext creating TypeConverter #5439

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.camel.ExtendedCamelContext;
import org.apache.camel.RouteConfigurationsBuilder;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.TypeConverter;
import org.apache.camel.builder.LambdaRouteBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.builder.endpoint.EndpointRouteBuilder;
Expand Down Expand Up @@ -73,6 +74,9 @@ public RuntimeValue<CamelContext> createContext(
TypeConverterRegistry typeConverterRegistryValue = typeConverterRegistry.getValue();
typeConverterRegistryValue.setInjector(new FastTypeConverterInjector(context));
context.setTypeConverterRegistry(typeConverterRegistryValue);
if (typeConverterRegistryValue instanceof TypeConverter) {
context.setTypeConverter((TypeConverter) typeConverterRegistryValue);
}
context.setLoadTypeConverters(false);

extendedCamelContext.addContextPlugin(ModelJAXBContextFactory.class, contextFactory.getValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ protected ComponentNameResolver createComponentNameResolver() {
return null;
}

@Override
protected boolean eagerCreateTypeConverter() {
return false;
}

@Override
protected TypeConverter createTypeConverter() {
// TypeConverter impls are resolved at build time
Expand Down