Fix for regression in Gantt Project jnlp

Deepak Bhole dbhole at redhat.com
Fri Aug 24 13:34:07 PDT 2012


* Deepak Bhole <dbhole at redhat.com> [2012-08-22 17:27]:
> 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

Hi,

The old patch seems to broad and does not catch the circularity error
anyway :( Attached is a refined patch that catches just the error we are
seeing.

Once again, ignoring this error is OK because ignoring it implies
permission denied, which is acceptable. This is only a stop-gap measure
and we are working on a proper fix for 1.4 (and perhaps a backport to
1.3 later).

Cheers,
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	Fri Aug 24 16:31:59 2012 -0400
@@ -2150,6 +2150,8 @@
             return context; // If context already has all permissions, don't bother
         } catch (AccessControlException ace) {
             // continue below
+        } catch (ClassCircularityError cce) {
+            // continue below
         }
 
         // Since this is for class-loading, technically any class from one jar


More information about the distro-pkg-dev mailing list