Preliminary RFR JDK-8159053: Improve onPing/onClose behavior
Simone Bordet
simone.bordet at gmail.com
Wed Jul 13 20:43:08 UTC 2016
Hi,
On Wed, Jul 13, 2016 at 9:27 PM, Pavel Rappo <pavel.rappo at oracle.com> wrote:
> The rationale for IAE is that it's a programming error to stick an illegal value
> in a method (given the fact the value is illegal is known a priori.)
We agree on the programming error, not on how to report it.
Just because it's a programming error, you don't *have* to throw an exception.
Adding twice the same item to a Set could be a programming error, but
it's reported with a boolean.
> (Btw, the same is true for sendText. Although CharSequence(s) there might be
> very long, it's strange to account for apps that might try to send any messages
> after WebSocket has been closed. It's a programming error.)
It's not a programming error.
Imagine a chat application. An admin kicks you out of the chat.
You think you're still in the chat, and try to send a message.
It's not a programming error, it's just the result of events happening
at the same time.
--
Simone Bordet
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
More information about the net-dev
mailing list