How about something like this for sendError javadoc....
* <p>If the response has already been committed, this method throws
* an IllegalStateException.
* <p>If setWriteListener has been called on the ServletOutputStream then this method
* will throw an IllegalStateException if a call to isReady would not return true.
* If a call to isReady() would return true, then the WriteListener is discarded
* and the response is returned to blocking mode prior to error handling.
With this text, a call to isReady() returning true prior to calling sendError would not be required, but we would implicitly required that state to exist. If the response never becomes ready, then we can't write anyway, so calling sendError is pointless.
I actually think that we generally need to tighten up the spec for any calls that can write to the response (eg flushBuffer, close etc.) when in async IO mode. They should not be able to be called while isReady is false and should get an ISE("Write Pending") exception.
cheers