changeset in /hg/icedtea6: 2009-06-16 Omair Majid <omajid at redh...

Omair Majid omajid at redhat.com
Tue Jun 16 09:22:35 PDT 2009


changeset 450de765ec22 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=450de765ec22
description:
	2009-06-16  Omair Majid  <omajid at redhat.com>

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

diffstat:

2 files changed, 24 insertions(+), 6 deletions(-)
ChangeLog                                         |    5 ++++
rt/net/sourceforge/jnlp/services/ServiceUtil.java |   25 +++++++++++++++------

diffs (47 lines):

diff -r b88686f19b34 -r 450de765ec22 ChangeLog
--- 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-15  Lillian Angel  <langel at redha
+2009-06-16  Omair Majid  <omajid at redhat.com>
+
+	* rt/net/sourceforge/jnlp/services/ServiceUtil.java:
+	(invoke): Throw the original exception that caused the problem.
+
 2009-06-15  Lillian Angel  <langel at redhat.com>
 
 	* Makefile.am
diff -r b88686f19b34 -r 450de765ec22 rt/net/sourceforge/jnlp/services/ServiceUtil.java
--- 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 @@ public class ServiceUtil {
                 }
             };
 
-            Object result = AccessController.doPrivileged(invoker);
-
-            if (JNLPRuntime.isDebug())
-                System.err.println("        result: "+result);
-
-            return result;
+            try {
+                Object result = AccessController.doPrivileged(invoker);
+
+                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();
+                }
+            }
+
         }
     };
 



More information about the distro-pkg-dev mailing list