8304286: java/net/SocketOption/OptionsTest.java failing after JDK-8302659
Reviewed-by: dfuchs
This commit is contained in:
parent
c039d26603
commit
eda0065107
test/jdk
@ -537,8 +537,6 @@ java/net/MulticastSocket/SetGetNetworkInterfaceTest.java 8219083 windows-
|
||||
|
||||
java/net/ServerSocket/AcceptInheritHandle.java 8211854 aix-ppc64
|
||||
|
||||
java/net/SocketOption/OptionsTest.java 8304286 windows-all
|
||||
|
||||
############################################################################
|
||||
|
||||
# jdk_nio
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2023, 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
|
||||
@ -35,6 +35,8 @@
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.*;
|
||||
import java.util.*;
|
||||
|
||||
import jdk.test.lib.NetworkConfiguration;
|
||||
import jdk.test.lib.net.IPSupport;
|
||||
|
||||
public class OptionsTest {
|
||||
@ -103,13 +105,8 @@ public class OptionsTest {
|
||||
|
||||
static NetworkInterface getNetworkInterface() {
|
||||
try {
|
||||
Enumeration<NetworkInterface> nifs = NetworkInterface.getNetworkInterfaces();
|
||||
while (nifs.hasMoreElements()) {
|
||||
NetworkInterface ni = nifs.nextElement();
|
||||
if (ni.supportsMulticast()) {
|
||||
return ni;
|
||||
}
|
||||
}
|
||||
NetworkConfiguration nc = NetworkConfiguration.probe();
|
||||
return nc.multicastInterfaces(true).findAny().orElse(null);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return null;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2020, 2023, 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
|
||||
@ -22,7 +22,6 @@
|
||||
//
|
||||
|
||||
grant {
|
||||
permission java.net.SocketPermission "localhost:*", "connect, accept, listen, resolve";
|
||||
permission java.util.PropertyPermission "java.net.preferIPv4Stack", "read";
|
||||
permission java.util.PropertyPermission "java.net.preferIPv6Addresses", "read";
|
||||
permission java.net.SocketPermission "*:*", "connect, accept, listen, resolve";
|
||||
permission java.util.PropertyPermission "*", "read";
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user