diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulator.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulator.java index 3e40d0b673af..e3664721420c 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulator.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulator.java @@ -62,7 +62,7 @@ public void copyChunk(ByteBuffer buffer) { // release 0 length buffer directly if (bufferPool != null) - bufferPool.release((ByteBuffer)buffer.clear()); + bufferPool.release(buffer); } } @@ -122,7 +122,7 @@ void recycle() } for (ByteBuffer chunk : chunks) { - bufferPool.release((ByteBuffer)chunk.clear()); + bufferPool.release(chunk); } chunks.clear();