classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch to Proxy -- ok?


From: Tom Tromey
Subject: Patch to Proxy -- ok?
Date: 08 Oct 2003 12:33:41 -0600

Any comments on this?

We're using this patch in libgcj already.  I looked at the reference
VMClassLoader, and it seems to have the ProtectionDomain variant of
defineClass.  Is there a reason to hold off checking this in?

Tom

Index: ChangeLog
from  Tom Tromey  <address@hidden>
        * java/lang/reflect/Proxy.java (generate): Pass protection domain
        to VMClassLoader.defineClass.

Index: java/lang/reflect/Proxy.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/reflect/Proxy.java,v
retrieving revision 1.10
diff -u -r1.10 Proxy.java
--- java/lang/reflect/Proxy.java 8 Oct 2003 18:31:34 -0000 1.10
+++ java/lang/reflect/Proxy.java 8 Oct 2003 18:35:59 -0000
@@ -1326,12 +1326,10 @@
         {
           // XXX Do we require more native support here?
 
-          // XXX This is waiting on VM support for protection domains.
-
           Class vmClassLoader = Class.forName("java.lang.VMClassLoader");
           Class[] types = {ClassLoader.class, String.class,
                            byte[].class, int.class, int.class,
-                           /* ProtectionDomain.class */ };
+                           ProtectionDomain.class };
           Method m = vmClassLoader.getDeclaredMethod("defineClass", types);
 
           // Bypass the security check of setAccessible(true), since this
@@ -1340,7 +1338,7 @@
           m.flag = true;
           Object[] args = {loader, qualName, bytecode, new Integer(0),
                            new Integer(bytecode.length),
-                           /* Object.class.getProtectionDomain() */ };
+                           Object.class.getProtectionDomain() };
           Class clazz = (Class) m.invoke(null, args);
           m.flag = false;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]