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/03/07 21:02:47 UTC

[camel] branch main updated (db1f11c -> 8ac4b1e)

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 db1f11c  Regen for commit 2b811b65ab6c17cc7bb44dc67912ec18b7cf1744
     new 07c08d2  CAMEL-15520: fixed deprecations in camel-jaxb
     new de3f0c5  CAMEL-15520: fixed deprecations in camel-jetty-common
     new 8ac4b1e  CAMEL-15520: fixed deprecated usage of HttpOperationFailedException in camel-http, camel-jetty-common, camel-netty-http and camel-undertow compoonents

The 3 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:
 .../http/common/HttpOperationFailedException.java  | 31 ----------------------
 .../common/HttpOperationFailedExceptionTest.java   |  1 +
 .../camel/component/http/HttpPollingConsumer.java  |  2 +-
 .../apache/camel/component/http/HttpProducer.java  |  2 +-
 .../camel/component/http/HeaderFilteringTest.java  |  2 +-
 .../component/http/HttpDefaultPortNumberTest.java  |  2 +-
 .../camel/component/http/HttpRedirectTest.java     |  2 +-
 .../camel/component/http/HttpSNIHostNameTest.java  |  2 +-
 .../http/HttpThrowExceptionOnFailureTest.java      |  2 +-
 .../org/apache/camel/jaxb/MyPersonService.java     |  2 +-
 .../camel/component/jetty/JettyHttpBinding.java    |  4 +--
 .../camel/component/jetty/JettyHttpComponent.java  |  6 +++--
 .../http/rest/RestNettyMethodNotAllowedTest.java   |  2 +-
 .../undertow/UndertowPrefixMatchingTest.java       |  2 +-
 .../rest/RestUndertowMethodNotAllowedTest.java     |  2 +-
 15 files changed, 18 insertions(+), 46 deletions(-)
 delete mode 100644 components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpOperationFailedException.java

[camel] 02/03: CAMEL-15520: fixed deprecations in camel-jetty-common

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 de3f0c5b12b57434dcddcf79acc660029d0d5f93
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Mar 7 15:40:03 2022 +0100

    CAMEL-15520: fixed deprecations in camel-jetty-common
---
 .../java/org/apache/camel/component/jetty/JettyHttpComponent.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
index a3cd4e3..b51044c 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpComponent.java
@@ -638,9 +638,11 @@ public abstract class JettyHttpComponent extends HttpCommonComponent
 
     private SslContextFactory createSslContextFactory(SSLContextParameters ssl, boolean client)
             throws GeneralSecurityException, IOException {
-        SslContextFactory answer = new SslContextFactory();
+        SslContextFactory answer;
         if (!client) {
-            answer.setEndpointIdentificationAlgorithm(null);
+            answer = new SslContextFactory.Server();
+        } else {
+            answer = new SslContextFactory.Client();
         }
         if (ssl != null) {
             answer.setSslContext(ssl.createSSLContext(getCamelContext()));

[camel] 03/03: CAMEL-15520: fixed deprecated usage of HttpOperationFailedException in camel-http, camel-jetty-common, camel-netty-http and camel-undertow compoonents

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 8ac4b1edb02f32679a9608cda4f4ac11ecf27845
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Mar 7 15:51:58 2022 +0100

    CAMEL-15520: fixed deprecated usage of HttpOperationFailedException in camel-http, camel-jetty-common, camel-netty-http and camel-undertow compoonents
---
 .../http/common/HttpOperationFailedException.java  | 31 ----------------------
 .../common/HttpOperationFailedExceptionTest.java   |  1 +
 .../camel/component/http/HttpPollingConsumer.java  |  2 +-
 .../apache/camel/component/http/HttpProducer.java  |  2 +-
 .../camel/component/http/HeaderFilteringTest.java  |  2 +-
 .../component/http/HttpDefaultPortNumberTest.java  |  2 +-
 .../camel/component/http/HttpRedirectTest.java     |  2 +-
 .../camel/component/http/HttpSNIHostNameTest.java  |  2 +-
 .../http/HttpThrowExceptionOnFailureTest.java      |  2 +-
 .../camel/component/jetty/JettyHttpBinding.java    |  4 +--
 .../http/rest/RestNettyMethodNotAllowedTest.java   |  2 +-
 .../undertow/UndertowPrefixMatchingTest.java       |  2 +-
 .../rest/RestUndertowMethodNotAllowedTest.java     |  2 +-
 13 files changed, 13 insertions(+), 43 deletions(-)

diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpOperationFailedException.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpOperationFailedException.java
deleted file mode 100644
index cb754a6..0000000
--- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpOperationFailedException.java
+++ /dev/null
@@ -1,31 +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.http.common;
-
-import java.util.Map;
-
-/**
- * @deprecated use org.apache.camel.http.base.HttpOperationFailedException
- */
-@Deprecated
-public class HttpOperationFailedException extends org.apache.camel.http.base.HttpOperationFailedException {
-
-    public HttpOperationFailedException(String uri, int statusCode, String statusText, String location,
-                                        Map<String, String> responseHeaders, String responseBody) {
-        super(uri, statusCode, statusText, location, responseHeaders, responseBody);
-    }
-}
diff --git a/components/camel-http-common/src/test/java/org/apache/camel/http/common/HttpOperationFailedExceptionTest.java b/components/camel-http-common/src/test/java/org/apache/camel/http/common/HttpOperationFailedExceptionTest.java
index 1c014aa..cfcc2ab 100644
--- a/components/camel-http-common/src/test/java/org/apache/camel/http/common/HttpOperationFailedExceptionTest.java
+++ b/components/camel-http-common/src/test/java/org/apache/camel/http/common/HttpOperationFailedExceptionTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.http.common;
 
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertFalse;
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java
index 4359d8d..d86f6d3 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpPollingConsumer.java
@@ -91,7 +91,7 @@ public class HttpPollingConsumer extends PollingConsumerSupport {
             Object body = HttpHelper.cacheResponseBodyFromInputStream(responseEntity.getContent(), exchange);
 
             // lets store the result in the output message.
-            Message message = exchange.getOut();
+            Message message = exchange.getMessage();
             message.setBody(body);
 
             // lets set the headers
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 b6dabfa..b5fb2b2 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
@@ -43,8 +43,8 @@ import org.apache.camel.TypeConverter;
 import org.apache.camel.component.file.GenericFile;
 import org.apache.camel.component.http.helper.HttpMethodHelper;
 import org.apache.camel.converter.stream.CachedOutputStream;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.apache.camel.http.common.HttpHelper;
-import org.apache.camel.http.common.HttpOperationFailedException;
 import org.apache.camel.http.common.HttpProtocolHeaderFilterStrategy;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.support.DefaultProducer;
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java
index d190653..195aecd 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HeaderFilteringTest.java
@@ -29,7 +29,7 @@ import java.util.Collections;
 import com.sun.net.httpserver.HttpExchange;
 import com.sun.net.httpserver.HttpServer;
 import org.apache.camel.Producer;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.spi.RestConfiguration;
 import org.apache.camel.support.DefaultExchange;
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java
index 49a10ef..6c5a5a7 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDefaultPortNumberTest.java
@@ -146,7 +146,7 @@ public class HttpDefaultPortNumberTest extends BaseHttpTest {
     }
 
     private void assertRefused(Exchange exchange, String portExt) {
-        Map<String, Object> headers = exchange.getOut().getHeaders();
+        Map<String, Object> headers = exchange.getMessage().getHeaders();
         //no http response:
         assertNull(headers.get(Exchange.HTTP_RESPONSE_CODE));
         //and got an exception:
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java
index d4dcd32..71e5ab4 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpRedirectTest.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSNIHostNameTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSNIHostNameTest.java
index 72797a0..8bfb32d 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSNIHostNameTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSNIHostNameTest.java
@@ -17,7 +17,7 @@
 package org.apache.camel.component.http;
 
 import org.apache.camel.CamelExecutionException;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
diff --git a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java
index 120e021..1dcd41f 100644
--- a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java
+++ b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpThrowExceptionOnFailureTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.component.http.handler.BasicValidationHandler;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.apache.http.HttpStatus;
 import org.apache.http.impl.bootstrap.HttpServer;
 import org.apache.http.impl.bootstrap.ServerBootstrap;
diff --git a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpBinding.java b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpBinding.java
index a5516f6..097c79f 100644
--- a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpBinding.java
+++ b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/JettyHttpBinding.java
@@ -50,7 +50,7 @@ public interface JettyHttpBinding {
     void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy);
 
     /**
-     * Whether to throw {@link org.apache.camel.http.common.HttpOperationFailedException} in case of response code !=
+     * Whether to throw {@link org.apache.camel.http.base.HttpOperationFailedException} in case of response code !=
      * 200.
      *
      * @param throwExceptionOnFailure <tt>true</tt> to throw exception
@@ -58,7 +58,7 @@ public interface JettyHttpBinding {
     void setThrowExceptionOnFailure(boolean throwExceptionOnFailure);
 
     /**
-     * Whether to throw {@link org.apache.camel.http.common.HttpOperationFailedException} in case of response code !=
+     * Whether to throw {@link org.apache.camel.http.base.HttpOperationFailedException} in case of response code !=
      * 200.
      *
      * @return <tt>true</tt> to throw exception
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestNettyMethodNotAllowedTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestNettyMethodNotAllowedTest.java
index dbca4bb..a5140bb 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestNettyMethodNotAllowedTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/rest/RestNettyMethodNotAllowedTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.netty.http.rest;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.netty.http.BaseNettyTest;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
index b99d66d..de88316 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowPrefixMatchingTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.undertow;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMethodNotAllowedTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMethodNotAllowedTest.java
index dfc57fd..75271b8 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMethodNotAllowedTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowMethodNotAllowedTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.undertow.rest;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.undertow.BaseUndertowTest;
-import org.apache.camel.http.common.HttpOperationFailedException;
+import org.apache.camel.http.base.HttpOperationFailedException;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;

[camel] 01/03: CAMEL-15520: fixed deprecations in camel-jaxb

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 07c08d285dd6d67fbb19eb1966d5961c1fccbe3e
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Mar 7 15:38:01 2022 +0100

    CAMEL-15520: fixed deprecations in camel-jaxb
---
 .../camel-jaxb/src/test/java/org/apache/camel/jaxb/MyPersonService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/MyPersonService.java b/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/MyPersonService.java
index 9bea00b..d80d6f0 100644
--- a/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/MyPersonService.java
+++ b/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/MyPersonService.java
@@ -29,7 +29,7 @@ public class MyPersonService {
         person.setFirstName("Homer");
         person.setLastName("Simpson");
 
-        exchange.getOut().setBody(person);
+        exchange.getMessage().setBody(person);
     }
 
     public void sendPerson(Exchange exchange) {