diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java b/jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java index 8cb6084f416..c8a0a2cb03e 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java @@ -36,8 +36,10 @@ abstract public class WriteFlusher } /* ------------------------------------------------------------ */ - public void write(Object context, Callback callback, ByteBuffer... buffers) + public void write(C context, Callback callback, ByteBuffer... buffers) { + if (callback==null) + throw new IllegalArgumentException(); if (!_writing.compareAndSet(false,true)) throw new WritePendingException(); try