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/04/08 14:47:13 UTC

[camel] 08/09: CAMEL-17763: cleanup unused exceptions in camel-graphql

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 4f7abca5aa92e56b7c7fcd8cb45d8b62ced040d7
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Fri Apr 8 15:48:22 2022 +0200

    CAMEL-17763: cleanup unused exceptions in camel-graphql
---
 .../org/apache/camel/component/graphql/GraphqlComponentTest.java    | 6 +++---
 .../org/apache/camel/component/graphql/server/GraphqlServer.java    | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/GraphqlComponentTest.java b/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/GraphqlComponentTest.java
index 356f178d2df..11b6ed4db27 100644
--- a/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/GraphqlComponentTest.java
+++ b/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/GraphqlComponentTest.java
@@ -59,7 +59,7 @@ public class GraphqlComponentTest extends CamelTestSupport {
     }
 
     @AfterAll
-    public static void tearDownAfterClass() throws Exception {
+    public static void tearDownAfterClass() {
         server.shutdown();
     }
 
@@ -81,10 +81,10 @@ public class GraphqlComponentTest 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:start1")
                         .to("graphql://http://localhost:" + server.getPort() + "/graphql?query={books{id name}}")
                         .to("mock:result");
diff --git a/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/server/GraphqlServer.java b/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/server/GraphqlServer.java
index 076511a4ed9..1e56aaa50c9 100644
--- a/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/server/GraphqlServer.java
+++ b/components/camel-graphql/src/test/java/org/apache/camel/component/graphql/server/GraphqlServer.java
@@ -27,7 +27,6 @@ import graphql.ExecutionResult;
 import graphql.GraphQL;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpException;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpResponse;
 import org.apache.http.entity.StringEntity;
@@ -66,7 +65,7 @@ public class GraphqlServer {
         private final ObjectMapper objectMapper = new ObjectMapper();
 
         public void handle(HttpRequest request, HttpResponse response, HttpContext context)
-                throws HttpException, IOException {
+                throws IOException {
             if (request instanceof HttpEntityEnclosingRequest) {
                 HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
                 String json = EntityUtils.toString(entity);