From c76451b874dcf22962b09c3d538d978a0ae2c723 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 19 Aug 2008 10:08:20 +0000 Subject: [PATCH] ObjectEncoder should allow zero estimated length as we did in DynamicChannelBuffer --- .../jboss/netty/handler/codec/serialization/ObjectEncoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/netty/handler/codec/serialization/ObjectEncoder.java b/src/main/java/org/jboss/netty/handler/codec/serialization/ObjectEncoder.java index 8e7541ca7e..616a6c49fe 100644 --- a/src/main/java/org/jboss/netty/handler/codec/serialization/ObjectEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/serialization/ObjectEncoder.java @@ -53,7 +53,7 @@ public class ObjectEncoder implements ChannelDownstreamHandler { } public ObjectEncoder(int estimatedLength) { - if (estimatedLength <= 0) { + if (estimatedLength < 0) { throw new IllegalArgumentException( "estimatedLength: " + estimatedLength); }