2124N/A/*
2362N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2124N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2124N/A *
2124N/A * This code is free software; you can redistribute it and/or modify it
2124N/A * under the terms of the GNU General Public License version 2 only, as
2124N/A * published by the Free Software Foundation.
2124N/A *
2124N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2124N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2124N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2124N/A * version 2 for more details (a copy is included in the LICENSE file that
2124N/A * accompanied this code).
2124N/A *
2124N/A * You should have received a copy of the GNU General Public License version
2124N/A * 2 along with this work; if not, write to the Free Software Foundation,
2124N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2124N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
2124N/A */
2124N/A
2124N/A/*
2124N/A * @test
2515N/A * @bug 5010310 6319835 6904882 6968373
2124N/A * @summary test fonts can be created in the presence of a security manager
3279N/A * @run main FontPrivilege
2124N/A */
2124N/A
2124N/Aimport java.awt.Font;
2124N/A
2124N/Apublic class FontPrivilege {
2124N/A
2124N/A public static void main(String[] args) throws Exception {
3279N/A System.setSecurityManager(new SecurityManager());
3279N/A
2124N/A new Font("Helvetica", Font.PLAIN, 12).getFamily();
2124N/A new Font("foo bar", Font.PLAIN, 12).getFamily();
2124N/A }
2124N/A}