You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2025/07/17 07:52:05 UTC

(camel) branch camel-4.8.x updated (50b4121c56b -> 885244a6cd8)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 50b4121c56b Google Drive Component: Fix error message
     new 5ca0371d65b CAMEL-22248: camel-jbang: Fix export not working with http component in some special situations.
     new 885244a6cd8 CAMEL-22248: camel-yaml-dsl: Better error message if uri parameter is missing

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../download/DependencyDownloaderComponentResolver.java   | 15 +++++++++------
 .../org/apache/camel/dsl/yaml/common/YamlSupport.java     |  5 ++++-
 2 files changed, 13 insertions(+), 7 deletions(-)


(camel) 02/02: CAMEL-22248: camel-yaml-dsl: Better error message if uri parameter is missing

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 885244a6cd80c43928d29ddff20474717ac6ccd8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jul 17 09:27:29 2025 +0200

    CAMEL-22248: camel-yaml-dsl: Better error message if uri parameter is missing
---
 .../src/main/java/org/apache/camel/dsl/yaml/common/YamlSupport.java  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlSupport.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlSupport.java
index 245f8f1b815..6079ed99620 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlSupport.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-common/src/main/java/org/apache/camel/dsl/yaml/common/YamlSupport.java
@@ -63,6 +63,10 @@ public final class YamlSupport {
     }
 
     public static String createEndpointUri(CamelContext context, Node node, String uri, Map<String, Object> parameters) {
+        if (uri == null) {
+            throw new InvalidEndpointException(node, "Uri is mandatory");
+        }
+
         String answer = uri;
 
         if (parameters == null || parameters.isEmpty()) {
@@ -185,7 +189,6 @@ public final class YamlSupport {
                         throw new UnsupportedFieldException(val, key);
                 }
             }
-
             answer = YamlSupport.createEndpointUri(dc.getCamelContext(), node, uri, parameters);
         }
 


(camel) 01/02: CAMEL-22248: camel-jbang: Fix export not working with http component in some special situations.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-4.8.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5ca0371d65b49d7a2658ee282879a292b443eda1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Jul 17 09:49:50 2025 +0200

    CAMEL-22248: camel-jbang: Fix export not working with http component in some special situations.
---
 .../download/DependencyDownloaderComponentResolver.java   | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java
index 34001095d35..e5d7fe22f6e 100644
--- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java
+++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderComponentResolver.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.main.download;
 
+import java.util.Arrays;
 import java.util.List;
 
 import org.apache.camel.CamelContext;
@@ -34,11 +35,13 @@ import org.apache.camel.tooling.model.OtherModel;
  */
 public final class DependencyDownloaderComponentResolver extends DefaultComponentResolver {
 
-    private static final String ACCEPTED_STUB_NAMES
-            = "stub,bean,class,direct,kamelet,log,platform-http,rest,seda,vertx-http";
+    private static final String[] ACCEPTED_STUB_NAMES = {
+            "stub", "bean", "class", "direct", "kamelet", "log", "platform-http", "rest", "seda"
+    };
 
-    private static final String ACCEPTED_TRANSFORM_NAMES
-            = "stub,direct,kamelet,log,seda";
+    private static final String[] ACCEPTED_TRANSFORM_NAMES = {
+            "stub", "direct", "kamelet", "log", "seda"
+    };
 
     private final CamelCatalog catalog = new DefaultCamelCatalog();
     private final CamelContext camelContext;
@@ -126,14 +129,14 @@ public final class DependencyDownloaderComponentResolver extends DefaultComponen
 
     private boolean accept(String name) {
         if (transform) {
-            return ACCEPTED_TRANSFORM_NAMES.contains(name);
+            return Arrays.stream(ACCEPTED_TRANSFORM_NAMES).anyMatch(n -> n.equals(name));
         }
         if (stubPattern == null) {
             return true;
         }
 
         // we are stubbing but need to accept the following
-        return ACCEPTED_STUB_NAMES.contains(name);
+        return Arrays.stream(ACCEPTED_STUB_NAMES).anyMatch(n -> n.equals(name));
     }
 
 }