Removed extra ByteBuffer duplicate

This commit is contained in:
Greg Wilkins 2016-02-24 13:47:35 +01:00
parent 1eeecdaee5
commit 7b6c1af4a7
1 changed files with 1 additions and 3 deletions

View File

@ -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();