From ed27ca19ea6f65562f4f13a3030c4714fd88b718 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Tue, 13 Oct 2009 08:46:41 +0000 Subject: [PATCH] Renamed setFromList to setComponents --- .../org/jboss/netty/buffer/CompositeChannelBuffer.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java b/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java index fb600609bc..9798df3752 100644 --- a/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java +++ b/src/main/java/org/jboss/netty/buffer/CompositeChannelBuffer.java @@ -78,7 +78,7 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer { } order = expectedEndianness; - setFromList(newComponents); + setComponents(newComponents); } /** @@ -131,7 +131,7 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer { /** * Setup this ChannelBuffer from the list */ - private void setFromList(List newComponents) { + private void setComponents(List newComponents) { assert !newComponents.isEmpty(); // Clear the cache. @@ -148,6 +148,10 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer { assert c.readerIndex() == 0; assert c.writerIndex() == c.capacity(); + if (c.writerIndex() != c.capacity()) { + System.err.println(c); + throw new Error(); + } components[i] = c; } @@ -689,7 +693,7 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer { // ignore } - setFromList(list); + setComponents(list); // reset marked Indexes localMarkedReaderIndex = Math.max(localMarkedReaderIndex - localReaderIndex, 0);