8198753: (dc) DatagramChannel throws unspecified exceptions

Brian Burkhalter brian.burkhalter at oracle.com
Thu Mar 22 17:19:42 UTC 2018


On Mar 21, 2018, at 2:06 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 21/03/2018 19:21, Brian Burkhalter wrote:
>> Updated tests to use expectedExceptions = ….
>> 
>> http://cr.openjdk.java.net/~bpb/8198753/webrev.03/ <http://cr.openjdk.java.net/%7Ebpb/8198753/webrev.03/>
>> 
> This is much neater, thumbs up from me.

I caught a failure in Connect.java due to the IAE to ACE change. Webrev.03 is updated in place; the diff versus the previous version of the webrev is included below.

Brian

22 10:14:22.000000000 -0700
> +++ new/test/jdk/java/nio/channels/DatagramChannel/Connect.java	2018-03-22 10:14:22.000000000 -0700
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
>   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
>   *
>   * This code is free software; you can redistribute it and/or modify it
> @@ -102,7 +102,7 @@
>                  try {
>                      dc.send(bb, bogus);
>                      throw new RuntimeException("Allowed bogus send while connected");
> -                } catch (IllegalArgumentException iae) {
> +                } catch (AlreadyConnectedException ace) {
>                      // Correct behavior
>                  }

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


More information about the nio-dev mailing list