aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/SecurityDesc.java
diff options
context:
space:
mode:
Diffstat (limited to 'netx/net/sourceforge/jnlp/SecurityDesc.java')
-rw-r--r--netx/net/sourceforge/jnlp/SecurityDesc.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/netx/net/sourceforge/jnlp/SecurityDesc.java b/netx/net/sourceforge/jnlp/SecurityDesc.java
index 197fd3d..927917a 100644
--- a/netx/net/sourceforge/jnlp/SecurityDesc.java
+++ b/netx/net/sourceforge/jnlp/SecurityDesc.java
@@ -233,10 +233,16 @@ public class SecurityDesc {
if (grantAwtPermissions) {
permissions.add(new AWTPermission("showWindowWithoutWarningBanner"));
}
-
- if (file.isApplication())
- for (int i = 0; i < jnlpRIAPermissions.length; i++)
- permissions.add(jnlpRIAPermissions[i]);
+ if (JNLPRuntime.isWebstartApplication()) {
+ if (file == null) {
+ throw new NullJnlpFileException("Can not return sandbox permissions, file is null");
+ }
+ if (file.isApplication()) {
+ for (int i = 0; i < jnlpRIAPermissions.length; i++) {
+ permissions.add(jnlpRIAPermissions[i]);
+ }
+ }
+ }
if (downloadHost != null && downloadHost.length() > 0)
permissions.add(new SocketPermission(downloadHost,