6983028: java/awt/FontClass/FontPrivilege.java
authorbae
Fri, 24 Dec 2010 14:05:42 +0300
changeset 7759 2e1579882018
parent 7758 3ed475e9013d
child 7760 594daec0930a
6983028: java/awt/FontClass/FontPrivilege.java Reviewed-by: prr
jdk/test/java/awt/FontClass/FontPrivilege.java
--- a/jdk/test/java/awt/FontClass/FontPrivilege.java	Thu Dec 23 21:58:12 2010 -0800
+++ b/jdk/test/java/awt/FontClass/FontPrivilege.java	Fri Dec 24 14:05:42 2010 +0300
@@ -25,7 +25,7 @@
  * @test
  * @bug 5010310 6319835 6904882 6968373
  * @summary test fonts can be created in the presence of a security manager
- * @run main/othervm/secure=java.lang.SecurityManager FontPrivilege
+ * @run main FontPrivilege
  */
 
 import java.awt.Font;
@@ -33,6 +33,8 @@
 public class FontPrivilege {
 
     public static void main(String[] args) throws Exception {
+        System.setSecurityManager(new SecurityManager());
+
         new Font("Helvetica", Font.PLAIN, 12).getFamily();
         new Font("foo bar", Font.PLAIN, 12).getFamily();
    }