> On 21 Sep 2018, at 07:02, Chris Yin <xu.y....@oracle.com> wrote:
> 
> Please review below minor change for 8169246, thanks
> 
> The failure log indicate "BindException: Address already in use”, I didn’t 
> see any reason for this test to use a fixed port 4001 that may occupied by 
> others, so propose to just remove fixed port.

Agreed.

> bug: https://bugs.openjdk.java.net/browse/JDK-8169246 
> <https://bugs.openjdk.java.net/browse/JDK-8169246>
> 
> changes:
> 
> diff -r c26fbf1434c4 test/jdk/java/net/DatagramSocket/ReportSocketClosed.java
> --- a/test/jdk/java/net/DatagramSocket/ReportSocketClosed.java        Thu Sep 
> 20 14:19:53 2018 -0700
> +++ b/test/jdk/java/net/DatagramSocket/ReportSocketClosed.java        Fri Sep 
> 21 13:24:31 2018 +0800
> @@ -1,5 +1,5 @@
>  /*
> - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
> + * Copyright (c) 1999, 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
> @@ -37,7 +37,7 @@
>          byte[]  array = {21,22,23};
>  
>          try {
> -            soc = new DatagramSocket(4001);
> +            soc = new DatagramSocket(0);
>              sin = InetAddress.getLocalHost();
>              soc.close();
>          } catch (Exception e) {
> 

Looks good.

-Chris H.


Reply via email to