Skip to content

Commit

Permalink
#19 remove doPrivileged block from setting policy in JSM implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
kwart committed Sep 4, 2014
1 parent ab1ec8a commit 90dbcf8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 53 deletions.
Expand Up @@ -19,6 +19,8 @@
*/
package net.sourceforge.prograde.sm;

import java.security.Policy;

import net.sourceforge.prograde.generator.NotifyAndAllowPolicy;
import net.sourceforge.prograde.generator.PrintDeniedPermissions;

Expand All @@ -34,6 +36,6 @@ public class DumpMissingPermissionsJSM extends SecurityManager {
* JSM Constructor.
*/
public DumpMissingPermissionsJSM() {
SecurityActions.setPolicy(new NotifyAndAllowPolicy(null, new PrintDeniedPermissions()));
Policy.setPolicy(new NotifyAndAllowPolicy(null, new PrintDeniedPermissions()));
}
}
Expand Up @@ -19,6 +19,8 @@
*/
package net.sourceforge.prograde.sm;

import java.security.Policy;

import net.sourceforge.prograde.generator.GeneratePolicyFromDeniedPermissions;
import net.sourceforge.prograde.generator.NotifyAndAllowPolicy;

Expand All @@ -34,6 +36,6 @@ public class PolicyFileGeneratorJSM extends SecurityManager {
* JSM Constructor.
*/
public PolicyFileGeneratorJSM() {
SecurityActions.setPolicy(new NotifyAndAllowPolicy(null, new GeneratePolicyFromDeniedPermissions()));
Policy.setPolicy(new NotifyAndAllowPolicy(null, new GeneratePolicyFromDeniedPermissions()));
}
}
4 changes: 3 additions & 1 deletion src/main/java/net/sourceforge/prograde/sm/ProGradeJSM.java
Expand Up @@ -19,6 +19,8 @@
*/
package net.sourceforge.prograde.sm;

import java.security.Policy;

import net.sourceforge.prograde.policy.ProGradePolicy;

/**
Expand All @@ -34,6 +36,6 @@ public class ProGradeJSM extends SecurityManager {
*/
public ProGradeJSM() {
super();
SecurityActions.setPolicy(new ProGradePolicy());
Policy.setPolicy(new ProGradePolicy());
}
}
50 changes: 0 additions & 50 deletions src/main/java/net/sourceforge/prograde/sm/SecurityActions.java

This file was deleted.

0 comments on commit 90dbcf8

Please sign in to comment.