< prev index next >

src/java.base/share/classes/java/security/Security.java

Print this page

        

*** 64,74 **** static { // doPrivileged here because there are multiple // things in initialize that might require privs. // (the FileInputStream call and the File.exists call, // the securityPropFile call, etc) ! AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { initialize(); return null; } }); --- 64,74 ---- static { // doPrivileged here because there are multiple // things in initialize that might require privs. // (the FileInputStream call and the File.exists call, // the securityPropFile call, etc) ! AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { initialize(); return null; } });
*** 808,818 **** final boolean pa = key.equals("package.access"); final boolean pd = key.equals("package.definition"); if (pa || pd) { ! AccessController.doPrivileged(new PrivilegedAction<Void>() { public Void run() { try { /* Get the class via the bootstrap class loader. */ Class<?> cl = Class.forName( "java.lang.SecurityManager", false, null); --- 808,818 ---- final boolean pa = key.equals("package.access"); final boolean pd = key.equals("package.definition"); if (pa || pd) { ! AccessController.doPrivileged(new PrivilegedAction<>() { public Void run() { try { /* Get the class via the bootstrap class loader. */ Class<?> cl = Class.forName( "java.lang.SecurityManager", false, null);
< prev index next >