diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/FrameFlusher.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/FrameFlusher.java index a04d59543e3..401a0732245 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/FrameFlusher.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/FrameFlusher.java @@ -333,11 +333,15 @@ public class FrameFlusher extends IteratingCallback @Override public String toString() { + int aggSize = -1; + ByteBuffer agg = aggregate; + if (agg != null) + aggSize = agg.position(); return String.format("%s@%x[queueSize=%d,aggregateSize=%d,terminated=%s]", getClass().getSimpleName(), hashCode(), getQueueSize(), - aggregate == null ? 0 : aggregate.position(), + aggSize, terminated); }