mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8225239: Refactor NetworkInterface lookups
Reviewed-by: michaelm, dfuchs, chegar
This commit is contained in:
parent
eb2818421a
commit
7f1f9a50ae
8 changed files with 417 additions and 144 deletions
|
@ -290,7 +290,7 @@ class InetAddress implements java.io.Serializable {
|
|||
}
|
||||
|
||||
/* Used to store the name service provider */
|
||||
private static transient NameService nameService = null;
|
||||
private static transient NameService nameService;
|
||||
|
||||
/**
|
||||
* Used to store the best available hostname.
|
||||
|
@ -305,8 +305,7 @@ class InetAddress implements java.io.Serializable {
|
|||
* Load net library into runtime, and perform initializations.
|
||||
*/
|
||||
static {
|
||||
String str = java.security.AccessController.doPrivileged(
|
||||
new GetPropertyAction("java.net.preferIPv6Addresses"));
|
||||
String str = GetPropertyAction.privilegedGetProperty("java.net.preferIPv6Addresses");
|
||||
if (str == null) {
|
||||
preferIPv6Address = PREFER_IPV4_VALUE;
|
||||
} else if (str.equalsIgnoreCase("true")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue