8198753: (dc) DatagramChannel throws unspecified exceptions

Brian Burkhalter brian.burkhalter at oracle.com
Mon Mar 19 20:18:44 UTC 2018


On Mar 19, 2018, at 10:01 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 19/03/2018 15:07, Brian Burkhalter wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8198753
>> http://cr.openjdk.java.net/~bpb/8198753/webrev.00/
>> 
>> Change an undocumented IllegalArgumentException to AlreadyConnectedException and document some other undocumented exceptions.
>> 
>> CSR to follow.
>> 
> This looks good. Can you check that we have test coverage for this? I suspect we might need to add a few tests for these cases.


I noticed that send() also needs to declare that it throws UnresolvedAddressException and UnsupportedAddressTypeException.

java/nio/channels/DatagramChannel/SendToUnresolved.java already tests for the UnresolvedAddressException of send(). The other exceptions do not have test coverage. I modified ConnectedSend to test for these and to use TestNG:

http://cr.openjdk.java.net/~bpb/8198753/webrev.01/

Perhaps I should pull the single test done in SendToUnresolved into ConnectedSend (with bug ID) and remove SendToUnresolved altogether?

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180319/40288ff2/attachment.html>


More information about the nio-dev mailing list