jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: Read/WriteListener throws IOException

From: Rémy Maucherat <rmaucher_at_redhat.com>
Date: Tue, 15 Jan 2013 11:38:40 +0100

On 01/15/2013 01:59 AM, Shing Wai Chan wrote:
> In ReadListener#onDataAvailable, #onAllDataRead and
> WriteListener#onWritePossible,
> it is common to have IO operations.
> With the current API, no exception is in the signature of the above
> methods.
> In this case, developers may need to have a try/catch block inside the
> above methods
> as IOException is probably thrown inside the above methods.
>
> In this case, I suggest to add "throws IOException" in the above four
> methods.
> And I will leave the #onError methods without "throws IOException" in
> this case.
+1

Rémy