RFR[8235783]: DatagramSocket::disconnect should allow an implementation to throw UncheckedIOException
Patrick Concannon
patrick.concannon at oracle.com
Tue Dec 17 14:35:49 UTC 2019
Hi,
Could someone please review my fix and CSR for issue JDK-8235783
'DatagramSocket::disconnect should allow an implementation to throw
UncheckedIOException'?
DatagramChannel's connect and disconnect methods throw an IOException
while DatagramSocket's corresponding methods do not. The proposed fix
changes the specification of DatagramSocket::connect and
DatagramSocket::disconnect to document that an implementation may throw
UncheckedIOException.
In addition, and similar to what was done for DatagramChannel, an
@apiNote is added to DatagramSocket::disconnect to recommend closing the
socket if an IO exception occurs, as the underlying socket might have
been left in an inconsistent and unspecified state
bug: https://bugs.openjdk.java.net/browse/JDK-8235783
CSR: https://bugs.openjdk.java.net/browse/JDK-8236076
webrev: http://cr.openjdk.java.net/~pconcannon/8235783/webrevs/webrev.00/
Kind regards,
Patrick
More information about the net-dev
mailing list