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:23 UTC
[9/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/7bfed828
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7bfed828
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7bfed828
Branch: refs/heads/camel-2.17.x
Commit: 7bfed82853f7b80272a770586883ef6b260cce5b
Parents: e6d82ea
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:42:21 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/7bfed828/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);