aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java10
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e466585..aeea49c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-05 Andrew Azores <[email protected]>
+
+ * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java:
+ (addPermission) avoid NPE in JNLPClassLoader#getPermissions with debug
+ enabled
+
2013-11-01 Jiri Vanek <[email protected]>
Synced headers between PLUGIN_DEBUG, PLUGIN_ERROR and javaside
diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
index 5c69b01..d3ba810 100644
--- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
@@ -317,10 +317,14 @@ class JNLPSecurityManager extends AWTSecurityManager {
JNLPClassLoader cl = (JNLPClassLoader) JNLPRuntime.getApplication().getClassLoader();
cl.addPermission(perm);
if (JNLPRuntime.isDebug()) {
- if (cl.getPermissions(null).implies(perm)){
- OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Added permission: " + perm.toString());
+ if (cl.getSecurity() == null) {
+ 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 {
- OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Unable to add permission: " + perm.toString());
+ OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Cannot get permissions for null codesource when classloader security is not null");
}
}
} else {