test/jdk/java/net/DatagramSocket/ReportSocketClosed.java
changeset 51831 ec03768578c2
parent 47216 71c04702a3d5
--- a/test/jdk/java/net/DatagramSocket/ReportSocketClosed.java	Fri Sep 21 15:49:59 2018 +0800
+++ b/test/jdk/java/net/DatagramSocket/ReportSocketClosed.java	Fri Sep 21 16:13:49 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) {