diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java index 71dc4d0ea42..d61c33a06de 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpOutput.java @@ -425,11 +425,9 @@ public class HttpOutput extends ServletOutputStream implements Runnable // write any remaining content in the buffer directly 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 // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6210541 + ByteBuffer view = ByteBuffer.wrap(b, off, len); while (len>getBufferSize()) { int p=view.position();