diff --git a/jdk/test/java/net/Inet6Address/B6206527.java b/jdk/test/java/net/Inet6Address/B6206527.java index 4fc90e170c0..9ce617b3437 100644 --- a/jdk/test/java/net/Inet6Address/B6206527.java +++ b/jdk/test/java/net/Inet6Address/B6206527.java @@ -25,14 +25,13 @@ * @test 1.1 05/01/05 * @bug 6206527 * @summary "cannot assign address" when binding ServerSocket on Suse 9 - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main B6206527 */ import java.net.*; import java.util.*; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; public class B6206527 { diff --git a/jdk/test/java/net/Inet6Address/B6558853.java b/jdk/test/java/net/Inet6Address/B6558853.java index 3c546c2f02c..408c30de64a 100644 --- a/jdk/test/java/net/Inet6Address/B6558853.java +++ b/jdk/test/java/net/Inet6Address/B6558853.java @@ -25,8 +25,7 @@ * @test * @bug 6558853 * @summary getHostAddress() on connections using IPv6 link-local addrs should have zone id - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main B6558853 */ @@ -35,7 +34,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.*; import java.util.Optional; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; public class B6558853 implements Runnable { private InetAddress addr = null; diff --git a/jdk/test/java/net/InetAddress/CheckJNI.java b/jdk/test/java/net/InetAddress/CheckJNI.java index 89f00a9c1a7..76ac633e921 100644 --- a/jdk/test/java/net/InetAddress/CheckJNI.java +++ b/jdk/test/java/net/InetAddress/CheckJNI.java @@ -22,17 +22,16 @@ */ /* @test - @bug 4889870 4890033 - @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure - @library /lib/testlibrary - @build jdk.testlibrary.NetworkConfiguration - @run main/othervm -Xcheck:jni CheckJNI -*/ + * @bug 4889870 4890033 + * @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure + * @library /test/lib + * @run main/othervm -Xcheck:jni CheckJNI + */ import java.net.*; import java.util.*; import java.util.stream.Collectors; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; public class CheckJNI { static Socket s; diff --git a/jdk/test/java/net/MulticastSocket/JoinLeave.java b/jdk/test/java/net/MulticastSocket/JoinLeave.java index 93dd93930b6..2e59a08444e 100644 --- a/jdk/test/java/net/MulticastSocket/JoinLeave.java +++ b/jdk/test/java/net/MulticastSocket/JoinLeave.java @@ -25,8 +25,7 @@ * @test * @bug 4091811 4148753 4102731 * @summary Test java.net.MulticastSocket joinGroup and leaveGroup - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main JoinLeave */ @@ -35,7 +34,7 @@ import java.io.UncheckedIOException; import java.net.InetAddress; import java.net.MulticastSocket; import java.net.NetworkInterface; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; public class JoinLeave { diff --git a/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java b/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java index c5c26e29be6..03bb39b48de 100644 --- a/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java +++ b/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java @@ -25,14 +25,14 @@ * @test * @bug 4686717 * @summary Test MulticastSocket.setLoopbackMode - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main/othervm SetLoopbackMode */ + import java.net.*; import java.io.IOException; import java.util.Enumeration; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; public class SetLoopbackMode { diff --git a/jdk/test/java/net/NetworkConfigurationProbe.java b/jdk/test/java/net/NetworkConfigurationProbe.java index 8b8127a55e2..607671b8045 100644 --- a/jdk/test/java/net/NetworkConfigurationProbe.java +++ b/jdk/test/java/net/NetworkConfigurationProbe.java @@ -24,15 +24,14 @@ /** * @test * @summary NOT A TEST. Captures the network interface configuration. - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main NetworkConfigurationProbe */ import java.net.Inet4Address; import java.net.Inet6Address; import java.net.NetworkInterface; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; import static java.util.stream.Collectors.joining; import static java.lang.System.out; diff --git a/jdk/test/java/net/Socket/LinkLocal.java b/jdk/test/java/net/Socket/LinkLocal.java index e62522cb581..9957c5c44f0 100644 --- a/jdk/test/java/net/Socket/LinkLocal.java +++ b/jdk/test/java/net/Socket/LinkLocal.java @@ -26,11 +26,11 @@ * @bug 4469866 * @summary Connecting to a link-local IPv6 address should not * causes a SocketException to be thrown. - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main LinkLocal */ -import jdk.testlibrary.NetworkConfiguration; + +import jdk.test.lib.NetworkConfiguration; import java.net.*; import java.util.List; diff --git a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java index e67802afc33..360fd2c8c62 100644 --- a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java +++ b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java @@ -25,8 +25,7 @@ * @test * @bug 8047031 * @summary SocketPermission tests for legacy socket types - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run testng/othervm SocketPermissionTest */ @@ -55,7 +54,7 @@ import org.testng.annotations.Test; import static org.testng.Assert.*; -import static jdk.testlibrary.NetworkConfiguration.probe; +import static jdk.test.lib.NetworkConfiguration.probe; import static java.nio.charset.StandardCharsets.UTF_8; public class SocketPermissionTest { diff --git a/jdk/test/java/net/ipv6tests/B6521014.java b/jdk/test/java/net/ipv6tests/B6521014.java index 5efa77d9663..a622bb1a69d 100644 --- a/jdk/test/java/net/ipv6tests/B6521014.java +++ b/jdk/test/java/net/ipv6tests/B6521014.java @@ -25,15 +25,14 @@ * @test * @bug 6521014 6543428 * @summary IOException thrown when Socket tries to bind to an local IPv6 address on SuSE Linux - * @library /lib/testlibrary - * @build jdk.testlibrary.NetworkConfiguration + * @library /test/lib * @run main B6521014 */ import java.net.*; import java.io.*; import java.util.*; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; /* * diff --git a/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java b/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java index c60b6b7cd94..4ce1b41f701 100644 --- a/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java +++ b/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java @@ -24,7 +24,8 @@ /* @test * @bug 4527345 * @summary Unit test for DatagramChannel's multicast support - * @build BasicMulticastTests NetworkConfiguration + * @library /test/lib + * @build BasicMulticastTests * @run main BasicMulticastTests */ @@ -34,6 +35,8 @@ import java.net.*; import java.util.*; import java.io.IOException; +import jdk.test.lib.NetworkConfiguration; + public class BasicMulticastTests { /** @@ -204,14 +207,14 @@ public class BasicMulticastTests { NetworkConfiguration config = NetworkConfiguration.probe(); - NetworkInterface nif = config.ip4Interfaces().iterator().next(); + NetworkInterface nif = config.ip4MulticastInterfaces().iterator().next(); InetAddress anySource = config.ip4Addresses(nif).iterator().next(); membershipKeyTests(nif, ip4Group, anySource); exceptionTests(nif); // re-run the membership key tests with IPv6 if available - Iterator iter = config.ip6Interfaces().iterator(); + Iterator iter = config.ip6MulticastInterfaces().iterator(); if (iter.hasNext()) { nif = iter.next(); anySource = config.ip6Addresses(nif).iterator().next(); diff --git a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java index db061a833fc..591e3945e98 100644 --- a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java +++ b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java @@ -24,7 +24,8 @@ /* @test * @bug 4527345 7026376 6633549 * @summary Unit test for DatagramChannel's multicast support - * @build MulticastSendReceiveTests NetworkConfiguration + * @library /test/lib + * @build MulticastSendReceiveTests * @run main MulticastSendReceiveTests * @run main/othervm -Djava.net.preferIPv4Stack=true MulticastSendReceiveTests * @key randomness @@ -36,6 +37,9 @@ import java.net.*; import static java.net.StandardProtocolFamily.*; import java.util.*; import java.io.IOException; +import java.util.stream.Collectors; + +import jdk.test.lib.NetworkConfiguration; public class MulticastSendReceiveTests { @@ -238,14 +242,15 @@ public class MulticastSendReceiveTests { // multicast groups used for the test InetAddress ip4Group = InetAddress.getByName("225.4.5.6"); InetAddress ip6Group = InetAddress.getByName("ff02::a"); - - for (NetworkInterface nif: config.ip4Interfaces()) { + for (NetworkInterface nif: config.ip4MulticastInterfaces() + .collect(Collectors.toList())) { InetAddress source = config.ip4Addresses(nif).iterator().next(); test(INET, nif, ip4Group, source); test(UNSPEC, nif, ip4Group, source); } - for (NetworkInterface nif: config.ip6Interfaces()) { + for (NetworkInterface nif: config.ip6MulticastInterfaces() + .collect(Collectors.toList())) { InetAddress source = config.ip6Addresses(nif).iterator().next(); test(INET6, nif, ip6Group, source); test(UNSPEC, nif, ip6Group, source); diff --git a/jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java b/jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java deleted file mode 100644 index f2d2567bb2a..00000000000 --- a/jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2007, 2017, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -import java.net.*; -import java.util.*; -import java.io.IOException; - -/** - * Helper class for multicasting tests. - */ - -class NetworkConfiguration { - - private Map> ip4Interfaces; - private Map> ip6Interfaces; - - private NetworkConfiguration(Map> ip4Interfaces, - Map> ip6Interfaces) - { - this.ip4Interfaces = ip4Interfaces; - this.ip6Interfaces = ip6Interfaces; - } - - Iterable ip4Interfaces() { - return ip4Interfaces.keySet(); - } - - Iterable ip6Interfaces() { - return ip6Interfaces.keySet(); - } - - Iterable ip4Addresses(NetworkInterface nif) { - return ip4Interfaces.get(nif); - } - - Iterable ip6Addresses(NetworkInterface nif) { - return ip6Interfaces.get(nif); - } - - private static final boolean isMacOs = - System.getProperty("os.name").equals("Mac OS X"); - - static NetworkConfiguration probe() throws IOException { - Map> ip4Interfaces = - new HashMap>(); - Map> ip6Interfaces = - new HashMap>(); - - // find the interfaces that support IPv4 and IPv6 - List nifs = Collections - .list(NetworkInterface.getNetworkInterfaces()); - for (NetworkInterface nif: nifs) { - // ignore intertaces that are down or don't support multicast - if (!nif.isUp() || !nif.supportsMulticast() || nif.isLoopback() - || (isMacOs && nif.getName().contains("awdl"))) - continue; - - List addrs = Collections.list(nif.getInetAddresses()); - for (InetAddress addr: addrs) { - if (!addr.isAnyLocalAddress()) { - if (addr instanceof Inet4Address) { - List list = ip4Interfaces.get(nif); - if (list == null) { - list = new LinkedList(); - } - list.add(addr); - ip4Interfaces.put(nif, list); - } else if (addr instanceof Inet6Address) { - List list = ip6Interfaces.get(nif); - if (list == null) { - list = new LinkedList(); - } - list.add(addr); - ip6Interfaces.put(nif, list); - } - } - } - } - return new NetworkConfiguration(ip4Interfaces, ip6Interfaces); - } -} diff --git a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java index 21c8c18440f..d79a641002c 100644 --- a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java +++ b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java @@ -25,7 +25,8 @@ * @bug 8014377 * @summary Test for interference when two sockets are bound to the same * port but joined to different multicast groups - * @build Promiscuous NetworkConfiguration + * @library /test/lib + * @build Promiscuous * @run main Promiscuous * @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous * @key randomness @@ -37,6 +38,9 @@ import java.net.*; import static java.net.StandardProtocolFamily.*; import java.util.*; import java.io.IOException; +import java.util.stream.Collectors; + +import jdk.test.lib.NetworkConfiguration; public class Promiscuous { @@ -208,7 +212,8 @@ public class Promiscuous { InetAddress ip4Group1 = InetAddress.getByName("225.4.5.6"); InetAddress ip4Group2 = InetAddress.getByName("225.4.6.6"); - for (NetworkInterface nif: config.ip4Interfaces()) { + for (NetworkInterface nif: config.ip4MulticastInterfaces() + .collect(Collectors.toList())) { InetAddress source = config.ip4Addresses(nif).iterator().next(); test(INET, nif, ip4Group1, ip4Group2); diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/NetworkConfiguration.java b/jdk/test/lib/testlibrary/jdk/testlibrary/NetworkConfiguration.java deleted file mode 100644 index 77544d2bd92..00000000000 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/NetworkConfiguration.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright (c) 2017, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package jdk.testlibrary; - -import java.io.PrintStream; -import java.io.UncheckedIOException; -import java.io.IOException; -import java.net.Inet4Address; -import java.net.Inet6Address; -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.function.Predicate; -import java.util.stream.Stream; -import static java.net.NetworkInterface.getNetworkInterfaces; -import static java.util.Collections.list; - -/** - * Helper class for retrieving network interfaces and local addresses - * suitable for testing. - */ -public class NetworkConfiguration { - - static final boolean isWindows = - System.getProperty("os.name").startsWith("Windows"); - static final boolean isMacOS = - System.getProperty("os.name").contains("OS X"); - - private Map> ip4Interfaces; - private Map> ip6Interfaces; - - private NetworkConfiguration(Map> ip4Interfaces, - Map> ip6Interfaces) - { - this.ip4Interfaces = ip4Interfaces; - this.ip6Interfaces = ip6Interfaces; - } - - /** - * Returns a stream of interfaces suitable for functional tests. - */ - public Stream interfaces() { - return Stream.concat(ip4Interfaces(), ip6Interfaces()) - .distinct(); - } - - /** - * Returns a stream of interfaces suitable for IPv4 functional tests. - */ - public Stream ip4Interfaces() { - return ip4Interfaces.keySet().stream() - .filter(NetworkConfiguration::isNotExcludedInterface) - .filter(hasIp4Addresses); - } - - /** - * Returns a stream of interfaces suitable for IPv6 functional tests. - */ - public Stream ip6Interfaces() { - return ip6Interfaces.keySet().stream() - .filter(NetworkConfiguration::isNotExcludedInterface) - .filter(hasIp6Addresses); - } - - private static boolean isNotExcludedInterface(NetworkInterface nif) { - if (isMacOS && nif.getName().contains("awdl")) - return false; - String dName = nif.getDisplayName(); - if (isWindows && dName != null && dName.contains("Teredo")) - return false; - return true; - } - - private final Predicate hasIp4Addresses = nif -> { - Optional addr = ip4Interfaces.get(nif).stream() - .filter(a -> !a.isAnyLocalAddress()) - .findAny(); - - return addr.isPresent(); - }; - - private final Predicate hasIp6Addresses = nif -> { - Optional addr = ip6Interfaces.get(nif).stream() - .filter(a -> !a.isAnyLocalAddress()) - .findAny(); - - return addr.isPresent(); - }; - - - /** - * Returns a stream of interfaces suitable for IPv4 multicast tests. - */ - public Stream ip4MulticastInterfaces() { - return ip4Interfaces().filter(supportsIp4Multicast); - } - - /** - * Returns a stream of interfaces suitable for IPv6 multicast tests. - */ - public Stream ip6MulticastInterfaces() { - return ip6Interfaces().filter(supportsIp6Multicast); - } - - private final Predicate supportsIp4Multicast = nif -> { - try { - if (!nif.supportsMulticast() || nif.isLoopback()) - return false; - - Optional addr = ip4Interfaces.get(nif).stream() - .filter(a -> !a.isAnyLocalAddress()) - .findAny(); - - return addr.isPresent(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - }; - - private final Predicate supportsIp6Multicast = nif -> { - try { - if (!nif.supportsMulticast() || nif.isLoopback()) - return false; - - Optional addr = ip6Interfaces.get(nif).stream() - .filter(a -> !a.isAnyLocalAddress()) - .findAny(); - - return addr.isPresent(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - }; - - /** - * Returns all addresses on all "functional" interfaces. - */ - public Stream addresses(NetworkInterface nif) { - return Stream.concat(ip4Interfaces.get(nif).stream(), - ip6Interfaces.get(nif).stream()); - } - - /** - * Returns all IPv4 addresses on all "functional" interfaces. - */ - public Stream ip4Addresses() { - return ip4Interfaces().flatMap(nif -> ip4Addresses(nif)); - } - - /** - * Returns all IPv6 addresses on all "functional" interfaces. - */ - public Stream ip6Addresses() { - return ip6Interfaces().flatMap(nif -> ip6Addresses(nif)); - } - - /** - * Returns all IPv4 addresses the given interface. - */ - public Stream ip4Addresses(NetworkInterface nif) { - return ip4Interfaces.get(nif).stream(); - } - - /** - * Returns all IPv6 addresses for the given interface. - */ - public Stream ip6Addresses(NetworkInterface nif) { - return ip6Interfaces.get(nif).stream(); - } - - /** - * Return a NetworkConfiguration instance. - */ - public static NetworkConfiguration probe() throws IOException { - Map> ip4Interfaces = new HashMap<>(); - Map> ip6Interfaces = new HashMap<>(); - - List nifs = list(getNetworkInterfaces()); - for (NetworkInterface nif : nifs) { - // ignore interfaces that are down - if (!nif.isUp() || nif.isPointToPoint()) - continue; - - List ip4Addresses = new LinkedList<>(); - List ip6Addresses = new LinkedList<>(); - ip4Interfaces.put(nif, ip4Addresses); - ip6Interfaces.put(nif, ip6Addresses); - for (InetAddress addr : list(nif.getInetAddresses())) { - if (addr instanceof Inet4Address) - ip4Addresses.add((Inet4Address)addr); - else if (addr instanceof Inet6Address) - ip6Addresses.add((Inet6Address)addr); - } - } - return new NetworkConfiguration(ip4Interfaces, ip6Interfaces); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - interfaces().forEach(nif -> sb.append(interfaceInformation(nif))); - return sb.toString(); - } - - /** Returns detailed information for the given interface. */ - public static String interfaceInformation(NetworkInterface nif) { - StringBuilder sb = new StringBuilder(); - try { - sb.append("Display name: " + nif.getDisplayName() + "\n"); - sb.append("Name: " + nif.getName() + "\n"); - for (InetAddress inetAddress : list(nif.getInetAddresses())) - sb.append("InetAddress: " + inetAddress + "\n"); - sb.append("Up? " + nif.isUp() + "\n"); - sb.append("Loopback? " + nif.isLoopback() + "\n"); - sb.append("PointToPoint? " + nif.isPointToPoint() + "\n"); - sb.append("Supports multicast? " + nif.supportsMulticast() + "\n"); - sb.append("Virtual? " + nif.isVirtual() + "\n"); - sb.append("Hardware address: " + - Arrays.toString(nif.getHardwareAddress()) + "\n"); - sb.append("MTU: " + nif.getMTU() + "\n"); - sb.append("Index: " + nif.getIndex() + "\n"); - sb.append("\n"); - return sb.toString(); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - /** Prints all the system interface information to the give stream. */ - public static void printSystemConfiguration(PrintStream out) { - try { - out.println("*** all system network interface configuration ***"); - List nifs = list(getNetworkInterfaces()); - for (NetworkInterface nif : nifs) - out.print(interfaceInformation(nif)); - out.println("*** end ***"); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } -} diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java index fbdad8c8953..be761a789a7 100644 --- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java +++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java @@ -31,9 +31,9 @@ * @bug 6216082 * @summary Redirect problem with HttpsURLConnection using a proxy * @modules java.base/sun.net.www - * @library .. /lib/testlibrary + * @library .. /test/lib * @build HttpCallback TestHttpsServer ClosedChannelList - * HttpTransaction TunnelProxy jdk.testlibrary.NetworkConfiguration + * HttpTransaction TunnelProxy * @key intermittent * @run main/othervm B6216082 */ @@ -43,7 +43,7 @@ import java.net.*; import javax.net.ssl.*; import java.util.*; -import jdk.testlibrary.NetworkConfiguration; +import jdk.test.lib.NetworkConfiguration; public class B6216082 { static SimpleHttpTransaction httpTrans;