Repository: james-project
Updated Branches:
  refs/heads/master 4247d887d -> ea12b94b5


JAMES-2310 explicitly use LineBasedFrameDecoder in 
LineDelimiterBasedChannelHandlerFactory


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

Branch: refs/heads/master
Commit: c668025c1456d29f8445ba98e1db4ccdc989a1a2
Parents: a2b0345
Author: TzeKei Lee <[email protected]>
Authored: Wed Jan 17 17:07:24 2018 +0800
Committer: benwa <[email protected]>
Committed: Fri Jan 19 09:04:31 2018 +0700

----------------------------------------------------------------------
 .../netty/LineDelimiterBasedChannelHandlerFactory.java         | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/c668025c/protocols/netty/src/main/java/org/apache/james/protocols/netty/LineDelimiterBasedChannelHandlerFactory.java
----------------------------------------------------------------------
diff --git 
a/protocols/netty/src/main/java/org/apache/james/protocols/netty/LineDelimiterBasedChannelHandlerFactory.java
 
b/protocols/netty/src/main/java/org/apache/james/protocols/netty/LineDelimiterBasedChannelHandlerFactory.java
index 63e39b5..ca3ead7 100644
--- 
a/protocols/netty/src/main/java/org/apache/james/protocols/netty/LineDelimiterBasedChannelHandlerFactory.java
+++ 
b/protocols/netty/src/main/java/org/apache/james/protocols/netty/LineDelimiterBasedChannelHandlerFactory.java
@@ -20,10 +20,10 @@ package org.apache.james.protocols.netty;
 
 import org.jboss.netty.channel.ChannelHandler;
 import org.jboss.netty.channel.ChannelPipeline;
-import org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder;
-import org.jboss.netty.handler.codec.frame.Delimiters;
+import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
 
 public class LineDelimiterBasedChannelHandlerFactory implements 
ChannelHandlerFactory {
+    private static final Boolean FAIL_FAST = true;
     private final int maxLineLength;
 
     public LineDelimiterBasedChannelHandlerFactory(int maxLineLength) {
@@ -32,7 +32,7 @@ public class LineDelimiterBasedChannelHandlerFactory 
implements ChannelHandlerFa
 
     @Override
     public ChannelHandler create(ChannelPipeline pipeline) {
-        return new DelimiterBasedFrameDecoder(maxLineLength, false, 
Delimiters.lineDelimiter());
+        return new LineBasedFrameDecoder(maxLineLength, false, !FAIL_FAST);
     }
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to