You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/02/07 17:45:20 UTC

[6/9] camel git commit: Fixed CS. This closes #1449

Fixed CS. This closes #1449


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

Branch: refs/heads/camel-2.18.x
Commit: 927d1d980401f046dc74aea1e978369f3f692f81
Parents: 387c740
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Feb 7 18:37:46 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Feb 7 18:41:45 2017 +0100

----------------------------------------------------------------------
 .../camel/component/mina2/Mina2CustomCodecTest.java     | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/927d1d98/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2CustomCodecTest.java
----------------------------------------------------------------------
diff --git a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2CustomCodecTest.java b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2CustomCodecTest.java
index 195455c..912881e 100644
--- a/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2CustomCodecTest.java
+++ b/components/camel-mina2/src/test/java/org/apache/camel/component/mina2/Mina2CustomCodecTest.java
@@ -56,11 +56,11 @@ public class Mina2CustomCodecTest extends BaseMina2Test {
         try {
             template.requestBody(String.format("mina2:tcp://localhost:%1$s?sync=true&codec=#failingCodec", getPort()), "Hello World");
             fail("Expecting that decode of result fails");
-        } catch (Exception e){
+        } catch (Exception e) {
             assertTrue(e instanceof CamelExecutionException);
             assertNotNull(e.getCause());
             Throwable rootCause = e;
-            while(rootCause.getCause() != null){
+            while (rootCause.getCause() != null) {
                 rootCause = rootCause.getCause();
             }
             assertTrue(rootCause instanceof IllegalArgumentException);
@@ -124,12 +124,11 @@ public class Mina2CustomCodecTest extends BaseMina2Test {
 
         private final boolean failing;
 
-        public MyCodec(boolean failing) {
+        MyCodec(boolean failing) {
             this.failing = failing;
-
         }
 
-        public MyCodec() {
+        MyCodec() {
             this.failing = false;
         }
 
@@ -161,11 +160,10 @@ public class Mina2CustomCodecTest extends BaseMina2Test {
 
                 @Override
                 protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception {
-                    if (failing){
+                    if (failing) {
                         throw new IllegalArgumentException("Something went wrong in decode");
                     }
 
-
                     if (in.remaining() > 0) {
                         byte[] buf = new byte[in.remaining()];
                         in.get(buf);