From afd3847ef8a2b2385b418bfd49d116fb8f3f477e Mon Sep 17 00:00:00 2001 From: Luca Burgazzoli Date: Mon, 21 Sep 2020 16:18:29 +0200 Subject: [PATCH] camel-knative: fix configurers --- .../component/knative/KnativeComponentConfigurer.java | 5 ----- .../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 76f624005..a3d240ad2 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 boolean configure(CamelContext camelContext, Object obj, String name, Obj 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 Map getAllOptions(Object target) { 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 Object getOptionValue(Object obj, String name, boolean ignoreCase) { 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 078168fde..337626bcd 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 transportOptions; - private boolean managedTransport; public KnativeComponent() { @@ -172,8 +169,8 @@ protected void doInit() throws Exception { .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;