davsclaus commented on code in PR #26488:
URL: https://github.com/apache/camel/pull/26488#discussion_r4023285315


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/EndpointChecks.java:
##########
@@ -191,6 +200,36 @@ public static List<String> validateYamlEndpoints(String 
content, CamelCatalog ca
         return errors;
     }
 
+    private static volatile CamelCatalog defaultCatalog;
+
+    /**
+     * The message for a component the catalog of a runtime (Camel Quarkus, 
Camel Spring Boot) does not have while Camel
+     * has it: the runtime has no extension or starter for it. Null for the 
default catalog, whose unknown components
+     * are not reported: a project can register a component of its own 
(CAMEL-24711).
+     */
+    static String missingInRuntime(CamelCatalog catalog, String scheme) {
+        RuntimeProvider provider = catalog.getRuntimeProvider();
+        String name = provider != null ? provider.getProviderName() : null;
+        if (name == null || "default".equals(name)) {
+            return null;
+        }
+        CamelCatalog plain = defaultCatalog;
+        if (plain == null) {
+            plain = new DefaultCamelCatalog();
+            defaultCatalog = plain;
+        }
+        if (plain.componentModel(scheme) == null) {
+            return null;

Review Comment:
   Applied in aead5ca6f283 — same double-checked locking as 
`SourceValidator.yamlValidator()`. (The race was benign, two equal catalogs 
with one dropped, but one construction is what the field is for.)
   
   _Claude Code on behalf of davsclaus_



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