You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/08/02 08:12:17 UTC

[camel] 02/04: CAMEL-13801 - Fixed CS for Camel-Undertow

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6dfd3cfb281bad79f9f19d1f311c468e42864a24
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Aug 2 09:38:37 2019 +0200

    CAMEL-13801 - Fixed CS for Camel-Undertow
---
 .../rest/RestUndertowHttpGetWildcardsTest.java     | 36 +++++++++-------------
 1 file changed, 14 insertions(+), 22 deletions(-)

diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpGetWildcardsTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpGetWildcardsTest.java
index 61857b8..4676ec1 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpGetWildcardsTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/rest/RestUndertowHttpGetWildcardsTest.java
@@ -27,9 +27,9 @@ import org.apache.camel.impl.JndiRegistry;
 import org.junit.Test;
 
 public class RestUndertowHttpGetWildcardsTest extends BaseUndertowTest {
-    
-	@BindToRegistry("mybinding")
-	private UndertowHttpBinding binding = new DefaultUndertowHttpBinding();
+
+    @BindToRegistry("mybinding")
+    private UndertowHttpBinding binding = new DefaultUndertowHttpBinding();
 
     @Test
     public void testProducerGet() throws Exception {
@@ -52,25 +52,17 @@ public class RestUndertowHttpGetWildcardsTest extends BaseUndertowTest {
                 restConfiguration().component("undertow").host("localhost").port(getPort()).endpointProperty("undertowHttpBinding", "#mybinding");
 
                 // use the rest DSL to define the rest services
-                rest("/users/")
-                    .get("{id}/{query}")
-                        .route()
-                        .to("log:query")
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                String id = exchange.getIn().getHeader("id", String.class);
-                                exchange.getOut().setBody(id + ";Goofy");
-                            }
-                        }).endRest()
-                    .get("{id}/basic")
-                        .route()
-                        .to("log:input")
-                        .process(new Processor() {
-                            public void process(Exchange exchange) throws Exception {
-                                String id = exchange.getIn().getHeader("id", String.class);
-                                exchange.getOut().setBody(id + ";Donald Duck");
-                            }
-                        }).endRest();
+                rest("/users/").get("{id}/{query}").route().to("log:query").process(new Processor() {
+                    public void process(Exchange exchange) throws Exception {
+                        String id = exchange.getIn().getHeader("id", String.class);
+                        exchange.getOut().setBody(id + ";Goofy");
+                    }
+                }).endRest().get("{id}/basic").route().to("log:input").process(new Processor() {
+                    public void process(Exchange exchange) throws Exception {
+                        String id = exchange.getIn().getHeader("id", String.class);
+                        exchange.getOut().setBody(id + ";Donald Duck");
+                    }
+                }).endRest();
             }
         };
     }