Fix test failures

This commit is contained in:
Trustin Lee 2013-06-28 21:14:23 +09:00
parent 1e0146da3e
commit d4665f1703

View File

@ -267,13 +267,14 @@ public final class MessageList<T> implements Iterable<T> {
int i = srcIdx;
try {
if (byteBufsOnly) {
for (; i < srcEndIdx; i ++) {
while (i < srcEndIdx) {
T m = src[srcIdx];
if (m == null) {
throw new NullPointerException("src[" + srcIdx + ']');
}
elements[dstIdx ++] = m;
i ++;
if (!(m instanceof ByteBuf)) {
byteBufsOnly = false;
@ -297,7 +298,7 @@ public final class MessageList<T> implements Iterable<T> {
}
}
assert dstIdx == newSize;
assert dstIdx == newSize : String.format("dstIdx(%d) != newSize(%d)", dstIdx, newSize);
size = newSize;
return this;