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