OpenJDK / jigsaw / jake / jdk
changeset 19431:acd4fd0fd6e8
8177564: Remove check for Windows XP and Server 2003 in java/nio/channels/DatagramChannel/NetworkConfiguration.java
Summary: Remove check for XP and Server 2003 in IPv6 support determination.
Reviewed-by: alanb
author | bpb |
---|---|
date | Fri, 24 Mar 2017 14:46:52 -0700 |
parents | 824789db6bea |
children | 3bffd193a3a5 |
files | test/java/nio/channels/DatagramChannel/NetworkConfiguration.java |
diffstat | 1 files changed, 2 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java Fri Mar 24 16:35:51 2017 +0000 +++ b/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java Fri Mar 24 14:46:52 2017 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -57,22 +57,11 @@ return ip6Interfaces.get(nif); } - // IPv6 not supported for Windows XP/Server 2003 - static boolean isIPv6Supported() { - if (System.getProperty("os.name").startsWith("Windows")) { - String ver = System.getProperty("os.version"); - int major = Integer.parseInt(ver.split("\\.")[0]); - return (major >= 6); - } - return true; - } - static NetworkConfiguration probe() throws IOException { Map<NetworkInterface,List<InetAddress>> ip4Interfaces = new HashMap<NetworkInterface,List<InetAddress>>(); Map<NetworkInterface,List<InetAddress>> ip6Interfaces = new HashMap<NetworkInterface,List<InetAddress>>(); - boolean isIPv6Supported = isIPv6Supported(); // find the interfaces that support IPv4 and IPv6 List<NetworkInterface> nifs = Collections @@ -92,7 +81,7 @@ } list.add(addr); ip4Interfaces.put(nif, list); - } else if (isIPv6Supported && (addr instanceof Inet6Address)) { + } else if (addr instanceof Inet6Address) { List<InetAddress> list = ip6Interfaces.get(nif); if (list == null) { list = new LinkedList<InetAddress>();