< prev index next >
src/java.base/share/classes/java/security/Policy.java
Print this page
*** 168,178 ****
if (pi.initialized == false || pi.policy == null) {
synchronized (Policy.class) {
PolicyInfo pinfo = policy.get();
if (pinfo.policy == null) {
String policy_class = AccessController.doPrivileged(
! new PrivilegedAction<String>() {
public String run() {
return Security.getProperty("policy.provider");
}
});
if (policy_class == null) {
--- 168,178 ----
if (pi.initialized == false || pi.policy == null) {
synchronized (Policy.class) {
PolicyInfo pinfo = policy.get();
if (pinfo.policy == null) {
String policy_class = AccessController.doPrivileged(
! new PrivilegedAction<>() {
public String run() {
return Security.getProperty("policy.provider");
}
});
if (policy_class == null) {
*** 197,207 ****
pinfo = new PolicyInfo(polFile, false);
policy.set(pinfo);
final String pc = policy_class;
Policy pol = AccessController.doPrivileged(
! new PrivilegedAction<Policy>() {
public Policy run() {
try {
ClassLoader cl =
ClassLoader.getSystemClassLoader();
// we want the extension loader
--- 197,207 ----
pinfo = new PolicyInfo(polFile, false);
policy.set(pinfo);
final String pc = policy_class;
Policy pol = AccessController.doPrivileged(
! new PrivilegedAction<>() {
public Policy run() {
try {
ClassLoader cl =
ClassLoader.getSystemClassLoader();
// we want the extension loader
*** 301,311 ****
* statically binds permissions so that legacy Policy
* implementations will continue to function.
*/
ProtectionDomain policyDomain =
! AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
public ProtectionDomain run() {
return p.getClass().getProtectionDomain();
}
});
--- 301,311 ----
* statically binds permissions so that legacy Policy
* implementations will continue to function.
*/
ProtectionDomain policyDomain =
! AccessController.doPrivileged(new PrivilegedAction<>() {
public ProtectionDomain run() {
return p.getClass().getProtectionDomain();
}
});
< prev index next >