You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/06/21 11:42:16 UTC

[camel] branch main updated (0940f345ab6 -> 5a93a01ebd7)

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

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


    from 0940f345ab6 CAMEL-18204: camel-jbang - Export to quarkus should use quarkus catalog to know if the JARs are an extension or not to generate correct pom.xml
     new 45c3136cb0a (chores) camel-http-common: removed unused parameters
     new e268b4b196c (chores) camel-http: removed unused parameters
     new 6e2682ae46c (chores) camel-resteasy: removed unused parameters
     new 00a8f4a2295 (chores) camel-netty-http: removed unused parameters
     new 5a93a01ebd7 (chores) camel-platform-http-vertx: removed unused parameters

The 5 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:
 .../apache/camel/http/common/DefaultHttpRegistry.java    |  4 ----
 .../http/common/HttpServletResolveConsumerStrategy.java  |  4 ++--
 .../org/apache/camel/component/http/HttpComponent.java   |  4 ----
 .../org/apache/camel/component/http/HttpProducer.java    | 16 ++++++++--------
 .../camel/component/netty/http/NettyHttpHelper.java      |  3 +--
 .../camel/component/netty/http/NettyHttpProducer.java    |  2 +-
 .../platform/http/vertx/VertxPlatformHttpSupport.java    |  4 ++--
 .../camel/component/resteasy/ResteasyComponent.java      |  7 +------
 8 files changed, 15 insertions(+), 29 deletions(-)


[camel] 01/05: (chores) camel-http-common: removed unused parameters

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

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

commit 45c3136cb0ab4b14b2b3bb30960c0df538e43439
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 21 09:14:01 2022 +0200

    (chores) camel-http-common: removed unused parameters
---
 .../main/java/org/apache/camel/http/common/DefaultHttpRegistry.java   | 4 ----
 .../apache/camel/http/common/HttpServletResolveConsumerStrategy.java  | 4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpRegistry.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpRegistry.java
index 371691af310..d8761440cb7 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpRegistry.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/DefaultHttpRegistry.java
@@ -89,10 +89,6 @@ public class DefaultHttpRegistry implements HttpRegistry {
         register(camelServlet);
     }
 
-    public void unregister(HttpRegistryProvider provider, Map<String, Object> properties) {
-        unregister(provider);
-    }
-
     @Override
     public void register(HttpRegistryProvider provider) {
         synchronized (lock) {
diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpServletResolveConsumerStrategy.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpServletResolveConsumerStrategy.java
index 22f049b9496..07c7ee032cc 100644
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpServletResolveConsumerStrategy.java
+++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpServletResolveConsumerStrategy.java
@@ -48,7 +48,7 @@ public class HttpServletResolveConsumerStrategy implements ServletResolveConsume
         }
         HttpConsumer answer = consumers.get(path);
 
-        List<HttpConsumer> candidates = resolveCandidates(request, method, consumers);
+        List<HttpConsumer> candidates = resolveCandidates(request, consumers);
         // extra filter by restrict
         candidates = candidates.stream().filter(c -> matchRestMethod(method, c.getEndpoint().getHttpMethodRestrict()))
                 .collect(Collectors.toList());
@@ -60,7 +60,7 @@ public class HttpServletResolveConsumerStrategy implements ServletResolveConsume
     }
 
     private List<HttpConsumer> resolveCandidates(
-            HttpServletRequest request, String method, Map<String, HttpConsumer> consumers) {
+            HttpServletRequest request, Map<String, HttpConsumer> consumers) {
         String path = request.getPathInfo();
 
         List<HttpConsumer> candidates = new ArrayList<>();


[camel] 05/05: (chores) camel-platform-http-vertx: removed unused parameters

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

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

commit 5a93a01ebd71b7f6f9b0cf26bd48bfb1938a24bc
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 21 09:17:44 2022 +0200

    (chores) camel-platform-http-vertx: removed unused parameters
---
 .../camel/component/platform/http/vertx/VertxPlatformHttpSupport.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpSupport.java b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpSupport.java
index e2ec4dda423..0a55082f21d 100644
--- a/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpSupport.java
+++ b/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpSupport.java
@@ -116,7 +116,7 @@ public final class VertxPlatformHttpSupport {
         }
 
         // set the content-length if it can be determined, or chunked encoding
-        final Integer length = determineContentLength(exchange, body);
+        final Integer length = determineContentLength(body);
         if (length != null) {
             response.putHeader("Content-Length", String.valueOf(length));
         } else {
@@ -132,7 +132,7 @@ public final class VertxPlatformHttpSupport {
         return body;
     }
 
-    static Integer determineContentLength(Exchange camelExchange, Object body) {
+    static Integer determineContentLength(Object body) {
         if (body instanceof byte[]) {
             return ((byte[]) body).length;
         } else if (body instanceof ByteBuffer) {


[camel] 02/05: (chores) camel-http: removed unused parameters

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

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

commit e268b4b196cb4e2114f75f6b6003f8443e550d90
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 21 09:14:46 2022 +0200

    (chores) camel-http: removed unused parameters
---
 .../org/apache/camel/component/http/HttpComponent.java   |  4 ----
 .../org/apache/camel/component/http/HttpProducer.java    | 16 ++++++++--------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
index 5d3fd454eff..54ecf90eed3 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
@@ -187,10 +187,6 @@ public class HttpComponent extends HttpCommonComponent implements RestProducerFa
     protected String userAgent;
 
     public HttpComponent() {
-        this(HttpEndpoint.class);
-    }
-
-    public HttpComponent(Class<? extends HttpEndpoint> endpointClass) {
         registerExtension(HttpComponentVerifierExtension::new);
     }
 
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index b8897364913..189a49e5016 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -160,7 +160,7 @@ public class HttpProducer extends DefaultProducer {
         }
 
         HttpRequestBase httpRequest = createMethod(exchange);
-        HttpHost httpHost = createHost(httpRequest, exchange);
+        HttpHost httpHost = createHost(httpRequest);
 
         Message in = exchange.getIn();
         String httpProtocolVersion = in.getHeader(HttpConstants.HTTP_PROTOCOL_VERSION, String.class);
@@ -278,7 +278,7 @@ public class HttpProducer extends DefaultProducer {
 
             if (!throwException) {
                 // if we do not use failed exception then populate response for all response codes
-                populateResponse(exchange, httpRequest, httpResponse, in, strategy, responseCode);
+                populateResponse(exchange, httpRequest, httpResponse, strategy, responseCode);
             } else {
                 boolean ok;
                 if (minOkRange > 0) {
@@ -288,7 +288,7 @@ public class HttpProducer extends DefaultProducer {
                 }
                 if (ok) {
                     // only populate response for OK response
-                    populateResponse(exchange, httpRequest, httpResponse, in, strategy, responseCode);
+                    populateResponse(exchange, httpRequest, httpResponse, strategy, responseCode);
                 } else {
                     // operation failed so populate exception to throw
                     throw populateHttpOperationFailedException(exchange, httpRequest, httpResponse, responseCode);
@@ -326,10 +326,10 @@ public class HttpProducer extends DefaultProducer {
 
     protected void populateResponse(
             Exchange exchange, HttpRequestBase httpRequest, HttpResponse httpResponse,
-            Message in, HeaderFilterStrategy strategy, int responseCode)
+            HeaderFilterStrategy strategy, int responseCode)
             throws IOException, ClassNotFoundException {
         // We just make the out message is not create when extractResponseBody throws exception
-        Object response = extractResponseBody(httpRequest, httpResponse, exchange, getEndpoint().isIgnoreResponseBody());
+        Object response = extractResponseBody(httpResponse, exchange, getEndpoint().isIgnoreResponseBody());
         Message answer = exchange.getOut();
 
         // optimize for 200 response code as the boxing is outside the cached integers
@@ -403,7 +403,7 @@ public class HttpProducer extends DefaultProducer {
             getEndpoint().getCookieHandler().storeCookies(exchange, httpRequest.getURI(), m);
         }
 
-        Object responseBody = extractResponseBody(httpRequest, httpResponse, exchange, getEndpoint().isIgnoreResponseBody());
+        Object responseBody = extractResponseBody(httpResponse, exchange, getEndpoint().isIgnoreResponseBody());
         if (transferException && responseBody instanceof Exception) {
             // if the response was a serialized exception then use that
             return (Exception) responseBody;
@@ -468,7 +468,7 @@ public class HttpProducer extends DefaultProducer {
      * Extracts the response from the method as a InputStream.
      */
     protected Object extractResponseBody(
-            HttpRequestBase httpRequest, HttpResponse httpResponse, Exchange exchange, boolean ignoreResponseBody)
+            HttpResponse httpResponse, Exchange exchange, boolean ignoreResponseBody)
             throws IOException, ClassNotFoundException {
         HttpEntity entity = httpResponse.getEntity();
         if (entity == null) {
@@ -562,7 +562,7 @@ public class HttpProducer extends DefaultProducer {
     /**
      * Creates the HttpHost to use to call the remote server
      */
-    protected HttpHost createHost(HttpRequestBase httpRequest, Exchange exchange) {
+    protected HttpHost createHost(HttpRequestBase httpRequest) {
         if (httpRequest.getURI() == defaultUri) {
             return defaultHttpHost;
         } else {


[camel] 04/05: (chores) camel-netty-http: removed unused parameters

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

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

commit 00a8f4a229545a4c92e0f9e5daeef0617a4bdf9e
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 21 09:16:23 2022 +0200

    (chores) camel-netty-http: removed unused parameters
---
 .../java/org/apache/camel/component/netty/http/NettyHttpHelper.java    | 3 +--
 .../java/org/apache/camel/component/netty/http/NettyHttpProducer.java  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpHelper.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpHelper.java
index 3c4fdec9475..c5523bf57b6 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpHelper.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpHelper.java
@@ -236,10 +236,9 @@ public final class NettyHttpHelper {
      *
      * @param  exchange the exchange
      * @param  url      the url to invoke
-     * @param  endpoint the endpoint
      * @return          the URI to invoke
      */
-    public static URI createURI(Exchange exchange, String url, NettyHttpEndpoint endpoint) throws URISyntaxException {
+    public static URI createURI(Exchange exchange, String url) throws URISyntaxException {
         URI uri = new URI(url);
 
         // rest producer may provide an override query string to be used which we should discard if using (hence the remove)
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpProducer.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpProducer.java
index c96c0c73698..0baa9b67b36 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpProducer.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpProducer.java
@@ -91,7 +91,7 @@ public class NettyHttpProducer extends NettyProducer {
         // creating the url to use takes 2-steps
         final NettyHttpEndpoint endpoint = getEndpoint();
         final String uri = NettyHttpHelper.createURL(exchange, endpoint);
-        final URI u = NettyHttpHelper.createURI(exchange, uri, endpoint);
+        final URI u = NettyHttpHelper.createURI(exchange, uri);
 
         final NettyHttpBinding nettyHttpBinding = endpoint.getNettyHttpBinding();
         final HttpRequest request = nettyHttpBinding.toNettyRequest(exchange.getIn(), u.toString(), getConfiguration());


[camel] 03/05: (chores) camel-resteasy: removed unused parameters

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

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

commit 6e2682ae46ce74e6bd7c4859a3116e8b35a03d58
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jun 21 09:15:31 2022 +0200

    (chores) camel-resteasy: removed unused parameters
---
 .../org/apache/camel/component/resteasy/ResteasyComponent.java     | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/components/camel-resteasy/src/main/java/org/apache/camel/component/resteasy/ResteasyComponent.java b/components/camel-resteasy/src/main/java/org/apache/camel/component/resteasy/ResteasyComponent.java
index 6a90d1488d6..3a10e36c9cc 100644
--- a/components/camel-resteasy/src/main/java/org/apache/camel/component/resteasy/ResteasyComponent.java
+++ b/components/camel-resteasy/src/main/java/org/apache/camel/component/resteasy/ResteasyComponent.java
@@ -37,7 +37,6 @@ import org.apache.camel.spi.annotations.Component;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
-import org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher;
 
 @Component("resteasy")
 @Metadata(excludeProperties = "clientConnectionManager,connectionsPerRoute,connectionTimeToLive,"
@@ -52,11 +51,7 @@ public class ResteasyComponent extends HttpComponent implements RestConsumerFact
     private String proxyConsumersClasses;
 
     public ResteasyComponent() {
-        super(ResteasyEndpoint.class);
-    }
-
-    public ResteasyComponent(HttpServletDispatcher dispatcher) {
-        super(ResteasyEndpoint.class);
+        super();
     }
 
     @Override