d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich/*
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens Elkner * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d5fe06af711a6912ae028ebf873eada4ee8733f8Christian Maeder *
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu * This code is free software; you can redistribute it and/or modify it
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * under the terms of the GNU General Public License version 2 only, as
34bff097c14521b5e57ce37279a34256e1f78aa5Klaus Luettich * published by the Free Software Foundation.
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich *
9753523d7bfe7c9413207e8f0c7548bd3dc15322Christian Maeder * This code is distributed in the hope that it will be useful, but WITHOUT
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d543cf2bb0c810781625c76fe135476d46270d88Till Mossakowski * version 2 for more details (a copy is included in the LICENSE file that
9753523d7bfe7c9413207e8f0c7548bd3dc15322Christian Maeder * accompanied this code).
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich *
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * You should have received a copy of the GNU General Public License version
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * 2 along with this work; if not, write to the Free Software Foundation,
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich *
72204f862232e7e51b0207bba020c1d781fa7798Christian Maeder * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder * or visit www.oracle.com if you need additional information or have any
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder * questions.
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich */
8b66de47c89e252c907c8ed3a5ccd16dbccbfb3eChristian Maeder
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich/*
e51568cd733ccb83a799f48f0802095e3f3a8d62Christian Maeder * @test
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * @bug 4391898
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich * @summary SocketPermission(":",...) throws ArrayIndexOutOfBoundsException
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich */
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich
87ab788adadc73fd49e3c762caee6a88f844a5bcChristian Maederimport java.net.*;
87ab788adadc73fd49e3c762caee6a88f844a5bcChristian Maeder
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettichpublic class Ctor {
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich public static void main(String[] args) {
87ab788adadc73fd49e3c762caee6a88f844a5bcChristian Maeder try {
87ab788adadc73fd49e3c762caee6a88f844a5bcChristian Maeder SocketPermission sp = new java.net.SocketPermission(":", "connect");
0a943b3aa43eff8a8d5f42da56fa895e13c7040cKlaus Luettich } catch (java.lang.ArrayIndexOutOfBoundsException e) {
0a943b3aa43eff8a8d5f42da56fa895e13c7040cKlaus Luettich throw new RuntimeException(e);
0a943b3aa43eff8a8d5f42da56fa895e13c7040cKlaus Luettich }
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich System.out.println("Test passed!!!");
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich }
d9abda6d63cc31c8a81d9c84275c9bd4c8ae8f57Klaus Luettich}
87ab788adadc73fd49e3c762caee6a88f844a5bcChristian Maeder