aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java')
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
index 6842f2c..5c69b01 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
@@ -32,6 +32,7 @@ import javax.swing.JWindow;
import net.sourceforge.jnlp.JNLPFile;
import net.sourceforge.jnlp.security.SecurityDialogs.AccessType;
import net.sourceforge.jnlp.services.ServiceUtil;
+import net.sourceforge.jnlp.util.logging.OutputController;
import net.sourceforge.jnlp.util.WeakList;
import sun.awt.AWTSecurityManager;
import sun.awt.AppContext;
@@ -263,7 +264,7 @@ class JNLPSecurityManager extends AWTSecurityManager {
// Enable this manually -- it'll produce too much output for -verbose
// otherwise.
// if (true)
- // System.out.println("Checking permission: " + perm.toString());
+ // OutputController.getLogger().log("Checking permission: " + perm.toString());
if (!JNLPRuntime.isWebstartApplication() &&
("setPolicy".equals(name) || "setSecurityManager".equals(name)))
@@ -283,9 +284,7 @@ class JNLPSecurityManager extends AWTSecurityManager {
super.checkPermission(perm);
} catch (SecurityException ex) {
- if (JNLPRuntime.isDebug()) {
- System.out.println("Denying permission: " + perm);
- }
+ OutputController.getLogger().log("Denying permission: " + perm);
throw ex;
}
}
@@ -318,14 +317,14 @@ class JNLPSecurityManager extends AWTSecurityManager {
JNLPClassLoader cl = (JNLPClassLoader) JNLPRuntime.getApplication().getClassLoader();
cl.addPermission(perm);
if (JNLPRuntime.isDebug()) {
- if (cl.getPermissions(null).implies(perm))
- System.err.println("Added permission: " + perm.toString());
- else
- System.err.println("Unable to add permission: " + perm.toString());
+ if (cl.getPermissions(null).implies(perm)){
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Added permission: " + perm.toString());
+ } else {
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Unable to add permission: " + perm.toString());
+ }
}
} else {
- if (JNLPRuntime.isDebug())
- System.err.println("Unable to add permission: " + perm + ", classloader not JNLP.");
+ OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Unable to add permission: " + perm + ", classloader not JNLP.");
}
}
@@ -341,8 +340,7 @@ class JNLPSecurityManager extends AWTSecurityManager {
if (app != null && window instanceof Window) {
Window w = (Window) window;
- if (JNLPRuntime.isDebug())
- System.err.println("SM: app: " + app.getTitle() + " is adding a window: " + window + " with appContext " + AppContext.getAppContext());
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "SM: app: " + app.getTitle() + " is adding a window: " + window + " with appContext " + AppContext.getAppContext());
weakWindows.add(w); // for mapping window -> app
weakApplications.add(app);