You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/09/21 15:09:54 UTC

[camel-k-runtime] 03/03: camel-knative: fix configurers

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

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git

commit afd3847ef8a2b2385b418bfd49d116fb8f3f477e
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Mon Sep 21 16:18:29 2020 +0200

    camel-knative: fix configurers
---
 .../apache/camel/component/knative/KnativeComponentConfigurer.java | 5 -----
 .../java/org/apache/camel/component/knative/KnativeComponent.java  | 7 ++-----
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java b/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java
index 76f6240..a3d240a 100644
--- a/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java
+++ b/camel-knative/camel-knative/src/generated/java/org/apache/camel/component/knative/KnativeComponentConfigurer.java
@@ -53,8 +53,6 @@ public class KnativeComponentConfigurer extends PropertyConfigurerSupport implem
         case "serviceName": getOrCreateConfiguration(target).setServiceName(property(camelContext, java.lang.String.class, value)); return true;
         case "transport": target.setTransport(property(camelContext, org.apache.camel.component.knative.spi.KnativeTransport.class, value)); return true;
         case "transportoptions":
-        case "transportOptions": target.setTransportOptions(property(camelContext, java.util.Map.class, value)); return true;
-        case "transportoptions":
         case "transportOptions": getOrCreateConfiguration(target).setTransportOptions(property(camelContext, java.util.Map.class, value)); return true;
         default: return false;
         }
@@ -80,7 +78,6 @@ public class KnativeComponentConfigurer extends PropertyConfigurerSupport implem
         answer.put("serviceName", java.lang.String.class);
         answer.put("transport", org.apache.camel.component.knative.spi.KnativeTransport.class);
         answer.put("transportOptions", java.util.Map.class);
-        answer.put("transportOptions", java.util.Map.class);
         return answer;
     }
 
@@ -115,8 +112,6 @@ public class KnativeComponentConfigurer extends PropertyConfigurerSupport implem
         case "serviceName": return getOrCreateConfiguration(target).getServiceName();
         case "transport": return target.getTransport();
         case "transportoptions":
-        case "transportOptions": return target.getTransportOptions();
-        case "transportoptions":
         case "transportOptions": return getOrCreateConfiguration(target).getTransportOptions();
         default: return null;
         }
diff --git a/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java b/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java
index 078168f..337626b 100644
--- a/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java
+++ b/camel-knative/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java
@@ -52,9 +52,6 @@ public class KnativeComponent extends DefaultComponent {
     @Metadata
     private KnativeTransport transport;
 
-    @Metadata
-    private Map<String, Object> transportOptions;
-
     private boolean managedTransport;
 
     public KnativeComponent() {
@@ -172,8 +169,8 @@ public class KnativeComponent extends DefaultComponent {
                     .newInstance(protocol.name(), KnativeTransport.class)
                     .orElseThrow(() -> new RuntimeException("Error creating knative transport for protocol: " + protocol.name()));
 
-                if (transportOptions != null) {
-                    setProperties(transport, new HashMap<>(transportOptions));
+                if (configuration.getTransportOptions() != null) {
+                    setProperties(transport, new HashMap<>(configuration.getTransportOptions()));
                 }
 
                 this.managedTransport = true;