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 45ec57497507751aeb36a2adc901378ca894b1a4 Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Mar 8 14:41:06 2022 +0100 CAMEL-17763: cleaned up unused exceptions in camel-aws2-mq --- .../aws2/mq/MQComponentClientRegistryTest.java | 2 +- .../aws2/mq/MQComponentVerifierExtensionTest.java | 6 +++--- .../camel/component/aws2/mq/MQProducerSpringTest.java | 14 +++++++------- .../apache/camel/component/aws2/mq/MQProducerTest.java | 18 +++++++++--------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java index 64ddf47..5fc8570 100644 --- a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java +++ b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentClientRegistryTest.java @@ -37,7 +37,7 @@ public class MQComponentClientRegistryTest extends CamelTestSupport { } @Test - public void createEndpointWithMinimalMQClientMisconfiguration() throws Exception { + public void createEndpointWithMinimalMQClientMisconfiguration() { MQ2Component component = context.getComponent("aws2-mq", MQ2Component.class); assertThrows(IllegalArgumentException.class, () -> { diff --git a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentVerifierExtensionTest.java b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentVerifierExtensionTest.java index 16a5adf..308c879 100644 --- a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentVerifierExtensionTest.java +++ b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQComponentVerifierExtensionTest.java @@ -37,7 +37,7 @@ public class MQComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testParameters() throws Exception { + public void testParameters() { Component component = context().getComponent("aws2-mq"); ComponentVerifierExtension verifier @@ -56,7 +56,7 @@ public class MQComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testConnectivity() throws Exception { + public void testConnectivity() { Component component = context().getComponent("aws2-mq"); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); @@ -74,7 +74,7 @@ public class MQComponentVerifierExtensionTest extends CamelTestSupport { } @Test - public void testConnectivityAndRegion() throws Exception { + public void testConnectivityAndRegion() { Component component = context().getComponent("aws2-mq"); ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new); diff --git a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerSpringTest.java b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerSpringTest.java index 7fb80e3..4f71222 100644 --- a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerSpringTest.java +++ b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerSpringTest.java @@ -51,7 +51,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:listBrokers", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.listBrokers); } }); @@ -70,7 +70,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:listBrokersPojo", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.listBrokers); exchange.getIn().setBody(ListBrokersRequest.builder().maxResults(10).build()); } @@ -90,7 +90,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:createBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.createBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_NAME, "test"); exchange.getIn().setHeader(MQ2Constants.BROKER_DEPLOYMENT_MODE, DeploymentMode.SINGLE_INSTANCE); @@ -120,7 +120,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:createBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.deleteBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); } @@ -138,7 +138,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); template.request("direct:rebootBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.rebootBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); } @@ -153,7 +153,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:updateBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.updateBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); ConfigurationId.Builder cId = ConfigurationId.builder(); @@ -174,7 +174,7 @@ public class MQProducerSpringTest extends CamelSpringTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:describeBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.describeBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); ConfigurationId.Builder cId = ConfigurationId.builder(); diff --git a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java index 1fde874..84f7277 100644 --- a/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java +++ b/components/camel-aws/camel-aws2-mq/src/test/java/org/apache/camel/component/aws2/mq/MQProducerTest.java @@ -55,7 +55,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:listBrokers", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.listBrokers); } }); @@ -74,7 +74,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:listBrokersPojo", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.listBrokers); exchange.getIn().setBody(ListBrokersRequest.builder().maxResults(10).build()); } @@ -94,7 +94,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:createBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.createBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_NAME, "test"); exchange.getIn().setHeader(MQ2Constants.BROKER_DEPLOYMENT_MODE, DeploymentMode.SINGLE_INSTANCE); @@ -124,7 +124,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:createBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.deleteBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); } @@ -142,7 +142,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); template.request("direct:rebootBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.rebootBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); } @@ -157,7 +157,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:updateBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.updateBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); ConfigurationId.Builder cId = ConfigurationId.builder(); @@ -178,7 +178,7 @@ public class MQProducerTest extends CamelTestSupport { mock.expectedMessageCount(1); Exchange exchange = template.request("direct:describeBroker", new Processor() { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader(MQ2Constants.OPERATION, MQ2Operations.describeBroker); exchange.getIn().setHeader(MQ2Constants.BROKER_ID, "1"); ConfigurationId.Builder cId = ConfigurationId.builder(); @@ -194,10 +194,10 @@ public class MQProducerTest 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:listBrokers").to("aws2-mq://test?amazonMqClient=#amazonMqClient&operation=listBrokers") .to("mock:result"); from("direct:listBrokersPojo")