Test4080522.java revision 2362
4545N/A * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved. 4545N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4545N/A * This code is free software; you can redistribute it and/or modify it 4545N/A * under the terms of the GNU General Public License version 2 only, as 4545N/A * published by the Free Software Foundation. 4545N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4545N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4545N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4545N/A * version 2 for more details (a copy is included in the LICENSE file that 4545N/A * You should have received a copy of the GNU General Public License version 4545N/A * 2 along with this work; if not, write to the Free Software Foundation, 4545N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4545N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4545N/A * or visit www.oracle.com if you need additional information or have any 4545N/A * @summary Tests security checks for calls on: 4545N/A * Introspector.setBeanInfoSearchPath 4545N/A * PropertyEditorManager.setEditorSearchPath 4545N/A // with no security manager we shuld be able to do these calls OK 4545N/A // add our own security manager 4545N/A // now each of the calls should raise an exception 4545N/A throw new Error(
"Beans.setDesignTime should throw SecurityException");
4545N/A throw new Error(
"Beans.setGuiAvailable should throw SecurityException");
4545N/A throw new Error(
"Introspector.setBeanInfoSearchPath should throw SecurityException");
4545N/A throw new Error(
"PropertyEditorManager.setEditorSearchPath should throw SecurityException");
4545N/A // now set the security manager to be friendly 4545N/A // now the calls should be OK again.