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 2022/01/11 14:27:04 UTC

[camel] branch main updated (8125268 -> 0e4f492)

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

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


    from 8125268  Upgrade Snakeyaml to version 1.30
     new a414473  CAMEL-17388: camel-yaml-dsl - Loading kamelet binding error handler DLC renamed to sink
     new 0e4f492  CAMEL-17286: camel-core - RemoveProperty EIP propertyName should be renamed to name

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:
 .../java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java   | 8 ++------
 .../org/apache/camel/dsl/yaml/KameletBindingLoaderTest.groovy     | 4 ++--
 .../groovy/org/apache/camel/dsl/yaml/RemovePropertyTest.groovy    | 6 +++---
 3 files changed, 7 insertions(+), 11 deletions(-)

[camel] 01/02: CAMEL-17388: camel-yaml-dsl - Loading kamelet binding error handler DLC renamed to sink

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

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

commit a41447304f1325064792477c07b27f56d4f502aa
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jan 11 15:21:57 2022 +0100

    CAMEL-17388: camel-yaml-dsl - Loading kamelet binding error handler DLC renamed to sink
---
 .../java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java   | 8 ++------
 .../org/apache/camel/dsl/yaml/KameletBindingLoaderTest.groovy     | 4 ++--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java
index de5750e..0265a3b 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/java/org/apache/camel/dsl/yaml/YamlRoutesBuilderLoader.java
@@ -339,9 +339,9 @@ public class YamlRoutesBuilderLoader extends YamlRoutesBuilderLoaderSupport {
                 String ehName = asText(nt.getKeyNode());
 
                 DefaultErrorHandlerProperties ehb = null;
-                if ("dead-letter-channel".equals(ehName)) {
+                if ("sink".equals(ehName)) {
+                    // a sink is a dead letter queue
                     DeadLetterChannelBuilder dlch = new DeadLetterChannelBuilder();
-                    // endpoint
                     MappingNode endpoint = asMappingNode(nodeAt(nt.getValueNode(), "/endpoint"));
                     String dlq = extractCamelEndpointUri(endpoint);
                     dlch.setDeadLetterUri(dlq);
@@ -351,10 +351,6 @@ public class YamlRoutesBuilderLoader extends YamlRoutesBuilderLoaderSupport {
                     ehb = new DefaultErrorHandlerBuilder();
                 } else if ("none".equals(ehName)) {
                     route.errorHandler(new NoErrorHandlerBuilder());
-                } else if ("bean".equals(ehName)) {
-                    throw new IllegalArgumentException("Bean error handler is not supported");
-                } else if ("ref".equals(ehName)) {
-                    throw new IllegalArgumentException("Ref error handler is not supported");
                 }
 
                 // some error handlers support additional parameters
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletBindingLoaderTest.groovy b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletBindingLoaderTest.groovy
index db28d55..b3da18f 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletBindingLoaderTest.groovy
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletBindingLoaderTest.groovy
@@ -330,7 +330,7 @@ class KameletBindingLoaderTest extends YamlTestSupport {
                       apiVersion: camel.apache.org/v1alpha1
                       name: log-sink
                   errorHandler:
-                    dead-letter-channel:
+                    sink:
                       endpoint:
                         ref:
                           kind: Kamelet
@@ -396,7 +396,7 @@ class KameletBindingLoaderTest extends YamlTestSupport {
                       apiVersion: camel.apache.org/v1alpha1
                       name: log-sink
                   errorHandler:
-                    dead-letter-channel:
+                    sink:
                       endpoint:
                         uri: mock:dead
                       parameters:

[camel] 02/02: CAMEL-17286: camel-core - RemoveProperty EIP propertyName should be renamed to name

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

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

commit 0e4f4923440c3ef34306595ab70447879bdab4e5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jan 11 15:26:30 2022 +0100

    CAMEL-17286: camel-core - RemoveProperty EIP propertyName should be renamed to name
---
 .../test/groovy/org/apache/camel/dsl/yaml/RemovePropertyTest.groovy | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RemovePropertyTest.groovy b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RemovePropertyTest.groovy
index e6e078d..6f4b2db 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RemovePropertyTest.groovy
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/RemovePropertyTest.groovy
@@ -28,7 +28,7 @@ class RemovePropertyTest extends YamlTestSupport {
             context.routesLoader.loadRoutes(resource)
         then:
             with(context.routeDefinitions[0].outputs[0], RemovePropertyDefinition) {
-                propertyName == 'test'
+                name == 'test'
             }
         where:
             resource << [
@@ -37,7 +37,7 @@ class RemovePropertyTest extends YamlTestSupport {
                         uri: "direct:start"
                         steps:    
                           - remove-property:
-                              property-name: test
+                              name: test
                           - to: "mock:result"
                     '''),
                 asResource('expression-block', '''
@@ -45,7 +45,7 @@ class RemovePropertyTest extends YamlTestSupport {
                         uri: "direct:start"
                         steps:    
                           - remove-property:
-                              property-name: test
+                              name: test
                           - to: "mock:result"
                     ''')
             ]