Mercurial > hg > release > icedtea6-1.6
changeset 1601:450de765ec22
2009-06-16 Omair Majid <omajid@redhat.com>
* rt/net/sourceforge/jnlp/services/ServiceUtil.java:
(invoke): Throw the original exception that caused the problem.
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Tue, 16 Jun 2009 10:23:45 -0400 |
parents | b88686f19b34 |
children | e6350d5249d3 |
files | ChangeLog rt/net/sourceforge/jnlp/services/ServiceUtil.java |
diffstat | 2 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jun 15 15:44:37 2009 -0400 +++ b/ChangeLog Tue Jun 16 10:23:45 2009 -0400 @@ -1,3 +1,8 @@ +2009-06-16 Omair Majid <omajid@redhat.com> + + * rt/net/sourceforge/jnlp/services/ServiceUtil.java: + (invoke): Throw the original exception that caused the problem. + 2009-06-15 Lillian Angel <langel@redhat.com> * Makefile.am
--- a/rt/net/sourceforge/jnlp/services/ServiceUtil.java Mon Jun 15 15:44:37 2009 -0400 +++ b/rt/net/sourceforge/jnlp/services/ServiceUtil.java Tue Jun 16 10:23:45 2009 -0400 @@ -159,12 +159,25 @@ } }; - Object result = AccessController.doPrivileged(invoker); + try { + Object result = AccessController.doPrivileged(invoker); + + if (JNLPRuntime.isDebug()) + System.err.println(" result: "+result); - if (JNLPRuntime.isDebug()) - System.err.println(" result: "+result); + return result; + } catch (PrivilegedActionException e) { + // Any exceptions thrown by the actual methods are wrapped by a + // InvocationTargetException, which is further wrapped by the + // PrivilegedActionException. Lets unwrap them to make the + // proxy transparent to the callers + if (e.getCause() instanceof InvocationTargetException) { + throw e.getCause().getCause(); + } else { + throw e.getCause(); + } + } - return result; } };