Removed the slow Class.isArray() call by returning Object[] instead of HttpChunk[]

This commit is contained in:
Trustin Lee 2009-06-15 06:33:30 +00:00
parent a979433f91
commit 8debedf6b6

View File

@ -193,7 +193,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
reset();
if (!chunk.isLast()) {
// Append the last chunk.
return new HttpChunk[] { chunk, HttpChunk.LAST_CHUNK };
return new Object[] { chunk, HttpChunk.LAST_CHUNK };
}
}
return chunk;
@ -221,7 +221,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
reset();
if (!chunk.isLast()) {
// Append the last chunk.
return new HttpChunk[] { chunk, HttpChunk.LAST_CHUNK };
return new Object[] { chunk, HttpChunk.LAST_CHUNK };
}
}
return chunk;