--- a/test/jdk/java/net/Socket/LinkLocal.java Wed Jul 10 16:45:28 2019 +0000
+++ b/test/jdk/java/net/Socket/LinkLocal.java Wed Jul 10 22:33:23 2019 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, 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
@@ -55,7 +55,8 @@
* Create ServerSocket on wildcard address and then
* try to connect Socket to link-local address.
*/
- ServerSocket ss = new ServerSocket(0);
+ ServerSocket ss = new ServerSocket();
+ ss.bind(new InetSocketAddress(ia, 0));
Socket s = new Socket();
try {
@@ -87,7 +88,7 @@
}
DatagramSocket ds1 = new DatagramSocket();
- DatagramSocket ds2 = new DatagramSocket();
+ DatagramSocket ds2 = new DatagramSocket(0, ia);
try {
byte b[] = "Hello".getBytes();