From f6643ccbe7cd678af6a0b40cd4a0584f6808ac46 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 6 Jun 2012 16:49:27 +0200 Subject: [PATCH] jetty-9 WriteFlusher cleanup --- jetty-io/src/main/java/org/eclipse/jetty/io/WriteFlusher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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