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 2017/02/23 09:03:46 UTC

[10/10] camel git commit: CAMEL-10883: apply Camel checkstyle

CAMEL-10883: apply Camel checkstyle


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4ab39fc3
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4ab39fc3
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4ab39fc3

Branch: refs/heads/master
Commit: 4ab39fc3b54612e22fc14b3631b28d6e80d2d804
Parents: e997947
Author: rohan <ro...@fronde.com>
Authored: Wed Feb 22 09:24:14 2017 +1300
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Feb 23 10:00:26 2017 +0100

----------------------------------------------------------------------
 .../DefaultUndertowHttpBindingTest.java         | 48 +++++++++++++-------
 1 file changed, 32 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4ab39fc3/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/DefaultUndertowHttpBindingTest.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/DefaultUndertowHttpBindingTest.java b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/DefaultUndertowHttpBindingTest.java
index 4a4884b..ce3c65f 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/DefaultUndertowHttpBindingTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/DefaultUndertowHttpBindingTest.java
@@ -1,10 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.component.undertow;
 
-import org.junit.Test;
-import org.xnio.XnioIoThread;
-import org.xnio.channels.EmptyStreamSourceChannel;
-import org.xnio.channels.StreamSourceChannel;
-
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.util.concurrent.ExecutorService;
@@ -13,6 +24,11 @@ import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import org.junit.Test;
+import org.xnio.XnioIoThread;
+import org.xnio.channels.EmptyStreamSourceChannel;
+import org.xnio.channels.StreamSourceChannel;
+
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
@@ -22,8 +38,8 @@ public class DefaultUndertowHttpBindingTest {
     @Test(timeout = 1000)
     public void readEntireDelayedPayload() throws Exception {
         String[] delayedPayloads = new String[] {
-                "",
-                "chunk",
+            "",
+            "chunk",
         };
 
         StreamSourceChannel source = source(delayedPayloads);
@@ -37,9 +53,9 @@ public class DefaultUndertowHttpBindingTest {
     @Test(timeout = 1000)
     public void readEntireMultiDelayedPayload() throws Exception {
         String[] delayedPayloads = new String[] {
-                "",
-                "first ",
-                "second",
+            "",
+            "first ",
+            "second",
         };
 
         StreamSourceChannel source = source(delayedPayloads);
@@ -59,10 +75,10 @@ public class DefaultUndertowHttpBindingTest {
     @Test(timeout = 1000)
     public void readEntireMultiDelayedWithPausePayload() throws Exception {
         String[] delayedPayloads = new String[] {
-                "",
-                "first ",
-                "",
-                "second",
+            "",
+            "first ",
+            "",
+            "second",
         };
 
         StreamSourceChannel source = source(delayedPayloads);
@@ -77,8 +93,8 @@ public class DefaultUndertowHttpBindingTest {
         Thread sourceThread = Thread.currentThread();
 
         return new EmptyStreamSourceChannel(thread()) {
-            int chunk = 0;
-            boolean mustWait = false;  // make sure that the caller is not spinning on read==0
+            int chunk;
+            boolean mustWait;  // make sure that the caller is not spinning on read==0
 
             @Override
             public int read(ByteBuffer dst) throws IOException {