You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/08/28 01:52:02 UTC

git commit: Fixed the CS error of camel-netty

Updated Branches:
  refs/heads/master e8f78a77d -> d923d80ff


Fixed the CS error of camel-netty


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

Branch: refs/heads/master
Commit: d923d80ff7d3e00182d1d389f0dac4a241f205f8
Parents: e8f78a7
Author: Willem Jiang <ni...@apache.org>
Authored: Wed Aug 28 07:51:17 2013 +0800
Committer: Willem Jiang <ni...@apache.org>
Committed: Wed Aug 28 07:51:17 2013 +0800

----------------------------------------------------------------------
 .../java/org/apache/camel/component/netty/MyCustomCodec.java | 8 ++++++--
 .../apache/camel/component/netty/NettyCustomCodecTest.java   | 6 +++---
 2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d923d80f/components/camel-netty/src/test/java/org/apache/camel/component/netty/MyCustomCodec.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/test/java/org/apache/camel/component/netty/MyCustomCodec.java b/components/camel-netty/src/test/java/org/apache/camel/component/netty/MyCustomCodec.java
index 2c973c6..f4cbeba 100644
--- a/components/camel-netty/src/test/java/org/apache/camel/component/netty/MyCustomCodec.java
+++ b/components/camel-netty/src/test/java/org/apache/camel/component/netty/MyCustomCodec.java
@@ -26,9 +26,13 @@ import org.jboss.netty.handler.codec.oneone.OneToOneEncoder;
 
 import static org.jboss.netty.buffer.ChannelBuffers.copiedBuffer;
 
-public class MyCustomCodec {
-
+public final class MyCustomCodec {
+    
     private static ChannelBuffer nullDelimiter = ChannelBuffers.wrappedBuffer(new byte[]{0});
+    
+    private MyCustomCodec() {
+        // Helper class
+    }
 
     public static ChannelHandlerFactory createMyCustomDecoder() {
         ChannelBuffer[] delimiters = new ChannelBuffer[]{nullDelimiter, nullDelimiter};

http://git-wip-us.apache.org/repos/asf/camel/blob/d923d80f/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomCodecTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomCodecTest.java b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomCodecTest.java
index 30fe250..8f90602 100644
--- a/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomCodecTest.java
+++ b/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyCustomCodecTest.java
@@ -23,11 +23,11 @@ import org.junit.Test;
 
 public class NettyCustomCodecTest extends BaseNettyTest {
 
-    private String uri = "netty:tcp://localhost:{{port}}?disconnect=true&sync=false" +
-            "&allowDefaultCodec=false&decoders=#myCustomDecoder,#myCustomDecoder2&encoder=#myCustomEncoder";
+    private String uri = "netty:tcp://localhost:{{port}}?disconnect=true&sync=false"
+        + "&allowDefaultCodec=false&decoders=#myCustomDecoder,#myCustomDecoder2&encoder=#myCustomEncoder";
 
     // use reaadble bytes
-    private byte[] data = new byte[]{65,66,67,68,69,70,71,72,73,0,0};
+    private byte[] data = new byte[]{65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0};
 
     @Override
     protected JndiRegistry createRegistry() throws Exception {