gnodet-bot commented on code in PR #31127:
URL: https://github.com/apache/camel/pull/31127#discussion_r4755622260


##########
dsl/camel-jbang/camel-jbang-run/src/main/java/org/apache/camel/dsl/jbang/run/export/SpringBootExporter.java:
##########
@@ -331,8 +331,14 @@ private void createMavenPom(Path settings, Path profile, 
Path pom, Set<String> d
                                 : "spring-boot-starter-web");
         model.put("SpringBootVersion", request.springBootVersion);
         model.put("JavaVersion", request.javaVersion);
-        model.put("CamelSpringBootVersion",
-                Objects.requireNonNullElseGet(request.camelSpringBootVersion, 
() -> request.camelVersion));
+        model.put("CamelVersion", request.camelVersion);

Review Comment:
   💡 **Nit:** `CamelVersion` is put into the FreeMarker model here but neither 
`spring-boot-pom.ftl` nor `spring-boot-kubernetes-pom.ftl` reference 
`[=CamelVersion]`. The legacy `processLegacyPomTemplate` path uses 
`request.camelVersion` directly (not via the model). This line is dead code.
   
   If the templates don't need `CamelVersion` in the model, remove it. If it 
was added for future use, add a comment explaining why.
   
   ```suggestion
           String csbVersion
                   = 
Objects.requireNonNullElseGet(request.camelSpringBootVersion, () -> 
request.camelVersion);
           model.put("CamelSpringBootVersion", csbVersion);
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to