RFC: Netx - Fix service exceptions thrown by the proxy

Omair Majid omajid at redhat.com
Mon Jun 15 13:38:54 PDT 2009


Hi,

Netx uses dynamic proxies to wrap all calls to the various JNLP services 
and run them in privileged mode. If any method called throws an 
exception, it is wrapped in a InvocationTargetException. And then in a 
PrivilegedActionException. Now a client JNLP program doesnt know (and 
shouldnt know!) that we are using proxies. So it gets a totally 
unexpected exception and cant deal with the situation properly. [1] 
describes the bug in much more detail.

The attached patch fixes the problem by throwing the exception that 
caused the problem.

ChangeLog:
2009-10-15  Omair Majid  <omajid at redhat.com>

    * rt/net/sourceforge/jnlp/services/ServiceUtil.java:
    (invoke): Throw the exception that caused the problem.


[1] 
http://benpryor.com/blog/2006/08/15/java-dynamic-proxies-and-invocationtargetexception/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netx-unwrap-proxy-exceptions.patch
Type: text/x-patch
Size: 1340 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090615/4ad6d698/netx-unwrap-proxy-exceptions.patch 


More information about the distro-pkg-dev mailing list