ppalaga commented on a change in pull request #1462: URL: https://github.com/apache/camel-quarkus/pull/1462#discussion_r463452537
########## File path: extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java ########## @@ -110,6 +112,91 @@ public synchronized RouteDefinition getRouteDefinition(String id) { return null; } + @Override + public List<RouteTemplateDefinition> getRouteTemplateDefinitions() { + return routeTemplateDefinitions; + } + + @Override + public RouteTemplateDefinition getRouteTemplateDefinition(String id) { + for (RouteTemplateDefinition route : routeTemplateDefinitions) { + if (route.idOrCreate(camelContext.adapt(ExtendedCamelContext.class).getNodeIdFactory()).equals(id)) { Review comment: ```suggestion final ... nodeIdFactory = camelContext.adapt(ExtendedCamelContext.class).getNodeIdFactory(); for (RouteTemplateDefinition route : routeTemplateDefinitions) { if (route.idOrCreate(nodeIdFactory).equals(id)) { ``` It would be more effective to get the factory once before starting the loop. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org