From b2657f13769de4e49d8737ae3661f0b2511ba0d6 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 30 Aug 2021 12:45:32 +1000 Subject: [PATCH] fix broken tests: use buffer.remaining() instead of BufferUtil.space() Signed-off-by: Lachlan Roberts --- .../org/eclipse/jetty/io/ByteBufferCallbackAccumulator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferCallbackAccumulator.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferCallbackAccumulator.java index 4c75668e5eb..25ce1f6dd11 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferCallbackAccumulator.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ByteBufferCallbackAccumulator.java @@ -73,7 +73,7 @@ public class ByteBufferCallbackAccumulator public void writeTo(ByteBuffer buffer) { - if (BufferUtil.space(buffer) < _length) + if (buffer.remaining() < _length) throw new IllegalArgumentException("not enough buffer space remaining"); for (Entry entry : _entries)