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/03/25 15:37:48 UTC

[camel-k-runtime] 01/02: knative-transport-http: warn if host or port are configured for sources

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 b431294511f76216a2a8f81fe9a24a186fb8dcfa
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Wed Mar 25 14:21:48 2020 +0100

    knative-transport-http: warn if host or port are configured for sources
---
 .../apache/camel/component/knative/http/KnativeHttpConsumer.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpConsumer.java b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpConsumer.java
index d8d3688..09d5a4f 100644
--- a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpConsumer.java
+++ b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpConsumer.java
@@ -85,6 +85,13 @@ public class KnativeHttpConsumer extends DefaultConsumer {
 
     @Override
     protected void doStart() throws Exception {
+        if (!ObjectHelper.isEmpty(serviceDefinition.getHost())) {
+            LOGGER.warn("Unsupported property `host` on definition={}", serviceDefinition.getName());
+        }
+        if (serviceDefinition.getPort() >= 0) {
+            LOGGER.warn("Unsupported property `port` on definition={}", serviceDefinition.getName());
+        }
+
         if (route == null) {
             String path = ObjectHelper.supplyIfEmpty(serviceDefinition.getPath(), () -> KnativeHttp.DEFAULT_PATH);
             if (ObjectHelper.isNotEmpty(basePath)) {