Removed extra ByteBuffer duplicate
This commit is contained in:
parent
1eeecdaee5
commit
7b6c1af4a7
|
@ -425,11 +425,9 @@ public class HttpOutput extends ServletOutputStream implements Runnable
|
||||||
// write any remaining content in the buffer directly
|
// write any remaining content in the buffer directly
|
||||||
if (len>0)
|
if (len>0)
|
||||||
{
|
{
|
||||||
ByteBuffer wrap = ByteBuffer.wrap(b, off, len);
|
|
||||||
ByteBuffer view = wrap.duplicate();
|
|
||||||
|
|
||||||
// write a buffer capacity at a time to avoid JVM pooling large direct buffers
|
// write a buffer capacity at a time to avoid JVM pooling large direct buffers
|
||||||
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6210541
|
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6210541
|
||||||
|
ByteBuffer view = ByteBuffer.wrap(b, off, len);
|
||||||
while (len>getBufferSize())
|
while (len>getBufferSize())
|
||||||
{
|
{
|
||||||
int p=view.position();
|
int p=view.position();
|
||||||
|
|
Loading…
Reference in New Issue