10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8047031
27 * @summary SocketPermission tests for legacy socket types
28 * @library ../../../lib/testlibrary
29 * @run testng/othervm/policy=policy SocketPermissionTest
30 */
31 import java.io.IOException;
32 import java.net.DatagramPacket;
33 import java.net.DatagramSocket;
34 import java.net.InetAddress;
35 import java.net.MulticastSocket;
36 import java.net.ServerSocket;
37 import java.net.Socket;
38 import java.net.SocketPermission;
39 import java.security.AccessControlContext;
40 import java.security.AccessController;
41 import java.security.Permission;
42 import java.security.Permissions;
43 import java.security.PrivilegedAction;
44 import java.security.ProtectionDomain;
45 import java.util.Arrays;
46 import java.util.function.Function;
47 import java.util.function.IntConsumer;
48 import static jdk.testlibrary.Utils.getFreePort;
49 import org.testng.annotations.BeforeMethod;
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8047031
27 * @summary SocketPermission tests for legacy socket types
28 * @library ../../../lib/testlibrary
29 * @run testng/othervm/policy=policy SocketPermissionTest
30 * @key intermittent
31 */
32 import java.io.IOException;
33 import java.net.DatagramPacket;
34 import java.net.DatagramSocket;
35 import java.net.InetAddress;
36 import java.net.MulticastSocket;
37 import java.net.ServerSocket;
38 import java.net.Socket;
39 import java.net.SocketPermission;
40 import java.security.AccessControlContext;
41 import java.security.AccessController;
42 import java.security.Permission;
43 import java.security.Permissions;
44 import java.security.PrivilegedAction;
45 import java.security.ProtectionDomain;
46 import java.util.Arrays;
47 import java.util.function.Function;
48 import java.util.function.IntConsumer;
49 import static jdk.testlibrary.Utils.getFreePort;
50 import org.testng.annotations.BeforeMethod;
|