Removed the slow Class.isArray() call by returning Object[] instead of HttpChunk[]
This commit is contained in:
parent
a979433f91
commit
8debedf6b6
@ -193,7 +193,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
|||||||
reset();
|
reset();
|
||||||
if (!chunk.isLast()) {
|
if (!chunk.isLast()) {
|
||||||
// Append the last chunk.
|
// Append the last chunk.
|
||||||
return new HttpChunk[] { chunk, HttpChunk.LAST_CHUNK };
|
return new Object[] { chunk, HttpChunk.LAST_CHUNK };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chunk;
|
return chunk;
|
||||||
@ -221,7 +221,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
|||||||
reset();
|
reset();
|
||||||
if (!chunk.isLast()) {
|
if (!chunk.isLast()) {
|
||||||
// Append the last chunk.
|
// Append the last chunk.
|
||||||
return new HttpChunk[] { chunk, HttpChunk.LAST_CHUNK };
|
return new Object[] { chunk, HttpChunk.LAST_CHUNK };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return chunk;
|
return chunk;
|
||||||
|
Loading…
Reference in New Issue
Block a user