This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-24810 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 80dad3dd42837a4b53eddff75dc20cbd40a7ff57 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Sep 18 10:28:43 2026 +0200 chore: camel-jbang - the bean class check also reads the generated third-party known dependencies camel-thirdparty-known-dependencies.properties is the file CAMEL-24809 generates from the curated list of third-party libraries; the check loads it next to the two existing mapping files, so a mapped class from that list is not reported as missing either. Absent resources are ignored, so this is safe before CAMEL-24809 lands. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj --- .../apache/camel/dsl/jbang/core/commands/ai/BeanRefChecks.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/BeanRefChecks.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/BeanRefChecks.java index 06c9a0efc14e..548655bee85a 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/BeanRefChecks.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/BeanRefChecks.java @@ -347,9 +347,10 @@ final class BeanRefChecks { */ /** * The classes camel run resolves to a Maven dependency and downloads on demand (camel-kamelet-main's - * camel-main-known-dependencies.properties and camel-component-known-dependencies.properties), so a - * #class:org.postgresql.ds.PGSimpleDataSource bean is fine without a dependency declared even though the class is - * not on the CLI classpath. Matched the way the runtime matches: the class name, then each enclosing package. + * camel-main-known-dependencies.properties, camel-component-known-dependencies.properties and the generated + * camel-thirdparty-known-dependencies.properties of CAMEL-24809), so a #class:org.postgresql.ds.PGSimpleDataSource + * bean is fine without a dependency declared even though the class is not on the CLI classpath. Matched the way the + * runtime matches: the class name, then each enclosing package. */ private static volatile Map<String, String> knownDependencies; @@ -358,7 +359,8 @@ final class BeanRefChecks { if (known == null) { known = new HashMap<>(); for (String name : new String[] { - "camel-main-known-dependencies.properties", "camel-component-known-dependencies.properties" }) { + "camel-main-known-dependencies.properties", "camel-component-known-dependencies.properties", + "camel-thirdparty-known-dependencies.properties" }) { try { Enumeration<URL> resources = BeanRefChecks.class.getClassLoader().getResources(name); while (resources.hasMoreElements()) {
