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/10 16:30:33 UTC

[camel] branch main updated (49b7083 -> d60678f)

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 49b7083  Fix typo in camel-tarfile and camel-zipfile docs
     new 4993804  CAMEL-17763: cleaned up unused exceptions in camel-xmpp
     new 83adf8f  CAMEL-17763: cleaned up unused exceptions in camel-xmlsecurity
     new a9417cf  CAMEL-17763: cleaned up unused exceptions in camel-velocity
     new 8fd5abe  CAMEL-17763: cleaned up unused exceptions in camel-weather
     new 67df035  CAMEL-17763: cleaned up unused exceptions in camel-weka
     new 691bf82  CAMEL-17763: cleaned up unused exceptions in camel-base64
     new 23d9ae0  CAMEL-17763: cleaned up unused exceptions in camel-jsonpath
     new acac2bd  CAMEL-17763: cleaned up unused exceptions in camel-platform-http
     new 104cf84  CAMEL-17763: cleaned up unused exceptions in camel-platform-http-vertx
     new 1247a4e  CAMEL-17763: cleaned up unused exceptions in camel-snakeyaml
     new 57b92f0  CAMEL-17763: cleaned up unused exceptions in camel-solr
     new 81fd61f  CAMEL-17763: cleaned up unused exceptions in camel-stomp
     new ee48981  CAMEL-17763: cleaned up unused exceptions in camel-tarfile
     new d60678f  CAMEL-17763: cleaned up unused exceptions in camel-pulsar

The 14 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:
 .../base64/Base64PropertiesFunctionTest.java       |  4 +-
 .../org/apache/camel/jsonpath/JsonPathCBRTest.java |  4 +-
 .../apache/camel/jsonpath/JsonPathCharsetTest.java |  4 +-
 .../jsonpath/JsonPathExchangePropertyTest.java     |  4 +-
 .../camel/jsonpath/JsonPathHeaderNameTest.java     |  4 +-
 .../camel/jsonpath/JsonPathLanguageTest.java       | 10 ++--
 .../camel/jsonpath/JsonPathMapTransformTest.java   |  4 +-
 .../camel/jsonpath/JsonPathMockMatchesTest.java    |  4 +-
 .../camel/jsonpath/JsonPathPojoTransformTest.java  |  4 +-
 .../apache/camel/jsonpath/JsonPathSourceTest.java  |  4 +-
 .../apache/camel/jsonpath/JsonPathSplitTest.java   |  4 +-
 .../JsonPathSplitWriteAsStringMapTest.java         |  4 +-
 .../jsonpath/JsonPathSplitWriteAsStringTest.java   |  4 +-
 .../jsonpath/JsonPathStreamCachingCBRTest.java     |  4 +-
 .../camel/jsonpath/JsonPathSuppressTest.java       |  4 +-
 .../jsonpath/JsonPathTransformHeaderNameTest.java  |  4 +-
 .../JsonPathTransformONielEscapedTest.java         |  4 +-
 .../JsonPathTransformONielPlaceholderTest.java     |  4 +-
 .../camel/jsonpath/JsonPathTransformONielTest.java |  4 +-
 .../jsonpath/JsonPathTransformResultTypeTest.java  |  4 +-
 .../camel/jsonpath/JsonPathTransformTest.java      |  4 +-
 .../camel/jsonpath/JsonPathWithSimpleCBRTest.java  |  4 +-
 .../EasyJsonPathWithRootSimpleCBRTest.java         |  4 +-
 .../EasyJsonPathWithSimpleCBRTest.java             |  4 +-
 .../http/vertx/VertxPlatformHttpEngineTest.java    | 24 ++++-----
 ...rtxPlatformHttpEngineWithTypeConverterTest.java |  9 ++--
 .../http/vertx/VertxPlatformHttpJacksonTest.java   |  2 +-
 .../platform/http/AbstractPlatformHttpTest.java    |  2 +-
 .../http/JettyCustomPlatformHttpConsumer.java      |  5 +-
 .../component/platform/http/PlatformHttpTest.java  |  4 +-
 ...stPlatformHttpContextPathConfigurationTest.java |  2 +-
 .../integration/PulsarConsumerPatternInIT.java     |  4 +-
 .../component/snakeyaml/SnakeYAMLDoSTest.java      |  4 +-
 .../camel/component/snakeyaml/SnakeYAMLTest.java   |  4 +-
 .../snakeyaml/SnakeYAMLTypeFilterHelper.java       |  8 +--
 .../snakeyaml/SnakeYAMLTypeFilterTest.java         |  4 +-
 .../snakeyaml/SnakeYAMLUnmarshalTypeTest.java      |  6 +--
 .../camel/component/solr/InitSolrEndpointTest.java |  6 +--
 .../camel/component/solr/MapBodyManualIT.java      |  6 +--
 .../component/solr/SolrComponentTestSupport.java   |  4 +-
 .../component/solr/SolrServerMissingTest.java      |  6 +--
 .../camel/component/solr/SolrTestSupport.java      |  2 +-
 .../component/solr/SolrUpdateAutocommitTest.java   |  4 +-
 .../camel/component/solr/SolrUpdateTest.java       |  4 +-
 .../solr/integration/SolrCloudProducerIT.java      |  4 +-
 .../camel/component/stomp/StompBaseTest.java       |  2 +-
 .../component/stomp/StompCustomHeadersTest.java    |  2 +-
 .../dataformat/tarfile/TarFileDataFormatTest.java  | 10 ++--
 .../tarfile/TarFileMultipleFilesSplitterTest.java  |  4 +-
 .../tarfile/TarFileSplitAndDeleteTest.java         |  4 +-
 .../tarfile/TarFileSplitIteratorCorruptTest.java   |  4 +-
 .../tarfile/TarSplitterRouteIssueTest.java         |  4 +-
 .../dataformat/tarfile/TarSplitterRouteTest.java   |  4 +-
 .../AggregationStrategyWithFilenameHeaderTest.java |  4 +-
 .../AggregationStrategyWithPreservationTest.java   |  4 +-
 .../tarfile/TarAggregationStrategyTest.java        |  4 +-
 .../component/velocity/VelocityConcurrentTest.java |  2 +-
 .../velocity/VelocityContentCacheTest.java         |  4 +-
 .../velocity/VelocityDynamicTemplateTest.java      |  6 +--
 .../component/velocity/VelocityEncodingTest.java   |  4 +-
 .../component/velocity/VelocityFileLetterTest.java |  4 +-
 .../VelocityFileLetterWithPropertyTest.java        |  4 +-
 .../component/velocity/VelocityLetterTest.java     |  4 +-
 .../velocity/VelocityLetterWithParserTest.java     |  4 +-
 .../velocity/VelocityLetterWithoutHeaderTest.java  |  4 +-
 .../velocity/VelocityMethodInvokationTest.java     |  4 +-
 .../velocity/VelocityOverridesPropertiesTest.java  |  8 +--
 .../component/velocity/VelocitySetHeaderTest.java  |  2 +-
 .../velocity/VelocitySetTemplateViaHeaderTest.java |  4 +-
 .../VelocitySomeValuesNotInExchangeTest.java       |  4 +-
 .../velocity/VelocitySupplementalContextTest.java  |  4 +-
 .../velocity/VelocityTemplateInHeaderTest.java     |  2 +-
 .../camel/component/velocity/VelocityTest.java     |  8 +--
 .../velocity/VelocityValuesInPropertiesTest.java   |  6 +--
 .../weather/CurrentWeatherConsumerHtmlIT.java      |  4 +-
 .../weather/CurrentWeatherConsumerIT.java          |  4 +-
 .../weather/CurrentWeatherConsumerXmlIT.java       |  4 +-
 .../weather/CurrentWeatherMadridConsumerIT.java    |  4 +-
 .../weather/CurrentWeatherMadridProducerIT.java    |  4 +-
 .../weather/Forecast7WeatherMadridConsumerIT.java  |  4 +-
 .../camel/component/weka/DecisionTreeTest.java     |  6 +--
 .../apache/camel/component/weka/FilterTest.java    |  4 +-
 .../camel/component/weka/PredictionTest.java       |  4 +-
 .../apache/camel/component/weka/ReadWriteTest.java | 18 +++----
 .../component/xmlsecurity/ECDSASignatureTest.java  | 21 ++++----
 .../xmlsecurity/SignatureAlgorithmTest.java        | 42 ++++++++--------
 .../xmlsecurity/SignatureDigestMethodTest.java     | 30 +++++------
 .../xmlsecurity/SpringXmlSignatureTest.java        |  4 +-
 .../xmlsecurity/XAdESSignaturePropertiesTest.java  | 52 +++++++++----------
 .../component/xmlsecurity/XmlSignatureTest.java    | 58 +++++++++++-----------
 ...idationFailedHandlerIgnoreManifestFailures.java |  4 +-
 ...ature2Message2MessageWithTimestampProperty.java |  2 +-
 .../camel/dataformat/xmlsecurity/TestHelper.java   |  6 +--
 .../xmlsecurity/XMLSecurityConcurrencyTest.java    |  2 +-
 .../camel/component/xmpp/UriConfigurationTest.java |  8 +--
 .../component/xmpp/XmppDeferredConnectionTest.java |  2 +-
 .../xmpp/integration/XmppMultiUserChatIT.java      |  4 +-
 .../xmpp/integration/XmppProducerConcurrentIT.java |  4 +-
 .../xmpp/integration/XmppRouteChatIT.java          |  4 +-
 .../component/xmpp/integration/XmppRouteIT.java    |  2 +-
 ...XmppRouteMultipleProducersSingleConsumerIT.java |  4 +-
 101 files changed, 320 insertions(+), 325 deletions(-)

[camel] 07/14: CAMEL-17763: cleaned up unused exceptions in camel-jsonpath

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 23d9ae080a9809a5aee19cb3e8332967c92847ba
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:41:48 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-jsonpath
---
 .../test/java/org/apache/camel/jsonpath/JsonPathCBRTest.java   |  4 ++--
 .../java/org/apache/camel/jsonpath/JsonPathCharsetTest.java    |  4 ++--
 .../apache/camel/jsonpath/JsonPathExchangePropertyTest.java    |  4 ++--
 .../java/org/apache/camel/jsonpath/JsonPathHeaderNameTest.java |  4 ++--
 .../java/org/apache/camel/jsonpath/JsonPathLanguageTest.java   | 10 +++++-----
 .../org/apache/camel/jsonpath/JsonPathMapTransformTest.java    |  4 ++--
 .../org/apache/camel/jsonpath/JsonPathMockMatchesTest.java     |  4 ++--
 .../org/apache/camel/jsonpath/JsonPathPojoTransformTest.java   |  4 ++--
 .../java/org/apache/camel/jsonpath/JsonPathSourceTest.java     |  4 ++--
 .../test/java/org/apache/camel/jsonpath/JsonPathSplitTest.java |  4 ++--
 .../camel/jsonpath/JsonPathSplitWriteAsStringMapTest.java      |  4 ++--
 .../apache/camel/jsonpath/JsonPathSplitWriteAsStringTest.java  |  4 ++--
 .../apache/camel/jsonpath/JsonPathStreamCachingCBRTest.java    |  4 ++--
 .../java/org/apache/camel/jsonpath/JsonPathSuppressTest.java   |  4 ++--
 .../apache/camel/jsonpath/JsonPathTransformHeaderNameTest.java |  4 ++--
 .../camel/jsonpath/JsonPathTransformONielEscapedTest.java      |  4 ++--
 .../camel/jsonpath/JsonPathTransformONielPlaceholderTest.java  |  4 ++--
 .../org/apache/camel/jsonpath/JsonPathTransformONielTest.java  |  4 ++--
 .../apache/camel/jsonpath/JsonPathTransformResultTypeTest.java |  4 ++--
 .../java/org/apache/camel/jsonpath/JsonPathTransformTest.java  |  4 ++--
 .../org/apache/camel/jsonpath/JsonPathWithSimpleCBRTest.java   |  4 ++--
 .../easypredicate/EasyJsonPathWithRootSimpleCBRTest.java       |  4 ++--
 .../jsonpath/easypredicate/EasyJsonPathWithSimpleCBRTest.java  |  4 ++--
 23 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCBRTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCBRTest.java
index a4e077d..bea6bef 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCBRTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCBRTest.java
@@ -27,10 +27,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathCBRTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .choice()
                         .when().jsonpath("$.store.book[?(@.price < 10)]")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCharsetTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCharsetTest.java
index 74c74e1..d5c03aa 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCharsetTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathCharsetTest.java
@@ -32,10 +32,10 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 public class JsonPathCharsetTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start").transform().jsonpath("$.store.book[*].title").to("mock:authors");
             }
         };
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathExchangePropertyTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathExchangePropertyTest.java
index 82fbbac..c5a8528 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathExchangePropertyTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathExchangePropertyTest.java
@@ -26,10 +26,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathExchangePropertyTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .setProperty("foo").jsonpath("$.store.bicycle.color", String.class)
                         .log("${exchangeProperty.foo}")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathHeaderNameTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathHeaderNameTest.java
index 2f836e6..87c920d 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathHeaderNameTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathHeaderNameTest.java
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathHeaderNameTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .setHeader("number").jsonpath("$..store.book.length()", false, int.class, "myHeader")
                         .to("mock:result");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
index d27a10e..8b9f068 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathLanguageTest.java
@@ -48,7 +48,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
     }
 
     @Test
-    public void testExpressionArray() throws Exception {
+    public void testExpressionArray() {
         Exchange exchange = new DefaultExchange(context);
         exchange.getIn().setBody(new File("src/test/resources/books.json"));
 
@@ -69,7 +69,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
     }
 
     @Test
-    public void testExpressionField() throws Exception {
+    public void testExpressionField() {
         Exchange exchange = new DefaultExchange(context);
         exchange.getIn().setBody(new File("src/test/resources/type.json"));
 
@@ -87,7 +87,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
     }
 
     @Test
-    public void testExpressionPojo() throws Exception {
+    public void testExpressionPojo() {
         Exchange exchange = new DefaultExchange(context);
         Map pojo = new HashMap();
         pojo.put("kind", "full");
@@ -108,7 +108,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
     }
 
     @Test
-    public void testPredicate() throws Exception {
+    public void testPredicate() {
         // Test books.json file
         Exchange exchange = new DefaultExchange(context);
         exchange.getIn().setBody(new File("src/test/resources/books.json"));
@@ -124,7 +124,7 @@ public class JsonPathLanguageTest extends CamelTestSupport {
     }
 
     @Test
-    public void testSuppressException() throws Exception {
+    public void testSuppressException() {
         Exchange exchange = new DefaultExchange(context);
         exchange.getIn().setBody(new File("src/test/resources/type.json"));
 
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMapTransformTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMapTransformTest.java
index 61af6ea..62b0d54 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMapTransformTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMapTransformTest.java
@@ -33,10 +33,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonPathMapTransformTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[*].author")
                         .to("mock:authors");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMockMatchesTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMockMatchesTest.java
index 8ab06b7..7aa9050 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMockMatchesTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathMockMatchesTest.java
@@ -26,10 +26,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathMockMatchesTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .to("mock:result");
             }
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathPojoTransformTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathPojoTransformTest.java
index c6ee5e0..76db0d3 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathPojoTransformTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathPojoTransformTest.java
@@ -23,10 +23,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathPojoTransformTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.type")
                         .to("mock:type");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSourceTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSourceTest.java
index 16bf8f4..ba5ae53 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSourceTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSourceTest.java
@@ -37,10 +37,10 @@ public class JsonPathSourceTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start").transform().jsonpath("$.store.book[0].title", String.class)
                         .to("mock:title");
 
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitTest.java
index 1e996f4..ee6b275 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitTest.java
@@ -31,10 +31,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class JsonPathSplitTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .split().jsonpath("$.store.book[*]")
                         .to("mock:authors")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringMapTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringMapTest.java
index 399ab14..b826d80 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringMapTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringMapTest.java
@@ -29,10 +29,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonPathSplitWriteAsStringMapTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .split().jsonpathWriteAsString("$.content")
                         .to("mock:line")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringTest.java
index 129667f..25344db 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSplitWriteAsStringTest.java
@@ -26,10 +26,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathSplitWriteAsStringTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .split().jsonpathWriteAsString("$.content")
                         .to("mock:line")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathStreamCachingCBRTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathStreamCachingCBRTest.java
index edbd462..ada46cf 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathStreamCachingCBRTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathStreamCachingCBRTest.java
@@ -28,10 +28,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathStreamCachingCBRTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 context.getStreamCachingStrategy().setSpoolDirectory("target/tmp");
                 context.getStreamCachingStrategy().setSpoolThreshold(-1);
 
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSuppressTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSuppressTest.java
index 1a4e58f..5373b44 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSuppressTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathSuppressTest.java
@@ -47,10 +47,10 @@ public class JsonPathSuppressTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .choice()
                         .when().jsonpath("person.middlename", true)
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformHeaderNameTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformHeaderNameTest.java
index 296a12f..6a67cde 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformHeaderNameTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformHeaderNameTest.java
@@ -28,10 +28,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonPathTransformHeaderNameTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[*].author", false, null, "myHeader")
                         .to("mock:authors");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielEscapedTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielEscapedTest.java
index 95fe395..cbbff45 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielEscapedTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielEscapedTest.java
@@ -28,10 +28,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonPathTransformONielEscapedTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[?(@.author == 'John O\\'Niel')].title")
                         .to("mock:authors");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielPlaceholderTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielPlaceholderTest.java
index 08f4c3b..62c8ed7 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielPlaceholderTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielPlaceholderTest.java
@@ -44,10 +44,10 @@ public class JsonPathTransformONielPlaceholderTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[?(@.author == '{{who}}' || @.title == '{{search}}')].title")
                         .to("mock:authors");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielTest.java
index 75c5b9f..8ef8577 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformONielTest.java
@@ -28,10 +28,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonPathTransformONielTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[?(@.author == \"John O'Niel\")].title")
                         .to("mock:authors");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformResultTypeTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformResultTypeTest.java
index 49177c0..93f9551 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformResultTypeTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformResultTypeTest.java
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathTransformResultTypeTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[0].price", Float.class)
                         .to("mock:price");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
index 319a891..001cc58 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathTransformTest.java
@@ -28,10 +28,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class JsonPathTransformTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .transform().jsonpath("$.store.book[*].author")
                         .to("mock:authors");
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathWithSimpleCBRTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathWithSimpleCBRTest.java
index 4b6ff5c..694b0cb 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathWithSimpleCBRTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathWithSimpleCBRTest.java
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
 public class JsonPathWithSimpleCBRTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .choice()
                         .when().jsonpath("$.store.book[?(@.price < ${header.cheap})]")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithRootSimpleCBRTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithRootSimpleCBRTest.java
index ea8f765..c860cc2 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithRootSimpleCBRTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithRootSimpleCBRTest.java
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
 public class EasyJsonPathWithRootSimpleCBRTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .choice()
                         .when().jsonpath("price < ${header.cheap}")
diff --git a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithSimpleCBRTest.java b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithSimpleCBRTest.java
index 4d133c3..614237f 100644
--- a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithSimpleCBRTest.java
+++ b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/easypredicate/EasyJsonPathWithSimpleCBRTest.java
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test;
 public class EasyJsonPathWithSimpleCBRTest extends CamelTestSupport {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .choice()
                         .when().jsonpath("store.book.price < ${header.cheap}")

[camel] 13/14: CAMEL-17763: cleaned up unused exceptions in camel-tarfile

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 ee4898156780a3972c61e20cc29f535a65a0b05c
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:44:17 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-tarfile
---
 .../apache/camel/dataformat/tarfile/TarFileDataFormatTest.java | 10 +++++-----
 .../dataformat/tarfile/TarFileMultipleFilesSplitterTest.java   |  4 ++--
 .../camel/dataformat/tarfile/TarFileSplitAndDeleteTest.java    |  4 ++--
 .../dataformat/tarfile/TarFileSplitIteratorCorruptTest.java    |  4 ++--
 .../camel/dataformat/tarfile/TarSplitterRouteIssueTest.java    |  4 ++--
 .../apache/camel/dataformat/tarfile/TarSplitterRouteTest.java  |  4 ++--
 .../tarfile/AggregationStrategyWithFilenameHeaderTest.java     |  4 ++--
 .../tarfile/AggregationStrategyWithPreservationTest.java       |  4 ++--
 .../aggregate/tarfile/TarAggregationStrategyTest.java          |  4 ++--
 9 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java
index 1930046a..2ea3f3b 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java
@@ -132,7 +132,7 @@ public class TarFileDataFormatTest extends CamelTestSupport {
     }
 
     @Test
-    public void testUntarWithCorruptedTarFile() throws Exception {
+    public void testUntarWithCorruptedTarFile() {
         final File body = new File("src/test/resources/data/corrupt.tar");
 
         assertThrows(CamelExecutionException.class,
@@ -219,7 +219,7 @@ public class TarFileDataFormatTest extends CamelTestSupport {
     }
 
     @Test
-    public void testUntarWithEmptyDirectorySupported() throws Exception {
+    public void testUntarWithEmptyDirectorySupported() {
         deleteDirectory(new File("hello_out"));
         tar.setUsingIterator(true);
         tar.setAllowEmptyDirectory(true);
@@ -229,7 +229,7 @@ public class TarFileDataFormatTest extends CamelTestSupport {
     }
 
     @Test
-    public void testUntarWithEmptyDirectoryUnsupported() throws Exception {
+    public void testUntarWithEmptyDirectoryUnsupported() {
         deleteDirectory(new File("hello_out"));
         tar.setUsingIterator(true);
         tar.setAllowEmptyDirectory(false);
@@ -284,10 +284,10 @@ public class TarFileDataFormatTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 interceptSendToEndpoint("file:*").to("mock:intercepted");
 
                 tar = new TarFileDataFormat();
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileMultipleFilesSplitterTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileMultipleFilesSplitterTest.java
index 3ecb8a2..b877831 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileMultipleFilesSplitterTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileMultipleFilesSplitterTest.java
@@ -42,10 +42,10 @@ public class TarFileMultipleFilesSplitterTest extends TarSplitterRouteTest {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 // Untar file and Split it according to FileEntry
                 TarFileDataFormat tarFile = new TarFileDataFormat();
                 tarFile.setUsingIterator(true);
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitAndDeleteTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitAndDeleteTest.java
index f742099..0889701 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitAndDeleteTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitAndDeleteTest.java
@@ -75,10 +75,10 @@ public class TarFileSplitAndDeleteTest extends CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 TarFileDataFormat dataFormat = new TarFileDataFormat();
                 dataFormat.setUsingIterator(true);
 
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitIteratorCorruptTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitIteratorCorruptTest.java
index f1736ed..6e90575 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitIteratorCorruptTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileSplitIteratorCorruptTest.java
@@ -37,10 +37,10 @@ public class TarFileSplitIteratorCorruptTest extends CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 TarFileDataFormat zf = new TarFileDataFormat();
                 zf.setUsingIterator(true);
 
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteIssueTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteIssueTest.java
index 0f409dd..e0e1747 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteIssueTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteIssueTest.java
@@ -55,10 +55,10 @@ public class TarSplitterRouteIssueTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 errorHandler(deadLetterChannel("mock:errors"));
 
                 from("direct:decompressFiles")
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteTest.java
index 8506763..71eff6f 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarSplitterRouteTest.java
@@ -33,10 +33,10 @@ public class TarSplitterRouteTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 // Untar file and Split it according to FileEntry
                 from("file:src/test/resources/org/apache/camel/dataformat/tarfile/data?delay=1000&noop=true")
                         .log("Start processing big file: ${header.CamelFileName}")
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithFilenameHeaderTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithFilenameHeaderTest.java
index e71de30..a2934e6 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithFilenameHeaderTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithFilenameHeaderTest.java
@@ -87,10 +87,10 @@ public class AggregationStrategyWithFilenameHeaderTest extends CamelTestSupport
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .aggregate(tar)
                         .constant(true)
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithPreservationTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithPreservationTest.java
index f50a1b1..fa972d0 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithPreservationTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/AggregationStrategyWithPreservationTest.java
@@ -89,10 +89,10 @@ public class AggregationStrategyWithPreservationTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 // Untar file and Split it according to FileEntry
                 from("file:src/test/resources/org/apache/camel/aggregate/tarfile/data?delay=1000&noop=true&recursive=true")
                         .aggregate(tar)
diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategyTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategyTest.java
index 0df6252..e91e452 100644
--- a/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategyTest.java
+++ b/components/camel-tarfile/src/test/java/org/apache/camel/processor/aggregate/tarfile/TarAggregationStrategyTest.java
@@ -78,10 +78,10 @@ public class TarAggregationStrategyTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 // Untar file and Split it according to FileEntry
                 from("file:src/test/resources/org/apache/camel/aggregate/tarfile/data?delay=1000&noop=true")
                         .setHeader("foo", constant("bar"))

[camel] 02/14: CAMEL-17763: cleaned up unused exceptions in camel-xmlsecurity

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 83adf8f41904fb1e9b5202d695a9df5332487369
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:29:12 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-xmlsecurity
---
 .../component/xmlsecurity/ECDSASignatureTest.java  | 21 ++++----
 .../xmlsecurity/SignatureAlgorithmTest.java        | 42 ++++++++--------
 .../xmlsecurity/SignatureDigestMethodTest.java     | 30 +++++------
 .../xmlsecurity/SpringXmlSignatureTest.java        |  4 +-
 .../xmlsecurity/XAdESSignaturePropertiesTest.java  | 52 +++++++++----------
 .../component/xmlsecurity/XmlSignatureTest.java    | 58 +++++++++++-----------
 ...idationFailedHandlerIgnoreManifestFailures.java |  4 +-
 ...ature2Message2MessageWithTimestampProperty.java |  2 +-
 .../camel/dataformat/xmlsecurity/TestHelper.java   |  6 +--
 .../xmlsecurity/XMLSecurityConcurrencyTest.java    |  2 +-
 10 files changed, 110 insertions(+), 111 deletions(-)

diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java
index c332e94..981f955 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java
@@ -67,7 +67,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
                   + "<root xmlns=\"http://test/test\"><test>Test Message</test></root>";
     }
 
-    public ECDSASignatureTest() throws Exception {
+    public ECDSASignatureTest() {
         try {
             // BouncyCastle is required for some algorithms
             if (Security.getProvider("BC") == null) {
@@ -105,13 +105,13 @@ public class ECDSASignatureTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
+    protected RouteBuilder[] createRouteBuilders() {
         if (!canTest) {
             return new RouteBuilder[] {};
         }
 
         return new RouteBuilder[] { new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: ecdsa signature algorithm
                 from("direct:ecdsa_sha1")
                         .to("xmlsecurity-sign:ecdsa_sha1?keyAccessor=#accessor"
@@ -122,7 +122,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
                 // END SNIPPET: ecdsa signature algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: ecdsa signature algorithm
                 from("direct:ecdsa_sha224")
                         .to("xmlsecurity-sign:ecdsa_sha224?keyAccessor=#accessor"
@@ -132,7 +132,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
                 // END SNIPPET: ecdsa signature algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: ecdsa signature algorithm
                 from("direct:ecdsa_sha256")
                         .to("xmlsecurity-sign:ecdsa_sha256?keyAccessor=#accessor"
@@ -142,7 +142,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
                 // END SNIPPET: ecdsa signature algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: ecdsa signature algorithm
                 from("direct:ecdsa_sha384")
                         .to("xmlsecurity-sign:ecdsa_sha384?keyAccessor=#accessor"
@@ -152,7 +152,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
                 // END SNIPPET: ecdsa signature algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: ecdsa signature algorithm
                 from("direct:ecdsa_sha512")
                         .to("xmlsecurity-sign:ecdsa_sha512?keyAccessor=#accessor"
@@ -162,7 +162,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
                 // END SNIPPET: ecdsa signature algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: ecdsa signature algorithm
                 from("direct:ecdsa_ripemd160")
                         .to("xmlsecurity-sign:ecdsa_ripemd160?keyAccessor=#accessor"
@@ -256,7 +256,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
 
     @Override
     @BeforeEach
-    public void setUp() throws Exception {
+    public void setUp() {
         disableJMX();
         try {
             super.setUp();
@@ -293,8 +293,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
             @Override
             public KeyInfo getKeyInfo(
                     Message mess, Node messageBody,
-                    KeyInfoFactory keyInfoFactory)
-                    throws Exception {
+                    KeyInfoFactory keyInfoFactory) {
                 return null;
             }
         };
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureAlgorithmTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureAlgorithmTest.java
index 56c5bf5f..b179186 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureAlgorithmTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureAlgorithmTest.java
@@ -143,9 +143,9 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
+    protected RouteBuilder[] createRouteBuilders() {
         return new RouteBuilder[] { new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:hmacsha1")
                         .to("xmlsecurity-sign:hmacsha1?keyAccessor=#secretKeyAccessor"
@@ -155,7 +155,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:hmacsha224")
                         .to("xmlsecurity-sign:hmacsha224?keyAccessor=#secretKeyAccessor"
@@ -164,7 +164,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:hmacsha256")
                         .to("xmlsecurity-sign:hmacsha256?keyAccessor=#secretKeyAccessor"
@@ -173,7 +173,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:hmacsha384")
                         .to("xmlsecurity-sign:hmacsha384?keyAccessor=#secretKeyAccessor"
@@ -182,7 +182,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:hmacsha512")
                         .to("xmlsecurity-sign:hmacsha512?keyAccessor=#secretKeyAccessor"
@@ -191,7 +191,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:hmacripemd160")
                         .to("xmlsecurity-sign:hmacripemd160?keyAccessor=#secretKeyAccessor"
@@ -200,7 +200,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha1")
                         .to("xmlsecurity-sign:rsasha1?keyAccessor=#accessor"
@@ -209,7 +209,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha224")
                         .to("xmlsecurity-sign:rsasha224?keyAccessor=#accessor"
@@ -218,7 +218,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha256")
                         .to("xmlsecurity-sign:rsasha256?keyAccessor=#accessor"
@@ -227,7 +227,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha384")
                         .to("xmlsecurity-sign:rsasha384?keyAccessor=#accessor"
@@ -236,7 +236,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha512")
                         .to("xmlsecurity-sign:rsasha512?keyAccessor=#accessor"
@@ -245,7 +245,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsaripemd160")
                         .to("xmlsecurity-sign:rsaripemd160?keyAccessor=#accessor"
@@ -254,7 +254,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha1_mgf1")
                         .to("xmlsecurity-sign:rsasha1_mgf1?keyAccessor=#accessor"
@@ -263,7 +263,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha224_mgf1")
                         .to("xmlsecurity-sign:rsasha224_mgf1?keyAccessor=#accessor"
@@ -272,7 +272,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha256_mgf1")
                         .to("xmlsecurity-sign:rsasha256_mgf1?keyAccessor=#accessor"
@@ -281,7 +281,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha384_mgf1")
                         .to("xmlsecurity-sign:rsasha384_mgf1?keyAccessor=#accessor"
@@ -290,7 +290,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:rsasha512_mgf1")
                         .to("xmlsecurity-sign:rsasha512_mgf1?keyAccessor=#accessor"
@@ -478,7 +478,7 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
         super.setUp();
     }
 
-    public void setUpKeys(String algorithm, int keylength) throws Exception {
+    public void setUpKeys(String algorithm, int keylength) {
         keyPair = getKeyPair(algorithm, keylength);
     }
 
@@ -519,12 +519,12 @@ public class SignatureAlgorithmTest extends CamelTestSupport {
         KeyAccessor accessor = new KeyAccessor() {
 
             @Override
-            public KeySelector getKeySelector(Message message) throws Exception {
+            public KeySelector getKeySelector(Message message) {
                 return KeySelector.singletonKeySelector(key);
             }
 
             @Override
-            public KeyInfo getKeyInfo(Message mess, Node messageBody, KeyInfoFactory keyInfoFactory) throws Exception {
+            public KeyInfo getKeyInfo(Message mess, Node messageBody, KeyInfoFactory keyInfoFactory) {
                 return null;
             }
         };
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureDigestMethodTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureDigestMethodTest.java
index ea5c509..8f07dba 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureDigestMethodTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SignatureDigestMethodTest.java
@@ -138,9 +138,9 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
+    protected RouteBuilder[] createRouteBuilders() {
         return new RouteBuilder[] { new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha1")
                         .to("xmlsecurity-sign:sha1?keyAccessor=#accessor"
@@ -149,7 +149,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha224")
                         .to("xmlsecurity-sign:sha224?keyAccessor=#accessor"
@@ -158,7 +158,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha256")
                         .to("xmlsecurity-sign:sha256?keyAccessor=#accessor"
@@ -167,7 +167,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha384")
                         .to("xmlsecurity-sign:sha384?keyAccessor=#accessor"
@@ -176,7 +176,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha512")
                         .to("xmlsecurity-sign:sha512?keyAccessor=#accessor"
@@ -185,7 +185,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:ripemd160")
                         .to("xmlsecurity-sign:ripemd160?keyAccessor=#accessor"
@@ -194,7 +194,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:whirlpool")
                         .to("xmlsecurity-sign:whirlpool?keyAccessor=#accessor"
@@ -203,7 +203,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha3_224")
                         .to("xmlsecurity-sign:sha3_224?keyAccessor=#accessor"
@@ -212,7 +212,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha3_256")
                         .to("xmlsecurity-sign:sha3_256?keyAccessor=#accessor"
@@ -221,7 +221,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha3_384")
                         .to("xmlsecurity-sign:sha3_384?keyAccessor=#accessor"
@@ -230,7 +230,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:sha3_512")
                         .to("xmlsecurity-sign:sha3_512?keyAccessor=#accessor"
@@ -370,7 +370,7 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
         super.setUp();
     }
 
-    public void setUpKeys(String algorithm, int keylength) throws Exception {
+    public void setUpKeys(String algorithm, int keylength) {
         keyPair = getKeyPair(algorithm, keylength);
     }
 
@@ -411,12 +411,12 @@ public class SignatureDigestMethodTest extends CamelTestSupport {
         KeyAccessor accessor = new KeyAccessor() {
 
             @Override
-            public KeySelector getKeySelector(Message message) throws Exception {
+            public KeySelector getKeySelector(Message message) {
                 return KeySelector.singletonKeySelector(privateKey);
             }
 
             @Override
-            public KeyInfo getKeyInfo(Message mess, Node messageBody, KeyInfoFactory keyInfoFactory) throws Exception {
+            public KeyInfo getKeyInfo(Message mess, Node messageBody, KeyInfoFactory keyInfoFactory) {
                 return null;
             }
         };
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SpringXmlSignatureTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SpringXmlSignatureTest.java
index be8044d..89468b1 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SpringXmlSignatureTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/SpringXmlSignatureTest.java
@@ -65,12 +65,12 @@ public class SpringXmlSignatureTest extends XmlSignatureTest {
     }
 
     @Override
-    protected Registry createCamelRegistry() throws Exception {
+    protected Registry createCamelRegistry() {
         return new SimpleRegistry();
     }
 
     @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
+    protected RouteBuilder[] createRouteBuilders() {
         return new RouteBuilder[] {};
     }
 
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
index 41f5504..a9938c7 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XAdESSignaturePropertiesTest.java
@@ -117,23 +117,23 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
+    protected RouteBuilder[] createRouteBuilders() {
         return new RouteBuilder[] { new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:enveloped")
                         .to("xmlsecurity-sign:xades?keyAccessor=#keyAccessorDefault&properties=#xmlSignatureProperties&parentLocalName=root&parentNamespace=http://test/test")
                         .to("mock:result");
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:enveloping")
                         .to("xmlsecurity-sign:xades?keyAccessor=#keyAccessorDefault&properties=#xmlSignatureProperties")
                         .to("mock:result");
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:emptySignatureId").to(
                         "xmlsecurity-sign:xades?keyAccessor=#keyAccessorDefault&properties=#xmlSignatureProperties&signatureId=")
@@ -141,7 +141,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
                                 "mock:result");
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(Exception.class).handled(false).to("mock:exception");
                 from("direct:detached").to(
                         "xmlsecurity-sign:detached?keyAccessor=#keyAccessorDefault&xpathsToIdAttributes=#xpathsToIdAttributes&"//
@@ -667,28 +667,28 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void namespaceNull() throws Exception {
+    public void namespaceNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class, () -> xAdESSignatureProperties.setNamespace(null));
     }
 
     @Test
-    public void signingCertificateURIsNull() throws Exception {
+    public void signingCertificateURIsNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class, () -> xAdESSignatureProperties.setSigningCertificateURIs(null));
     }
 
     @Test
-    public void sigPolicyInvalid() throws Exception {
+    public void sigPolicyInvalid() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class, () -> xAdESSignatureProperties.setSignaturePolicy("invalid"));
     }
 
     @Test
-    public void sigPolicyIdDocumentationReferencesNull() throws Exception {
+    public void sigPolicyIdDocumentationReferencesNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class,
@@ -696,7 +696,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void sigPolicyIdDocumentationReferencesNullEntry() throws Exception {
+    public void sigPolicyIdDocumentationReferencesNullEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> sigPolicyIdDocumentationReferences = Collections.<String> singletonList(null);
 
@@ -705,7 +705,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void sigPolicyIdDocumentationReferencesEmptyEntry() throws Exception {
+    public void sigPolicyIdDocumentationReferencesEmptyEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> sigPolicyIdDocumentationReferences = Collections.singletonList("");
 
@@ -714,7 +714,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void dataObjectFormatIdentifierDocumentationReferencesNull() throws Exception {
+    public void dataObjectFormatIdentifierDocumentationReferencesNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class,
@@ -722,7 +722,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void dataObjectFormatIdentifierDocumentationReferencesNullEntry() throws Exception {
+    public void dataObjectFormatIdentifierDocumentationReferencesNullEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> dataObjectFormatIdentifierDocumentationReferences = Collections.singletonList(null);
 
@@ -732,7 +732,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void dataObjectFormatIdentifierDocumentationReferencesEmptyEntry() throws Exception {
+    public void dataObjectFormatIdentifierDocumentationReferencesEmptyEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> dataObjectFormatIdentifierDocumentationReferences = Collections.singletonList("");
 
@@ -742,14 +742,14 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void signerClaimedRolesNull() throws Exception {
+    public void signerClaimedRolesNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class, () -> xAdESSignatureProperties.setSignerClaimedRoles(null));
     }
 
     @Test
-    public void signerClaimedRolesNullEntry() throws Exception {
+    public void signerClaimedRolesNullEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> signerClaimedRoles = Collections.singletonList(null);
 
@@ -758,7 +758,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void signerClaimedRolesEmptyEntry() throws Exception {
+    public void signerClaimedRolesEmptyEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> signerClaimedRoles = Collections.singletonList("");
 
@@ -767,14 +767,14 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void signerCertifiedRolesNull() throws Exception {
+    public void signerCertifiedRolesNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class, () -> xAdESSignatureProperties.setSignerCertifiedRoles(null));
     }
 
     @Test
-    public void signerCertifiedRolesNullEntry() throws Exception {
+    public void signerCertifiedRolesNullEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<XAdESEncapsulatedPKIData> signerCertifiedRoles = Collections.singletonList(null);
 
@@ -783,7 +783,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void commitmentTypeIdDocumentationReferencesNull() throws Exception {
+    public void commitmentTypeIdDocumentationReferencesNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class,
@@ -791,7 +791,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void commitmentTypeIdDocumentationReferencesNullEntry() throws Exception {
+    public void commitmentTypeIdDocumentationReferencesNullEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> commitmentTypeIdDocumentationReferences = Collections.singletonList(null);
 
@@ -800,7 +800,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void commitmentTypeIdDocumentationReferencesEmptyEntry() throws Exception {
+    public void commitmentTypeIdDocumentationReferencesEmptyEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> commitmentTypeIdDocumentationReferences = Collections.singletonList("");
 
@@ -809,14 +809,14 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void commitmentTypeQualifiersNull() throws Exception {
+    public void commitmentTypeQualifiersNull() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
 
         assertThrows(IllegalArgumentException.class, () -> xAdESSignatureProperties.setCommitmentTypeQualifiers(null));
     }
 
     @Test
-    public void commitmentTypeQualifiersNullEntry() throws Exception {
+    public void commitmentTypeQualifiersNullEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> commitmentTypeQualifiers = Collections.singletonList(null);
 
@@ -825,7 +825,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
     }
 
     @Test
-    public void commitmentTypeQualifiersEmptyEntry() throws Exception {
+    public void commitmentTypeQualifiersEmptyEntry() {
         final XAdESSignatureProperties xAdESSignatureProperties = new XAdESSignatureProperties();
         final List<String> commitmentTypeQualifiers = Collections.singletonList("");
 
@@ -1039,7 +1039,7 @@ public class XAdESSignaturePropertiesTest extends CamelTestSupport {
         }
 
         @Override
-        protected X509Certificate getSigningCertificate() throws Exception {
+        protected X509Certificate getSigningCertificate() {
             return null;
         }
 
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java
index 7b9bf7e..b8c2482 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/XmlSignatureTest.java
@@ -160,9 +160,9 @@ public class XmlSignatureTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder[] createRouteBuilders() throws Exception {
+    protected RouteBuilder[] createRouteBuilders() {
         return new RouteBuilder[] { new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: enveloping XML signature
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:enveloping").to(getSignerEndpointURIEnveloping()).to("mock:signed")
@@ -171,7 +171,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: enveloping XML signature
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: enveloping XML signature with plain text
                 // message body
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
@@ -182,7 +182,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // body
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: enveloped XML signature
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:enveloped").to(getSignerEndpointURIEnveloped()).to("mock:signed")
@@ -191,7 +191,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: enveloped XML signature
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: canonicalization
                 // we can set the configuration properties explicitly on the
                 // endpoint instances.
@@ -209,7 +209,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: canonicalization
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signature and digest algorithm
                 from("direct:signaturedigestalgorithm")
                         .to("xmlsecurity-sign:signaturedigestalgorithm?keyAccessor=#accessor"
@@ -219,7 +219,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: signature and digest algorithm
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: transforms XPath2
                 from("direct:transformsXPath2").to(
                         "xmlsecurity-sign:transformsXPath2?keyAccessor=#accessor&transformMethods=#transformsXPath2",
@@ -227,7 +227,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: transform XPath
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: transforms XSLT,XPath
                 onException(XmlSignatureException.class).handled(false).to("mock:exception");
                 from("direct:transformsXsltXPath").to(
@@ -236,7 +236,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: transforms XSLT,XPath
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: transforms XSLT,XPath - secure Validation
                 // disabled
                 from("direct:transformsXsltXPathSecureValDisabled")
@@ -247,7 +247,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // disabled
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: cryptocontextprops
                 onException(XmlSignatureException.class).handled(false).to("mock:exception");
                 from("direct:cryptocontextprops")
@@ -256,7 +256,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: cryptocontextprops
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: URI dereferencer
                 from("direct:uridereferencer")
                         .to("xmlsecurity-sign:uriderferencer?keyAccessor=#accessor&uriDereferencer=#uriDereferencer")
@@ -265,7 +265,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: URI dereferencer
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: keyAccessorKeySelectorDefault
                 from("direct:keyAccessorKeySelectorDefault")
                         .to("xmlsecurity-sign:keyAccessorKeySelectorDefault?keyAccessor=#keyAccessorDefault&addKeyInfoReference=true")
@@ -274,7 +274,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: keyAccessorKeySelectorDefault
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: xmlSignatureChecker
                 onException(XmlSignatureInvalidException.class).handled(false).to("mock:exception");
                 from("direct:xmlSignatureChecker")
@@ -283,7 +283,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: xmlSignatureChecker
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception { //
+            public void configure() { //
                 // START SNIPPET: properties
                 from("direct:props")
                         .to("xmlsecurity-sign:properties?keyAccessor=#accessor&properties=#signatureProperties")
@@ -292,7 +292,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: properties
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: verify output node search element name
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:outputnodesearchelementname").to(
@@ -302,7 +302,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: verify output node search element name
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: verify output node search xpath
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:outputnodesearchxpath")
@@ -311,7 +311,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: verify output node search xpath
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: validationFailedHandler
                 from("direct:validationFailedHandler")
                         .to("xmlsecurity-verify:validationFailedHandler?keySelector=#selectorKeyValue&validationFailedHandler=#validationFailedHandlerIgnoreManifestFailures")
@@ -319,7 +319,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: validationFailedHandler
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: further parameters
                 from("direct:furtherparams")
                         .to("xmlsecurity-sign:furtherparams?keyAccessor=#accessor&prefixForXmlSignatureNamespace=digsig&disallowDoctypeDecl=false")
@@ -328,7 +328,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: further parameters
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signer invalid keyexception
                 onException(XmlSignatureInvalidKeyException.class).handled(true).to("mock:exception");
                 from("direct:signexceptioninvalidkey").to(
@@ -337,7 +337,7 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: signer invalid keyexception
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: signer exceptions
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:signexceptions")
@@ -346,27 +346,27 @@ public class XmlSignatureTest extends CamelTestSupport {
                 // END SNIPPET: signer exceptions
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(true).to("mock:exception");
                 from("direct:noSuchAlgorithmException")
                         .to("xmlsecurity-sign:noSuchAlgorithmException?keyAccessor=#accessor&signatureAlgorithm=wrongalgorithm&digestAlgorithm=http://www.w3.org/2001/04/xmlenc#sha512")
                         .to("mock:result");
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(false).to("mock:exception");
                 from("direct:verifyexceptions").to("xmlsecurity-verify:verifyexceptions?keySelector=#selector")
                         .to("mock:result");
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(false).to("mock:exception");
                 from("direct:verifyInvalidKeyException")
                         .to("xmlsecurity-verify:verifyInvalidKeyException?keySelector=#selector").to(
                                 "mock:result");
             }
         }, new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 onException(XmlSignatureException.class).handled(false).to("mock:exception");
                 from("direct:invalidhash").to(
                         "xmlsecurity-verify:invalidhash?keySelector=#selectorKeyValue&baseUri=#baseUri&secureValidation=false")
@@ -378,7 +378,7 @@ public class XmlSignatureTest extends CamelTestSupport {
 
     RouteBuilder createDetachedRoute() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: detached XML signature
                 onException(Exception.class).handled(false).to("mock:exception");
                 from("direct:detached")
@@ -394,7 +394,7 @@ public class XmlSignatureTest extends CamelTestSupport {
 
     private RouteBuilder createRouteForEnvelopedWithParentXpath() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 // START SNIPPET: enveloped XML signature with parent XPath
                 onException(XmlSignatureException.class).handled(false).to("mock:exception");
                 from("direct:envelopedParentXpath")
@@ -1456,7 +1456,7 @@ public class XmlSignatureTest extends CamelTestSupport {
         super.setUp();
     }
 
-    public void setUpKeys(String algorithm, int keylength) throws Exception {
+    public void setUpKeys(String algorithm, int keylength) {
         keyPair = getKeyPair(algorithm, keylength);
     }
 
@@ -1539,12 +1539,12 @@ public class XmlSignatureTest extends CamelTestSupport {
         KeyAccessor accessor = new KeyAccessor() {
 
             @Override
-            public KeySelector getKeySelector(Message message) throws Exception {
+            public KeySelector getKeySelector(Message message) {
                 return KeySelector.singletonKeySelector(privateKey);
             }
 
             @Override
-            public KeyInfo getKeyInfo(Message mess, Node messageBody, KeyInfoFactory keyInfoFactory) throws Exception {
+            public KeyInfo getKeyInfo(Message mess, Node messageBody, KeyInfoFactory keyInfoFactory) {
                 return null;
             }
         };
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/ValidationFailedHandlerIgnoreManifestFailures.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/ValidationFailedHandlerIgnoreManifestFailures.java
index d70486b..40cc571 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/ValidationFailedHandlerIgnoreManifestFailures.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/ValidationFailedHandlerIgnoreManifestFailures.java
@@ -26,12 +26,12 @@ import org.apache.camel.component.xmlsecurity.api.DefaultValidationFailedHandler
 public class ValidationFailedHandlerIgnoreManifestFailures extends DefaultValidationFailedHandler {
 
     @Override
-    public void manifestReferenceValidationFailed(Reference ref) throws Exception {
+    public void manifestReferenceValidationFailed(Reference ref) {
         // do nothing
     }
 
     @Override
-    public boolean ignoreCoreValidationFailure() throws Exception {
+    public boolean ignoreCoreValidationFailure() {
         return true;
     }
 }
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/XmlSignature2Message2MessageWithTimestampProperty.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/XmlSignature2Message2MessageWithTimestampProperty.java
index 339edb6..297a14b 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/XmlSignature2Message2MessageWithTimestampProperty.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/util/XmlSignature2Message2MessageWithTimestampProperty.java
@@ -30,7 +30,7 @@ import org.apache.camel.component.xmlsecurity.api.DefaultXmlSignature2Message;
 public class XmlSignature2Message2MessageWithTimestampProperty extends DefaultXmlSignature2Message {
 
     @Override
-    protected List<Reference> getReferencesForMessageMapping(Input input) throws Exception {
+    protected List<Reference> getReferencesForMessageMapping(Input input) {
 
         List<Reference> result = new ArrayList<>(1);
         for (Reference ref : input.getReferences()) {
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
index eccc651..83e2503 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/TestHelper.java
@@ -113,11 +113,11 @@ public class TestHelper {
 
     Logger log = LoggerFactory.getLogger(TestHelper.class);
 
-    protected void sendText(final String fragment, CamelContext context) throws Exception {
+    protected void sendText(final String fragment, CamelContext context) {
         ProducerTemplate template = context.createProducerTemplate();
         template.start();
         template.send("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 // Set the property of the charset encoding
                 exchange.setProperty(Exchange.CHARSET_NAME, "UTF-8");
                 Message in = exchange.getIn();
@@ -184,7 +184,7 @@ public class TestHelper {
         assertFalse(hasEncryptedData(inDoc), "The XML message has encrypted data.");
     }
 
-    private boolean hasEncryptedData(Document doc) throws Exception {
+    private boolean hasEncryptedData(Document doc) {
         NodeList nodeList = doc.getElementsByTagNameNS("http://www.w3.org/2001/04/xmlenc#", "EncryptedData");
         return nodeList.getLength() > 0;
     }
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityConcurrencyTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityConcurrencyTest.java
index 2643aa1..86f92cb 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityConcurrencyTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityConcurrencyTest.java
@@ -53,7 +53,7 @@ public class XMLSecurityConcurrencyTest extends CamelTestSupport {
         for (int i = 0; i < files; i++) {
             final int index = i;
             executor.submit(new Callable<Object>() {
-                public Object call() throws Exception {
+                public Object call() {
                     String body = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><body>you can not read me " + index + "</body>";
                     template.sendBody("direct:start", body);
                     return null;

[camel] 03/14: CAMEL-17763: cleaned up unused exceptions in camel-velocity

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 a9417cf622f6850ec468e1f6149f106389d13b5d
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:33:33 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-velocity
---
 .../apache/camel/component/velocity/VelocityConcurrentTest.java   | 2 +-
 .../apache/camel/component/velocity/VelocityContentCacheTest.java | 4 ++--
 .../camel/component/velocity/VelocityDynamicTemplateTest.java     | 6 +++---
 .../org/apache/camel/component/velocity/VelocityEncodingTest.java | 4 ++--
 .../apache/camel/component/velocity/VelocityFileLetterTest.java   | 4 ++--
 .../component/velocity/VelocityFileLetterWithPropertyTest.java    | 4 ++--
 .../org/apache/camel/component/velocity/VelocityLetterTest.java   | 4 ++--
 .../camel/component/velocity/VelocityLetterWithParserTest.java    | 4 ++--
 .../camel/component/velocity/VelocityLetterWithoutHeaderTest.java | 4 ++--
 .../camel/component/velocity/VelocityMethodInvokationTest.java    | 4 ++--
 .../camel/component/velocity/VelocityOverridesPropertiesTest.java | 8 ++++----
 .../apache/camel/component/velocity/VelocitySetHeaderTest.java    | 2 +-
 .../component/velocity/VelocitySetTemplateViaHeaderTest.java      | 4 ++--
 .../component/velocity/VelocitySomeValuesNotInExchangeTest.java   | 4 ++--
 .../camel/component/velocity/VelocitySupplementalContextTest.java | 4 ++--
 .../camel/component/velocity/VelocityTemplateInHeaderTest.java    | 2 +-
 .../java/org/apache/camel/component/velocity/VelocityTest.java    | 8 ++++----
 .../camel/component/velocity/VelocityValuesInPropertiesTest.java  | 6 +++---
 18 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java
index 0dbb9c5..3c475bd 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java
@@ -47,7 +47,7 @@ public class VelocityConcurrentTest extends CamelTestSupport {
         for (int i = 0; i < files; i++) {
             final int index = i;
             executor.submit(new Callable<Object>() {
-                public Object call() throws Exception {
+                public Object call() {
                     template.sendBody("direct:start", "Hello " + index);
                     return null;
                 }
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java
index 8168a10..42abab8 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java
@@ -156,9 +156,9 @@ public class VelocityContentCacheTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to("velocity://org/apache/camel/component/velocity/hello.vm?contentCache=false")
                         .to("mock:result");
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java
index 42af06c..6fd1c8f 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java
@@ -57,9 +57,9 @@ public class VelocityDynamicTemplateTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 MyBean bean = new MyBean();
                 from("direct:a").bean(bean).to("mock:result");
             }
@@ -70,7 +70,7 @@ public class VelocityDynamicTemplateTest extends CamelTestSupport {
         ProducerTemplate template;
         boolean useLetter2;
 
-        public void sendToNewTemplate(Exchange exchange) throws Exception {
+        public void sendToNewTemplate(Exchange exchange) {
             if (template == null) {
                 template = exchange.getContext().createProducerTemplate();
             }
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityEncodingTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityEncodingTest.java
index 8e8c9aa..a39fad7 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityEncodingTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityEncodingTest.java
@@ -21,9 +21,9 @@ import org.apache.camel.builder.RouteBuilder;
 public class VelocityEncodingTest extends VelocityLetterTest {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to("velocity:org/apache/camel/component/velocity/letter-utf16.vm?encoding=UTF-16")
                         .to("mock:result");
             }
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterTest.java
index 6617010..b9b6e41 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterTest.java
@@ -21,9 +21,9 @@ import org.apache.camel.builder.RouteBuilder;
 public class VelocityFileLetterTest extends VelocityLetterTest {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to("velocity:file:src/test/resources/org/apache/camel/component/velocity/letter.vm")
                         .to("mock:result");
             }
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterWithPropertyTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterWithPropertyTest.java
index 672c3e5..28aa0b6 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterWithPropertyTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityFileLetterWithPropertyTest.java
@@ -21,9 +21,9 @@ import org.apache.camel.builder.RouteBuilder;
 public class VelocityFileLetterWithPropertyTest extends VelocityLetterTest {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
 
                 System.setProperty("ENV", "src/test/resources/");
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java
index 13c486e..fb3bf33 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java
@@ -51,9 +51,9 @@ public class VelocityLetterTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to("velocity:org/apache/camel/component/velocity/letter.vm").to("mock:result");
             }
         };
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithParserTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithParserTest.java
index e88b7bd..bfbd047 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithParserTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithParserTest.java
@@ -20,9 +20,9 @@ import org.apache.camel.builder.RouteBuilder;
 
 public class VelocityLetterWithParserTest extends VelocityLetterTest {
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to(
                         "velocity:org/apache/camel/component/velocity/letterWithParser.vm?propertiesFile=org/apache/camel/component/velocity/velocity.properties")
                         .to("mock:result");
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithoutHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithoutHeaderTest.java
index 8444310..6441401 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithoutHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterWithoutHeaderTest.java
@@ -21,9 +21,9 @@ import org.apache.camel.builder.RouteBuilder;
 public class VelocityLetterWithoutHeaderTest extends VelocityLetterTest {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to("velocity:org/apache/camel/component/velocity/header.vm")
                         .to("velocity:org/apache/camel/component/velocity/letterWithoutHeader.vm").to("mock:result");
             }
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java
index 5bb8ecc..35c2657 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java
@@ -28,10 +28,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class VelocityMethodInvokationTest extends CamelTestSupport {
 
     @Test
-    public void testVelocityLetter() throws Exception {
+    public void testVelocityLetter() {
         Exchange exchange = template.request("direct:a", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setBody("Monday & Tuesday");
                 exchange.getIn().setHeader("name", "Christian");
                 exchange.setProperty("item", "7");
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java
index 5cf3b05..196ef88 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java
@@ -27,10 +27,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class VelocityOverridesPropertiesTest extends CamelTestSupport {
 
     @Test
-    public void testOverridingProperties() throws Exception {
+    public void testOverridingProperties() {
         Exchange exchange = template.request("direct:a", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setBody("Monday");
                 exchange.getIn().setHeader("name", "Christian");
                 exchange.setProperty("item", "7");
@@ -42,9 +42,9 @@ public class VelocityOverridesPropertiesTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a")
                         .to("velocity:org/apache/camel/component/velocity/example.vm?propertiesFile=org/apache/camel/component/velocity/velocity-logging.properties&allowContextMapAll=true");
             }
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java
index 802c659..bbb7b19 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java
@@ -41,7 +41,7 @@ public class VelocitySetHeaderTest extends CamelSpringTestSupport {
         mock.expectedHeaderReceived("fruit", value);
         mock.expectedBodiesReceived(expectedBody);
         template.request("direct:start", new Processor() {
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setBody(value);
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java
index b694931..218b6d6 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java
@@ -57,9 +57,9 @@ public class VelocitySetTemplateViaHeaderTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a").to("velocity:dummy?allowTemplateFromHeader=true").to("mock:result");
             }
         };
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java
index 4441f74..3122ebe 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java
@@ -59,9 +59,9 @@ public class VelocitySomeValuesNotInExchangeTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a")
                         .to("velocity:org/apache/camel/component/velocity/someValuesNotInExchange.vm")
                         .to("mock:result");
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java
index c86613a..d6aa4e1 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java
@@ -51,14 +51,14 @@ public class VelocitySupplementalContextTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
 
         final Map<String, Object> supplementalContext = new HashMap<>();
         supplementalContext.put("body", "new_body");
 
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:input")
                         .setHeader(VelocityConstants.VELOCITY_SUPPLEMENTAL_CONTEXT).constant(supplementalContext)
                         .to("velocity:template-in-header?allowTemplateFromHeader=true&allowContextMapAll=true")
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java
index f98684b..46732fd 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java
@@ -56,7 +56,7 @@ public class VelocityTemplateInHeaderTest extends CamelTestSupport {
     protected void assertRespondsWith(final String headerName, final String headerValue, String expectedBody)
             throws InvalidPayloadException {
         Exchange response = template.request("direct:a", new Processor() {
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 Message in = exchange.getIn();
                 in.setHeader(VelocityConstants.VELOCITY_TEMPLATE, "<hello>${headers." + headerName + "}</hello>");
                 in.setHeader(headerName, headerValue);
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java
index a4b107c..117091b 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java
@@ -31,10 +31,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class VelocityTest extends CamelTestSupport {
 
     @Test
-    public void testVelocityLetter() throws Exception {
+    public void testVelocityLetter() {
         Exchange exchange = template.request("direct:a", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setBody("Monday");
                 exchange.getIn().setHeader("name", "Christian");
                 exchange.setProperty("item", "7");
@@ -46,10 +46,10 @@ public class VelocityTest extends CamelTestSupport {
     }
 
     @Test
-    public void testVelocityContext() throws Exception {
+    public void testVelocityContext() {
         Exchange exchange = template.request("direct:a", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setBody("");
                 exchange.getIn().setHeader("name", "Christian");
                 Map<String, Object> variableMap = new HashMap<>();
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java
index 0d98ed2..f9c4c3e 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java
@@ -35,7 +35,7 @@ public class VelocityValuesInPropertiesTest extends CamelTestSupport {
 
         template.send("direct:a", new Processor() {
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 exchange.getIn().setHeader(VelocityConstants.VELOCITY_TEMPLATE,
                         "Dear ${exchange.properties.name}. You ordered item ${exchange.properties.item}.");
                 exchange.setProperty("name", "Christian");
@@ -47,9 +47,9 @@ public class VelocityValuesInPropertiesTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:a")
                         .to("velocity:dummy?allowTemplateFromHeader=true&allowContextMapAll=true")
                         .to("mock:result");

[camel] 06/14: CAMEL-17763: cleaned up unused exceptions in camel-base64

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 691bf82fe8e737505b4ab3450c7dae41b172f72c
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:41:35 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-base64
---
 .../apache/camel/dataformat/base64/Base64PropertiesFunctionTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-base64/src/test/java/org/apache/camel/dataformat/base64/Base64PropertiesFunctionTest.java b/components/camel-base64/src/test/java/org/apache/camel/dataformat/base64/Base64PropertiesFunctionTest.java
index 462c672..11fe1c9 100644
--- a/components/camel-base64/src/test/java/org/apache/camel/dataformat/base64/Base64PropertiesFunctionTest.java
+++ b/components/camel-base64/src/test/java/org/apache/camel/dataformat/base64/Base64PropertiesFunctionTest.java
@@ -33,10 +33,10 @@ public class Base64PropertiesFunctionTest extends CamelTestSupport {
     }
 
     @Override
-    protected RoutesBuilder createRouteBuilder() throws Exception {
+    protected RoutesBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         // Q2FtZWw== is the word Camel
                         .setBody(simple("${body} {{base64:Q2FtZWw==}}"))

[camel] 11/14: CAMEL-17763: cleaned up unused exceptions in camel-solr

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 57b92f04ce1fe6b559fa0790d7c6b413a7e8ea96
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:43:27 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-solr
---
 .../java/org/apache/camel/component/solr/InitSolrEndpointTest.java  | 6 +++---
 .../test/java/org/apache/camel/component/solr/MapBodyManualIT.java  | 6 +++---
 .../org/apache/camel/component/solr/SolrComponentTestSupport.java   | 4 ++--
 .../java/org/apache/camel/component/solr/SolrServerMissingTest.java | 6 +++---
 .../test/java/org/apache/camel/component/solr/SolrTestSupport.java  | 2 +-
 .../org/apache/camel/component/solr/SolrUpdateAutocommitTest.java   | 4 ++--
 .../test/java/org/apache/camel/component/solr/SolrUpdateTest.java   | 4 ++--
 .../camel/component/solr/integration/SolrCloudProducerIT.java       | 4 ++--
 8 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/InitSolrEndpointTest.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/InitSolrEndpointTest.java
index d35d096..34ffb6c 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/InitSolrEndpointTest.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/InitSolrEndpointTest.java
@@ -41,7 +41,7 @@ public class InitSolrEndpointTest extends SolrTestSupport {
     private String solrUrl = "solr://localhost:" + getPort() + "/solr";
 
     @Test
-    public void endpointCreatedCorrectlyWithAllOptions() throws Exception {
+    public void endpointCreatedCorrectlyWithAllOptions() {
         HttpClient httpClient = HttpClientUtil.createClient(new ModifiableSolrParams());
         context.getRegistry().bind("http", httpClient);
         SolrClient httpSolrClient = new HttpSolrClient.Builder(solrUrl).build();
@@ -53,7 +53,7 @@ public class InitSolrEndpointTest extends SolrTestSupport {
     }
 
     @Test
-    public void streamingEndpointCreatedCorrectly() throws Exception {
+    public void streamingEndpointCreatedCorrectly() {
         SolrEndpoint solrEndpoint = context.getEndpoint(solrUrl, SolrEndpoint.class);
         assertNotNull(solrEndpoint);
         assertEquals(SolrConstants.DEFUALT_STREAMING_QUEUE_SIZE, solrEndpoint.getSolrConfiguration().getStreamingQueueSize(),
@@ -64,7 +64,7 @@ public class InitSolrEndpointTest extends SolrTestSupport {
     }
 
     @Test
-    public void wrongURLFormatFailsEndpointCreation() throws Exception {
+    public void wrongURLFormatFailsEndpointCreation() {
         assertThrows(ResolveEndpointFailedException.class,
                 () -> context.getEndpoint("solr://localhost:x99/solr"));
     }
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/MapBodyManualIT.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/MapBodyManualIT.java
index 41388a3..4a73534 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/MapBodyManualIT.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/MapBodyManualIT.java
@@ -47,7 +47,7 @@ public class MapBodyManualIT extends CamelTestSupport {
         template.send("direct:start", new Processor() {
 
             @Override
-            public void process(Exchange exchange) throws Exception {
+            public void process(Exchange exchange) {
                 Map<String, String> map = new HashMap<>();
                 map.put("id", "0553579923");
                 map.put("cat", "Test");
@@ -66,10 +66,10 @@ public class MapBodyManualIT extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start").to("{{solr.address}}").to("mock:result");
             }
         };
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrComponentTestSupport.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrComponentTestSupport.java
index a7494eb..30ef7fb 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrComponentTestSupport.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrComponentTestSupport.java
@@ -99,10 +99,10 @@ public abstract class SolrComponentTestSupport extends SolrTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start").to(solrRouteUri());
                 from("direct:splitThenCommit")
                         .split(body())
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrServerMissingTest.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrServerMissingTest.java
index 95c593d..40c1451 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrServerMissingTest.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrServerMissingTest.java
@@ -25,7 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class SolrServerMissingTest extends SolrTestSupport {
 
     @Test
-    public void indexSingleDocumentToNonexistentServer() throws Exception {
+    public void indexSingleDocumentToNonexistentServer() {
         Exchange exchange = createExchangeWithBody(null);
         exchange.getIn().setHeader(SolrConstants.OPERATION, SolrConstants.OPERATION_INSERT);
         exchange.getIn().setHeader("SolrField.id", "MA147LL/A");
@@ -36,10 +36,10 @@ public class SolrServerMissingTest extends SolrTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start").to("solr://localhost:" + getPort() + "/missingSolr");
             }
         };
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrTestSupport.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrTestSupport.java
index 60f310b..0130f7d 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrTestSupport.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrTestSupport.java
@@ -26,7 +26,7 @@ public abstract class SolrTestSupport extends CamelTestSupport {
     private static int httpsPort;
 
     @BeforeAll
-    public static void initPort() throws Exception {
+    public static void initPort() {
         port = AvailablePortFinder.getNextAvailable();
         httpsPort = AvailablePortFinder.getNextAvailable();
         //TODO : add test for TLSv1.3
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateAutocommitTest.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateAutocommitTest.java
index 5ae96fb..303d4e8 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateAutocommitTest.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateAutocommitTest.java
@@ -145,7 +145,7 @@ public class SolrUpdateAutocommitTest extends SolrComponentTestSupport {
     }
 
     @Test
-    public void caughtSolrExceptionIsHandledElegantly() throws Exception {
+    public void caughtSolrExceptionIsHandledElegantly() {
         Exchange exchange = createExchangeWithBody(null);
         exchange.getIn().setHeader(SolrConstants.OPERATION, SolrConstants.OPERATION_INSERT);
         exchange.getIn().setHeader("SolrField.name", "Missing required field throws exception.");
@@ -245,7 +245,7 @@ public class SolrUpdateAutocommitTest extends SolrComponentTestSupport {
     }
 
     @Test
-    public void queryDocumentsToCSVUpdateHandlerWithoutParameters() throws Exception {
+    public void queryDocumentsToCSVUpdateHandlerWithoutParameters() {
         solrEndpoint.setRequestHandler("/update/csv");
 
         Exchange exchange = createExchangeWithBody(new File("src/test/resources/data/books.csv"));
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateTest.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateTest.java
index 0241d77..8e2b857 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateTest.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrUpdateTest.java
@@ -154,7 +154,7 @@ public class SolrUpdateTest extends SolrComponentTestSupport {
     }
 
     @Test
-    public void caughtSolrExceptionIsHandledElegantly() throws Exception {
+    public void caughtSolrExceptionIsHandledElegantly() {
         Exchange exchange = createExchangeWithBody(null);
         exchange.getIn().setHeader(SolrConstants.OPERATION, SolrConstants.OPERATION_INSERT);
         exchange.getIn().setHeader("SolrField.name", "Missing required field throws exception.");
@@ -264,7 +264,7 @@ public class SolrUpdateTest extends SolrComponentTestSupport {
     }
 
     @Test
-    public void queryDocumentsToCSVUpdateHandlerWithoutParameters() throws Exception {
+    public void queryDocumentsToCSVUpdateHandlerWithoutParameters() {
         solrEndpoint.setRequestHandler("/update/csv");
 
         Exchange exchange = createExchangeWithBody(new File("src/test/resources/data/books.csv"));
diff --git a/components/camel-solr/src/test/java/org/apache/camel/component/solr/integration/SolrCloudProducerIT.java b/components/camel-solr/src/test/java/org/apache/camel/component/solr/integration/SolrCloudProducerIT.java
index 51c5bb3..56fe5d5 100644
--- a/components/camel-solr/src/test/java/org/apache/camel/component/solr/integration/SolrCloudProducerIT.java
+++ b/components/camel-solr/src/test/java/org/apache/camel/component/solr/integration/SolrCloudProducerIT.java
@@ -30,10 +30,10 @@ public class SolrCloudProducerIT extends SolrCloudITSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:send").to(solrEndpointUri);
             }
         };

[camel] 10/14: CAMEL-17763: cleaned up unused exceptions in camel-snakeyaml

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 1247a4e66a0e59dc9ba9b8b6814cdd9385ee070f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:42:18 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-snakeyaml
---
 .../org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java    | 4 ++--
 .../java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java  | 4 ++--
 .../camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java      | 8 ++++----
 .../apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java | 4 ++--
 .../camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java     | 6 +++---
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java
index f0e5a07..54320d9 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java
@@ -144,14 +144,14 @@ public class SnakeYAMLDoSTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         SnakeYAMLDataFormat dataFormat = new SnakeYAMLDataFormat();
         dataFormat.setMaxAliasesForCollections(150);
 
         return new RouteBuilder() {
 
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:back")
                         .unmarshal(new SnakeYAMLDataFormat())
                         .to("mock:reverse");
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java
index 3c77424..104e027 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java
@@ -82,10 +82,10 @@ public class SnakeYAMLTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:in")
                         .marshal(format);
                 from("direct:back")
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java
index 62e5362..64e1ca2 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java
@@ -31,7 +31,7 @@ public final class SnakeYAMLTypeFilterHelper {
     private SnakeYAMLTypeFilterHelper() {
     }
 
-    static void testSafeConstructor(ProducerTemplate template) throws Exception {
+    static void testSafeConstructor(ProducerTemplate template) {
         try {
             template.sendBody(
                     "direct:safe-constructor",
@@ -43,7 +43,7 @@ public final class SnakeYAMLTypeFilterHelper {
         }
     }
 
-    static void testTypeConstructor(ProducerTemplate template) throws Exception {
+    static void testTypeConstructor(ProducerTemplate template) {
         Object result = template.requestBody(
                 "direct:type-constructor",
                 "!!org.apache.camel.component.snakeyaml.model.TestPojo {name: Camel}");
@@ -65,7 +65,7 @@ public final class SnakeYAMLTypeFilterHelper {
         }
     }
 
-    static void testTypeConstructorFromDefinition(ProducerTemplate template) throws Exception {
+    static void testTypeConstructorFromDefinition(ProducerTemplate template) {
         Object result;
 
         // TestPojo --> from definition type:
@@ -98,7 +98,7 @@ public final class SnakeYAMLTypeFilterHelper {
         }
     }
 
-    static void testAllowAllConstructor(ProducerTemplate template) throws Exception {
+    static void testAllowAllConstructor(ProducerTemplate template) {
         Object testPojo = template.requestBody(
                 "direct:all-constructor",
                 "!!org.apache.camel.component.snakeyaml.model.TestPojo {name: Camel}");
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java
index ccb38fa..9b21cac 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java
@@ -45,10 +45,10 @@ public class SnakeYAMLTypeFilterTest extends CamelTestSupport {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 // SafeConstructor
                 SnakeYAMLDataFormat safeConstructorDf = new SnakeYAMLDataFormat();
 
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java
index aa71e57..c06a50a 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java
@@ -26,17 +26,17 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class SnakeYAMLUnmarshalTypeTest extends CamelTestSupport {
     @Test
-    public void testUnmarshal() throws Exception {
+    public void testUnmarshal() {
         Object result = template.requestBody("direct:unmarshal", "name: Camel");
         assertNotNull(result);
         assertTrue(result instanceof TestPojo);
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 SnakeYAMLDataFormat format = new SnakeYAMLDataFormat();
                 format.setUnmarshalType(TestPojo.class);
 

[camel] 12/14: CAMEL-17763: cleaned up unused exceptions in camel-stomp

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 81fd61fe4a0f86b71b98a897fc80cc98ddb6f6e2
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:43:36 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-stomp
---
 .../src/test/java/org/apache/camel/component/stomp/StompBaseTest.java   | 2 +-
 .../java/org/apache/camel/component/stomp/StompCustomHeadersTest.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompBaseTest.java b/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompBaseTest.java
index 11fa729..d451b56 100644
--- a/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompBaseTest.java
+++ b/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompBaseTest.java
@@ -66,7 +66,7 @@ public abstract class StompBaseTest extends CamelTestSupport {
     }
 
     @Override
-    protected Registry createCamelRegistry() throws Exception {
+    protected Registry createCamelRegistry() {
         SimpleRegistry registry = new SimpleRegistry();
         if (isUseSsl()) {
             registry.bind("sslContextParameters", getClientSSLContextParameters());
diff --git a/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompCustomHeadersTest.java b/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompCustomHeadersTest.java
index edc6c05..cdaaec2 100644
--- a/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompCustomHeadersTest.java
+++ b/components/camel-stomp/src/test/java/org/apache/camel/component/stomp/StompCustomHeadersTest.java
@@ -27,7 +27,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 public class StompCustomHeadersTest extends StompBaseTest {
 
     @Test
-    public void testConsume() throws Exception {
+    public void testConsume() {
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("brokerURL", "tcp://localhost:61613");
         map.put("version", "1.2");

[camel] 01/14: CAMEL-17763: cleaned up unused exceptions in camel-xmpp

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 4993804ceb4c96bad7b7dc2da13fd07172bcb57a
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:28:10 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-xmpp
---
 .../org/apache/camel/component/xmpp/UriConfigurationTest.java     | 8 ++++----
 .../apache/camel/component/xmpp/XmppDeferredConnectionTest.java   | 2 +-
 .../camel/component/xmpp/integration/XmppMultiUserChatIT.java     | 4 ++--
 .../component/xmpp/integration/XmppProducerConcurrentIT.java      | 4 ++--
 .../apache/camel/component/xmpp/integration/XmppRouteChatIT.java  | 4 ++--
 .../org/apache/camel/component/xmpp/integration/XmppRouteIT.java  | 2 +-
 .../integration/XmppRouteMultipleProducersSingleConsumerIT.java   | 4 ++--
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java
index 2a29680..c18dcc5 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java
@@ -28,7 +28,7 @@ public class UriConfigurationTest {
     protected CamelContext context = new DefaultCamelContext();
 
     @Test
-    public void testPrivateChatConfiguration() throws Exception {
+    public void testPrivateChatConfiguration() {
         Endpoint endpoint = context
                 .getEndpoint("xmpp://camel-user@localhost:123/test-user@localhost?password=secret&serviceName=someCoolChat");
         assertTrue(endpoint instanceof XmppEndpoint, "Endpoint not an XmppEndpoint: " + endpoint);
@@ -43,7 +43,7 @@ public class UriConfigurationTest {
     }
 
     @Test
-    public void testGroupChatConfiguration() throws Exception {
+    public void testGroupChatConfiguration() {
         Endpoint endpoint
                 = context.getEndpoint("xmpp://camel-user@im.google.com:123?room=cheese&password=secret&nickname=incognito");
         assertTrue(endpoint instanceof XmppEndpoint, "Endpoint not an XmppEndpoint: " + endpoint);
@@ -61,7 +61,7 @@ public class UriConfigurationTest {
     // clients program assuming the default "Camel" resource name
     // so it is better to avoid changing it.
     @Test
-    public void testDefaultResource() throws Exception {
+    public void testDefaultResource() {
         Endpoint endpoint = context.getEndpoint("xmpp://camel-user@im.google.com?password=secret");
         assertTrue(endpoint instanceof XmppEndpoint, "Endpoint not an XmppEndpoint: " + endpoint);
         XmppEndpoint xmppEndpoint = (XmppEndpoint) endpoint;
@@ -70,7 +70,7 @@ public class UriConfigurationTest {
     }
 
     @Test
-    public void testPubSubConfiguration() throws Exception {
+    public void testPubSubConfiguration() {
         Endpoint endpoint = context.getEndpoint("xmpp://camel-user@localhost:123?password=secret&pubsub=true");
         assertTrue(endpoint instanceof XmppEndpoint, "Endpoint not an XmppEndpoint: " + endpoint);
         XmppEndpoint xmppEndpoint = (XmppEndpoint) endpoint;
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppDeferredConnectionTest.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppDeferredConnectionTest.java
index 9095d1c..9f1abbe 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppDeferredConnectionTest.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppDeferredConnectionTest.java
@@ -82,7 +82,7 @@ public class XmppDeferredConnectionTest extends XmppBaseContainerTest {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
 
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppMultiUserChatIT.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppMultiUserChatIT.java
index 7e1e5c3..4898a7f 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppMultiUserChatIT.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppMultiUserChatIT.java
@@ -40,9 +40,9 @@ public class XmppMultiUserChatIT extends XmppBaseIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
 
                 from("direct:toProducer")
                         .to(getProducerUri());
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppProducerConcurrentIT.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppProducerConcurrentIT.java
index 50525a6..30d90c0 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppProducerConcurrentIT.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppProducerConcurrentIT.java
@@ -51,10 +51,10 @@ public class XmppProducerConcurrentIT extends XmppBaseIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("direct:start")
                         .to("xmpp://" + getUrl()
                             + "?connectionConfig=#customConnectionConfig&room=camel-test&user=camel_consumer&password=secret&serviceName=apache.camel")
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteChatIT.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteChatIT.java
index d54c555..e771423 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteChatIT.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteChatIT.java
@@ -50,9 +50,9 @@ public class XmppRouteChatIT extends XmppBaseIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
 
                 from("direct:toConsumer")
                         .to(getConsumerUri());
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteIT.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteIT.java
index 74e18bf..aad3400 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteIT.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteIT.java
@@ -74,7 +74,7 @@ public class XmppRouteIT extends XmppBaseIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         String uriPrefix = getUriPrefix();
         final String uri1 = uriPrefix + "&resource=camel-test-from&nickname=came-test-from";
         final String uri2 = uriPrefix + "&resource=camel-test-to&nickname=came-test-to";
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteMultipleProducersSingleConsumerIT.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteMultipleProducersSingleConsumerIT.java
index 4e337af..04b6fd2 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteMultipleProducersSingleConsumerIT.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/integration/XmppRouteMultipleProducersSingleConsumerIT.java
@@ -45,9 +45,9 @@ public class XmppRouteMultipleProducersSingleConsumerIT extends XmppBaseIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
-            public void configure() throws Exception {
+            public void configure() {
 
                 from("direct:toProducer1")
                         .to(getProducer1Uri());

[camel] 09/14: CAMEL-17763: cleaned up unused exceptions in camel-platform-http-vertx

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 104cf84ac3f1b037684598d8ce410fb58e80d8da
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:42:09 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-platform-http-vertx
---
 .../http/vertx/VertxPlatformHttpEngineTest.java    | 24 +++++++++++-----------
 ...rtxPlatformHttpEngineWithTypeConverterTest.java |  9 ++++----
 .../http/vertx/VertxPlatformHttpJacksonTest.java   |  2 +-
 3 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
index 8354932..fbb5472 100644
--- a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
+++ b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java
@@ -120,7 +120,7 @@ public class VertxPlatformHttpEngineTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/get")
                             .routeId("get")
                             .setBody().constant("get");
@@ -171,7 +171,7 @@ public class VertxPlatformHttpEngineTest {
 
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/get")
                             .routeId("get")
                             .process(e -> Thread.sleep(TimeUnit.SECONDS.toMillis(3)))
@@ -200,7 +200,7 @@ public class VertxPlatformHttpEngineTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/get")
                             .routeId("get")
                             .process(exchange -> {
@@ -231,7 +231,7 @@ public class VertxPlatformHttpEngineTest {
             context.getRegistry().bind("clientSSLContextParameters", clientSSLParameters);
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/")
                             .transform().body(String.class, b -> b.toUpperCase());
                 }
@@ -260,7 +260,7 @@ public class VertxPlatformHttpEngineTest {
 
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/")
                             .transform().body(String.class, b -> b.toUpperCase());
                 }
@@ -289,7 +289,7 @@ public class VertxPlatformHttpEngineTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/")
                             .transform().constant("cors");
                 }
@@ -324,7 +324,7 @@ public class VertxPlatformHttpEngineTest {
             final String greeting = "Hello Camel";
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/greeting/{name}?matchOnUriPrefix=true")
                             .transform().simple("Hello ${header.name}");
                 }
@@ -372,7 +372,7 @@ public class VertxPlatformHttpEngineTest {
 
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/upload")
                             .process(exchange -> {
                                 AttachmentMessage message = exchange.getMessage(AttachmentMessage.class);
@@ -403,7 +403,7 @@ public class VertxPlatformHttpEngineTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/form/post")
                             .convertBodyTo(String.class);
                 }
@@ -431,7 +431,7 @@ public class VertxPlatformHttpEngineTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/text/post")
                             .log("POST:/test/post has body ${body}");
                 }
@@ -460,7 +460,7 @@ public class VertxPlatformHttpEngineTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     restConfiguration().component("platform-http");
 
                     rest("/rest")
@@ -511,7 +511,7 @@ public class VertxPlatformHttpEngineTest {
         CamelContext context = createCamelContext();
         context.addRoutes(new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("platform-http:/secure")
                         .process(exchange -> {
                             Message message = exchange.getMessage();
diff --git a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineWithTypeConverterTest.java b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineWithTypeConverterTest.java
index f38d3bb..07dfec1 100644
--- a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineWithTypeConverterTest.java
+++ b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineWithTypeConverterTest.java
@@ -25,7 +25,6 @@ import java.util.Map;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
-import org.apache.camel.NoTypeConversionAvailableException;
 import org.apache.camel.TypeConversionException;
 import org.apache.camel.TypeConverter;
 import org.apache.camel.builder.RouteBuilder;
@@ -46,7 +45,7 @@ public class VertxPlatformHttpEngineWithTypeConverterTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/bytebuffer")
                             .routeId("bytebuffer")
                             .setBody().constant(Collections.singletonMap("bb", "my-test"));
@@ -76,7 +75,7 @@ public class VertxPlatformHttpEngineWithTypeConverterTest {
         try {
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/inputstream")
                             .routeId("inputstream")
                             .setBody().constant(Collections.singletonMap("is", "my-test"));
@@ -135,13 +134,13 @@ public class VertxPlatformHttpEngineWithTypeConverterTest {
 
         @Override
         public <T> T mandatoryConvertTo(Class<T> type, Object value)
-                throws TypeConversionException, NoTypeConversionAvailableException {
+                throws TypeConversionException {
             return null;
         }
 
         @Override
         public <T> T mandatoryConvertTo(Class<T> type, Exchange exchange, Object value)
-                throws TypeConversionException, NoTypeConversionAvailableException {
+                throws TypeConversionException {
             return null;
         }
 
diff --git a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpJacksonTest.java b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpJacksonTest.java
index 2213104..c2ab4df 100644
--- a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpJacksonTest.java
+++ b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpJacksonTest.java
@@ -36,7 +36,7 @@ public class VertxPlatformHttpJacksonTest {
 
             context.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("platform-http:/hello")
                             .setBody().constant("{\"hello\": \"world\"}")
                             .unmarshal().json();

[camel] 04/14: CAMEL-17763: cleaned up unused exceptions in camel-weather

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 8fd5abe098d0f358f86940ca38536e494b8ce0e2
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:33:33 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-weather
---
 .../apache/camel/component/weather/CurrentWeatherConsumerHtmlIT.java  | 4 ++--
 .../org/apache/camel/component/weather/CurrentWeatherConsumerIT.java  | 4 ++--
 .../apache/camel/component/weather/CurrentWeatherConsumerXmlIT.java   | 4 ++--
 .../camel/component/weather/CurrentWeatherMadridConsumerIT.java       | 4 ++--
 .../camel/component/weather/CurrentWeatherMadridProducerIT.java       | 4 ++--
 .../camel/component/weather/Forecast7WeatherMadridConsumerIT.java     | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerHtmlIT.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerHtmlIT.java
index b83ee33..e660767 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerHtmlIT.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerHtmlIT.java
@@ -37,10 +37,10 @@ public class CurrentWeatherConsumerHtmlIT extends BaseWeatherConsumerIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("weather:foo?mode=HTML&appid=9162755b2efa555823cfe0451d7fff38&geolocationAccessKey=test&geolocationRequestHostIP=test&location=Rome")
                         .to("mock:result");
             }
diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerIT.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerIT.java
index 489da89..e7109a9 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerIT.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerIT.java
@@ -35,10 +35,10 @@ public class CurrentWeatherConsumerIT extends BaseWeatherConsumerIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("weather:foo?appid=9162755b2efa555823cfe0451d7fff38&lon=4&lat=52&mode=xml").to("mock:result");
             }
         };
diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerXmlIT.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerXmlIT.java
index 054fd38..f7d3e97 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerXmlIT.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherConsumerXmlIT.java
@@ -34,10 +34,10 @@ public class CurrentWeatherConsumerXmlIT extends BaseWeatherConsumerIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("weather:foo?mode=XML&appid=9162755b2efa555823cfe0451d7fff38&ids=2747373").to("mock:result");
             }
         };
diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridConsumerIT.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridConsumerIT.java
index 876f591..20518a6 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridConsumerIT.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridConsumerIT.java
@@ -24,10 +24,10 @@ import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
 public class CurrentWeatherMadridConsumerIT extends BaseWeatherConsumerIT {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("weather:foo?location=Madrid,Spain&appid=9162755b2efa555823cfe0451d7fff38").to("mock:result");
             }
         };
diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerIT.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerIT.java
index 6a66cbb..59625aa 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerIT.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/CurrentWeatherMadridProducerIT.java
@@ -89,10 +89,10 @@ public class CurrentWeatherMadridProducerIT extends BaseWeatherConsumerIT {
     }
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
 
                 /* The Camel Route uses the apache-camel appid to access the openweathermap service */
                 from("direct:start")
diff --git a/components/camel-weather/src/test/java/org/apache/camel/component/weather/Forecast7WeatherMadridConsumerIT.java b/components/camel-weather/src/test/java/org/apache/camel/component/weather/Forecast7WeatherMadridConsumerIT.java
index 791bc01..ad6da14 100644
--- a/components/camel-weather/src/test/java/org/apache/camel/component/weather/Forecast7WeatherMadridConsumerIT.java
+++ b/components/camel-weather/src/test/java/org/apache/camel/component/weather/Forecast7WeatherMadridConsumerIT.java
@@ -24,10 +24,10 @@ import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
 public class Forecast7WeatherMadridConsumerIT extends BaseWeatherConsumerIT {
 
     @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("weather:foo?location=Madrid,Spain&period=7 days&units=IMPERIAL&appid=9162755b2efa555823cfe0451d7fff38")
                         .to("mock:result");
             }

[camel] 05/14: CAMEL-17763: cleaned up unused exceptions in camel-weka

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 67df0354aacec5af52ee1a0d966623ca09f8b342
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:33:34 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-weka
---
 .../apache/camel/component/weka/DecisionTreeTest.java  |  6 +++---
 .../org/apache/camel/component/weka/FilterTest.java    |  4 ++--
 .../apache/camel/component/weka/PredictionTest.java    |  4 ++--
 .../org/apache/camel/component/weka/ReadWriteTest.java | 18 +++++++++---------
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/components/camel-weka/src/test/java/org/apache/camel/component/weka/DecisionTreeTest.java b/components/camel-weka/src/test/java/org/apache/camel/component/weka/DecisionTreeTest.java
index 0971557..133922f 100644
--- a/components/camel-weka/src/test/java/org/apache/camel/component/weka/DecisionTreeTest.java
+++ b/components/camel-weka/src/test/java/org/apache/camel/component/weka/DecisionTreeTest.java
@@ -41,7 +41,7 @@ public class DecisionTreeTest extends AbstractWekaTest {
             camelctx.addRoutes(new RouteBuilder() {
 
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
 
                     // Use the weka to read the model training data
                     from("direct:start")
@@ -78,7 +78,7 @@ public class DecisionTreeTest extends AbstractWekaTest {
             camelctx.addRoutes(new RouteBuilder() {
 
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
 
                     // Use the weka to read the model training data
                     from("direct:start")
@@ -115,7 +115,7 @@ public class DecisionTreeTest extends AbstractWekaTest {
             camelctx.addRoutes(new RouteBuilder() {
 
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
 
                     // Use the weka to read the model training data
                     from("direct:start")
diff --git a/components/camel-weka/src/test/java/org/apache/camel/component/weka/FilterTest.java b/components/camel-weka/src/test/java/org/apache/camel/component/weka/FilterTest.java
index 2dc28ed..3d21422 100644
--- a/components/camel-weka/src/test/java/org/apache/camel/component/weka/FilterTest.java
+++ b/components/camel-weka/src/test/java/org/apache/camel/component/weka/FilterTest.java
@@ -41,7 +41,7 @@ public class FilterTest {
             camelctx.addRoutes(new RouteBuilder() {
 
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
 
                     // Use the file component to read the CSV file
                     from("file:src/test/resources/data?fileName=sfny.csv&noop=true")
@@ -80,7 +80,7 @@ public class FilterTest {
             camelctx.addRoutes(new RouteBuilder() {
 
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
 
                     // Use weka to read the CSV file
                     from("direct:start")
diff --git a/components/camel-weka/src/test/java/org/apache/camel/component/weka/PredictionTest.java b/components/camel-weka/src/test/java/org/apache/camel/component/weka/PredictionTest.java
index aace0b1..b9806d8 100644
--- a/components/camel-weka/src/test/java/org/apache/camel/component/weka/PredictionTest.java
+++ b/components/camel-weka/src/test/java/org/apache/camel/component/weka/PredictionTest.java
@@ -43,7 +43,7 @@ public class PredictionTest extends AbstractWekaTest {
             camelctx.addRoutes(new RouteBuilder() {
 
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
 
                     // Use the file component to read the CSV file
                     from("file:src/test/resources/data?fileName=sfny-test.arff&noop=true")
@@ -65,7 +65,7 @@ public class PredictionTest extends AbstractWekaTest {
 
                             // Use a processor to do the prediction
                             .process(new Processor() {
-                                public void process(Exchange exchange) throws Exception {
+                                public void process(Exchange exchange) {
                                     Dataset dataset = exchange.getMessage().getBody(Dataset.class);
                                     dataset.applyToInstances(new NominalPredictor());
                                 }
diff --git a/components/camel-weka/src/test/java/org/apache/camel/component/weka/ReadWriteTest.java b/components/camel-weka/src/test/java/org/apache/camel/component/weka/ReadWriteTest.java
index 96292d9..4a9b1e2 100644
--- a/components/camel-weka/src/test/java/org/apache/camel/component/weka/ReadWriteTest.java
+++ b/components/camel-weka/src/test/java/org/apache/camel/component/weka/ReadWriteTest.java
@@ -41,7 +41,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:version");
                 }
@@ -61,7 +61,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("file:src/test/resources/data?fileName=sfny.csv&noop=true")
                             .to("weka:read")
                             .to("direct:end");
@@ -82,7 +82,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:read");
                 }
@@ -105,7 +105,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:read");
                 }
@@ -128,7 +128,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:read?path=src/test/resources/data/sfny.arff");
                 }
@@ -148,7 +148,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:read");
                 }
@@ -171,7 +171,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("file:target/data?fileName=sfny.arff");
                 }
@@ -197,7 +197,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:write")
                             .to("file:target/data?fileName=sfny.arff");
@@ -224,7 +224,7 @@ public class ReadWriteTest {
 
             camelctx.addRoutes(new RouteBuilder() {
                 @Override
-                public void configure() throws Exception {
+                public void configure() {
                     from("direct:start")
                             .to("weka:write?path=target/data/sfny.arff");
                 }

[camel] 08/14: CAMEL-17763: cleaned up unused exceptions in camel-platform-http

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 acac2bd5d2cd89c54310a8871404035b11d966ce
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:41:56 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-platform-http
---
 .../camel/component/platform/http/AbstractPlatformHttpTest.java      | 2 +-
 .../component/platform/http/JettyCustomPlatformHttpConsumer.java     | 5 +----
 .../org/apache/camel/component/platform/http/PlatformHttpTest.java   | 4 ++--
 .../platform/http/RestPlatformHttpContextPathConfigurationTest.java  | 2 +-
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/AbstractPlatformHttpTest.java b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/AbstractPlatformHttpTest.java
index 9262821..9265e4a 100644
--- a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/AbstractPlatformHttpTest.java
+++ b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/AbstractPlatformHttpTest.java
@@ -53,7 +53,7 @@ abstract class AbstractPlatformHttpTest {
     protected RouteBuilder routes() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
             }
         };
     }
diff --git a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpConsumer.java b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpConsumer.java
index c790116..182de85 100644
--- a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpConsumer.java
+++ b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/JettyCustomPlatformHttpConsumer.java
@@ -17,10 +17,8 @@
 package org.apache.camel.component.platform.http;
 
 import java.io.BufferedReader;
-import java.io.IOException;
 import java.util.regex.Pattern;
 
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -67,8 +65,7 @@ public class JettyCustomPlatformHttpConsumer extends DefaultConsumer {
         contextHandler.setHandler(new AbstractHandler() {
             @Override
             public void handle(
-                    String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
-                    throws IOException, ServletException {
+                    String s, Request request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
                 Exchange exchg = null;
                 try {
                     BufferedReader reader = httpServletRequest.getReader();
diff --git a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/PlatformHttpTest.java b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/PlatformHttpTest.java
index 5474fe9..cf3e951 100644
--- a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/PlatformHttpTest.java
+++ b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/PlatformHttpTest.java
@@ -30,7 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 public class PlatformHttpTest extends AbstractPlatformHttpTest {
 
     @Test
-    public void testGet() throws Exception {
+    public void testGet() {
         given()
                 .header("Accept", "application/json")
                 .port(port)
@@ -61,7 +61,7 @@ public class PlatformHttpTest extends AbstractPlatformHttpTest {
     protected RouteBuilder routes() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from("platform-http:/get")
                         .setBody().constant("get");
                 from("platform-http:/post")
diff --git a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java
index 03ce639..9520ec2 100644
--- a/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java
+++ b/components/camel-platform-http/src/test/java/org/apache/camel/component/platform/http/RestPlatformHttpContextPathConfigurationTest.java
@@ -41,7 +41,7 @@ public class RestPlatformHttpContextPathConfigurationTest extends AbstractPlatfo
     protected RouteBuilder routes() {
         return new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 restConfiguration()
                         .component("platform-http")
                         .contextPath("/rest");

[camel] 14/14: CAMEL-17763: cleaned up unused exceptions in camel-pulsar

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 d60678f8219e7a31225019930dfc724db359dadc
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Mar 10 15:52:18 2022 +0100

    CAMEL-17763: cleaned up unused exceptions in camel-pulsar
---
 .../camel/component/pulsar/integration/PulsarConsumerPatternInIT.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/integration/PulsarConsumerPatternInIT.java b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/integration/PulsarConsumerPatternInIT.java
index 5c77617..2dc0d77 100644
--- a/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/integration/PulsarConsumerPatternInIT.java
+++ b/components/camel-pulsar/src/test/java/org/apache/camel/component/pulsar/integration/PulsarConsumerPatternInIT.java
@@ -100,7 +100,7 @@ public class PulsarConsumerPatternInIT extends PulsarITSupport {
         // and for that we add them first as routes, which we then later stop
         context.addRoutes(new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from(fromOne).routeId("one").to("mock:one");
                 from(fromTwo).routeId("two").to("mock:two");
             }
@@ -128,7 +128,7 @@ public class PulsarConsumerPatternInIT extends PulsarITSupport {
 
         context.addRoutes(new RouteBuilder() {
             @Override
-            public void configure() throws Exception {
+            public void configure() {
                 from(from).to(to).process(e -> LOGGER.info("Processing message {}", e.getIn().getBody(String.class)));
             }
         });