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 f371e8d4838edabe9409473ebe696f6c43f145ba Author: Otavio Rodolfo Piske <angusyo...@gmail.com> AuthorDate: Tue Mar 8 14:41:04 2022 +0100 CAMEL-17763: cleaned up unused exceptions in camel-aws-xray --- .../java/org/apache/camel/component/aws/xray/ABCRouteTest.java | 6 +++--- .../org/apache/camel/component/aws/xray/BeanTracingTest.java | 6 +++--- .../camel/component/aws/xray/ClientRecipientListRouteTest.java | 6 +++--- .../camel/component/aws/xray/ComprehensiveTrackingTest.java | 6 +++--- .../org/apache/camel/component/aws/xray/EIPTracingTest.java | 6 +++--- .../org/apache/camel/component/aws/xray/ErrorHandlingTest.java | 8 ++++---- .../java/org/apache/camel/component/aws/xray/ErrorTest.java | 10 +++++----- .../camel/component/aws/xray/MulticastParallelRouteTest.java | 6 +++--- .../apache/camel/component/aws/xray/MulticastRouteTest.java | 6 +++--- .../apache/camel/component/aws/xray/Route2ConcurrentTest.java | 6 +++--- .../apache/camel/component/aws/xray/RouteConcurrentTest.java | 6 +++--- .../org/apache/camel/component/aws/xray/TwoService2Test.java | 6 +++--- .../org/apache/camel/component/aws/xray/TwoServiceTest.java | 6 +++--- .../camel/component/aws/xray/TwoServiceWithExcludeTest.java | 6 +++--- 14 files changed, 45 insertions(+), 45 deletions(-) diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ABCRouteTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ABCRouteTest.java index 0ede499..fd56ab5 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ABCRouteTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ABCRouteTest.java @@ -45,7 +45,7 @@ public class ABCRouteTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(5).create(); template.requestBody("direct:start", "Hello"); @@ -57,10 +57,10 @@ public class ABCRouteTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .wireTap("seda:d") .to("direct:a"); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/BeanTracingTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/BeanTracingTest.java index f34d3ac..b9e4d85 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/BeanTracingTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/BeanTracingTest.java @@ -74,10 +74,10 @@ public class BeanTracingTest extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .log("start has been called") .bean(TraceBean.class) @@ -109,7 +109,7 @@ public class BeanTracingTest extends CamelAwsXRayTestSupport { public static class CustomProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader("TEST", "done"); } } diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ClientRecipientListRouteTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ClientRecipientListRouteTest.java index 2feb59d..f6f66e7 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ClientRecipientListRouteTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ClientRecipientListRouteTest.java @@ -41,7 +41,7 @@ public class ClientRecipientListRouteTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(7).create(); template.requestBody("direct:start", "Hello"); @@ -53,10 +53,10 @@ public class ClientRecipientListRouteTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .recipientList(constant("seda:a,seda:b,seda:c")); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ComprehensiveTrackingTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ComprehensiveTrackingTest.java index 3643eb7..0f2e205 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ComprehensiveTrackingTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ComprehensiveTrackingTest.java @@ -54,7 +54,7 @@ public class ComprehensiveTrackingTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).from("seda:test").whenDone(1).create(); template.requestBody("direct:start", "Hello"); @@ -68,10 +68,10 @@ public class ComprehensiveTrackingTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .wireTap("seda:d") .to("direct:a"); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/EIPTracingTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/EIPTracingTest.java index 0f8f4f5..086a32a 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/EIPTracingTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/EIPTracingTest.java @@ -82,10 +82,10 @@ public class EIPTracingTest extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .log("start has been called") .bean(TraceBean.class) @@ -117,7 +117,7 @@ public class EIPTracingTest extends CamelAwsXRayTestSupport { public static class CustomProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { exchange.getIn().setHeader("TEST", "done"); } } diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorHandlingTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorHandlingTest.java index df50470..7f53d17 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorHandlingTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorHandlingTest.java @@ -59,10 +59,10 @@ public class ErrorHandlingTest extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { onException(Exception.class) .process(new ExceptionProcessor()) @@ -138,7 +138,7 @@ public class ErrorHandlingTest extends CamelAwsXRayTestSupport { public static class ExceptionProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Exception ex = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); LOG.debug("Processing caught exception {}", ex.getLocalizedMessage()); exchange.getIn().getHeaders().put("HandledError", ex.getLocalizedMessage()); @@ -154,7 +154,7 @@ public class ErrorHandlingTest extends CamelAwsXRayTestSupport { public static class ExceptionRetryProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Exception ex = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); LOG.debug(">> Attempting redelivery of handled exception {} with message: {}", ex.getClass().getSimpleName(), ex.getLocalizedMessage()); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorTest.java index 02e1a1b..c776890 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/ErrorTest.java @@ -53,10 +53,10 @@ public class ErrorTest extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { onException(Exception.class) .process(new ExceptionProcessor()) @@ -90,7 +90,7 @@ public class ErrorTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create(); template.requestBody("direct:start", "Hello"); @@ -119,7 +119,7 @@ public class ErrorTest extends CamelAwsXRayTestSupport { public static class ExceptionProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Exception ex = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); LOG.debug("Processing caught exception {}", ex.getLocalizedMessage()); exchange.getIn().getHeaders().put("HandledError", ex.getLocalizedMessage()); @@ -135,7 +135,7 @@ public class ErrorTest extends CamelAwsXRayTestSupport { public static class ExceptionRetryProcessor implements Processor { @Override - public void process(Exchange exchange) throws Exception { + public void process(Exchange exchange) { Exception ex = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); LOG.debug(">> Attempting redelivery of handled exception {} with message: {}", ex.getClass().getSimpleName(), ex.getLocalizedMessage()); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastParallelRouteTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastParallelRouteTest.java index 17b0490..2fa58ee 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastParallelRouteTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastParallelRouteTest.java @@ -44,7 +44,7 @@ public class MulticastParallelRouteTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context) .from("seda:b").whenDone(1) .and() @@ -60,10 +60,10 @@ public class MulticastParallelRouteTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .to("seda:a"); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastRouteTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastRouteTest.java index 397aa59..4a3d138 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastRouteTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/MulticastRouteTest.java @@ -44,7 +44,7 @@ public class MulticastRouteTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context) .from("seda:b").whenDone(1) .and() @@ -60,10 +60,10 @@ public class MulticastRouteTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:start").routeId("start") .to("seda:a"); diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/Route2ConcurrentTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/Route2ConcurrentTest.java index 9b30030..7d78ebc 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/Route2ConcurrentTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/Route2ConcurrentTest.java @@ -48,7 +48,7 @@ public class Route2ConcurrentTest extends CamelAwsXRayTestSupport { } @Test - public void testConcurrentInvocationsOfRoute() throws Exception { + public void testConcurrentInvocationsOfRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(10).create(); for (int i = 0; i < 5; i++) { @@ -62,10 +62,10 @@ public class Route2ConcurrentTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("seda:foo?concurrentConsumers=5").routeId("foo") .log("routing at ${routeId}") .delay(simple("${random(1000,2000)}")) diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/RouteConcurrentTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/RouteConcurrentTest.java index 8d3dab8..641601e 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/RouteConcurrentTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/RouteConcurrentTest.java @@ -36,7 +36,7 @@ public class RouteConcurrentTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(2).create(); template.sendBody("seda:foo", "Hello World"); @@ -48,10 +48,10 @@ public class RouteConcurrentTest extends CamelAwsXRayTestSupport { } @Override - protected RouteBuilder createRouteBuilder() throws Exception { + protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("seda:foo?concurrentConsumers=5").routeId("foo") .log("routing at ${routeId}") .delay(simple("${random(1000,2000)}")) diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoService2Test.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoService2Test.java index 76d79a5..d2ffacb 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoService2Test.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoService2Test.java @@ -37,7 +37,7 @@ public class TwoService2Test extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create(); template.requestBody("direct:ServiceA", "Hello"); @@ -49,10 +49,10 @@ public class TwoService2Test extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:ServiceA") .log("ServiceA has been called") .delay(simple("${random(1000,2000)}")) diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceTest.java index 9a8b69a..0b679b5 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceTest.java @@ -38,7 +38,7 @@ public class TwoServiceTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create(); template.requestBody("direct:ServiceA", "Hello"); @@ -49,10 +49,10 @@ public class TwoServiceTest extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:ServiceA").routeId("ServiceA") .log("ServiceA has been called") .delay(simple("${random(1000,2000)}")) diff --git a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceWithExcludeTest.java b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceWithExcludeTest.java index 5394593..90ef312 100644 --- a/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceWithExcludeTest.java +++ b/components/camel-aws/camel-aws-xray/src/test/java/org/apache/camel/component/aws/xray/TwoServiceWithExcludeTest.java @@ -44,7 +44,7 @@ public class TwoServiceWithExcludeTest extends CamelAwsXRayTestSupport { } @Test - public void testRoute() throws Exception { + public void testRoute() { NotifyBuilder notify = new NotifyBuilder(context).whenDone(1).create(); template.requestBody("direct:ServiceA", "Hello"); @@ -56,10 +56,10 @@ public class TwoServiceWithExcludeTest extends CamelAwsXRayTestSupport { } @Override - protected RoutesBuilder createRouteBuilder() throws Exception { + protected RoutesBuilder createRouteBuilder() { return new RouteBuilder() { @Override - public void configure() throws Exception { + public void configure() { from("direct:ServiceA").routeId("ServiceA") .log("ServiceA has been called") .delay(simple("${random(1000,2000)}"))