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 <[email protected]> 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);
