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 de17d39a96c982302bc31423f946db0c0eb903c4
Author: lburgazzoli <lburgazz...@gmail.com>
AuthorDate: Wed Mar 25 15:28:30 2020 +0100

    knative-transport-http: remove redundant class
---
 .../camel/component/knative/http/KnativeHttp.java  | 25 ----------------------
 .../knative/http/KnativeHttpConsumer.java          |  2 +-
 .../knative/http/KnativeHttpProducer.java          |  6 +++---
 .../knative/http/KnativeHttpTransport.java         |  3 +++
 4 files changed, 7 insertions(+), 29 deletions(-)

diff --git 
a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttp.java
 
b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttp.java
deleted file mode 100644
index a7d83d3..0000000
--- 
a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttp.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.knative.http;
-
-public final class KnativeHttp {
-    public static final int DEFAULT_PORT = 8080;
-    public static final String DEFAULT_PATH = "/";
-
-    private KnativeHttp() {
-    }
-}
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 09d5a4f..810abcc 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
@@ -93,7 +93,7 @@ public class KnativeHttpConsumer extends DefaultConsumer {
         }
 
         if (route == null) {
-            String path = 
ObjectHelper.supplyIfEmpty(serviceDefinition.getPath(), () -> 
KnativeHttp.DEFAULT_PATH);
+            String path = 
ObjectHelper.supplyIfEmpty(serviceDefinition.getPath(), () -> 
KnativeHttpTransport.DEFAULT_PATH);
             if (ObjectHelper.isNotEmpty(basePath)) {
                 path = basePath + path;
             }
diff --git 
a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
 
b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
index 1e1b7ab..d7e696e 100644
--- 
a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
+++ 
b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpProducer.java
@@ -111,8 +111,8 @@ public class KnativeHttpProducer extends 
DefaultAsyncProducer {
             return true;
         }
 
-        final int port = 
serviceDefinition.getPortOrDefault(KnativeHttp.DEFAULT_PORT);
-        final String path = 
serviceDefinition.getPathOrDefault(KnativeHttp.DEFAULT_PATH);
+        final int port = 
serviceDefinition.getPortOrDefault(KnativeHttpTransport.DEFAULT_PORT);
+        final String path = 
serviceDefinition.getPathOrDefault(KnativeHttpTransport.DEFAULT_PATH);
 
         client.post(port, serviceDefinition.getHost(), path)
             .putHeaders(headers)
@@ -181,7 +181,7 @@ public class KnativeHttpProducer extends 
DefaultAsyncProducer {
     }
 
     private String getURI() {
-        String p = ObjectHelper.supplyIfEmpty(serviceDefinition.getPath(), () 
-> KnativeHttp.DEFAULT_PATH);
+        String p = ObjectHelper.supplyIfEmpty(serviceDefinition.getPath(), () 
-> KnativeHttpTransport.DEFAULT_PATH);
         if (!p.startsWith("/")) {
             p = "/" + p;
         }
diff --git 
a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpTransport.java
 
b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpTransport.java
index aa15464..9e7eb51 100644
--- 
a/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpTransport.java
+++ 
b/camel-knative/camel-knative-http/src/main/java/org/apache/camel/component/knative/http/KnativeHttpTransport.java
@@ -30,6 +30,9 @@ import org.apache.camel.k.http.PlatformHttp;
 import org.apache.camel.support.service.ServiceSupport;
 
 public class KnativeHttpTransport extends ServiceSupport implements 
CamelContextAware, KnativeTransport {
+    public static final int DEFAULT_PORT = 8080;
+    public static final String DEFAULT_PATH = "/";
+    
     private PlatformHttp platformHttp;
     private WebClientOptions vertxHttpClientOptions;
     private CamelContext camelContext;

Reply via email to