Fix for regression in Gantt Project jnlp

Deepak Bhole dbhole at redhat.com
Wed Aug 22 14:26:00 PDT 2012


Hi,

This patch fixes an issue caught by Adam when trying to use
http://ganttproject.googlecode.com/svn/webstart/ganttproject-2.0.10/ganttproject-2.0.10.jnlp

The fix just catches all errors rather than just AccessControlException
and treats the error as permission denial (which is fine).

Okay for 1.3 and HEAD?

ChangeLog:
2012-08-22  Deepak Bhole <dbhole at redhat.com>

   * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
   (getAccessControlContextForClassLoading): Catch any and all errors and
   treat them as permission denied.


Deepak
-------------- next part --------------
diff -r fbc3fe6d280a netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Tue Aug 21 12:04:56 2012 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Wed Aug 22 17:23:57 2012 -0400
@@ -2148,8 +2148,8 @@
         try {
             context.checkPermission(new AllPermission());
             return context; // If context already has all permissions, don't bother
-        } catch (AccessControlException ace) {
-            // continue below
+        } catch (Exception ace) {
+            // Catch everything. This acts as automatic denial, which is fine.
         }
 
         // Since this is for class-loading, technically any class from one jar


More information about the distro-pkg-dev mailing list