classpath
[Top][All Lists]
Advanced

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

Re: VMClassLoader


From: Mark Wielaard
Subject: Re: VMClassLoader
Date: Sun, 15 Aug 2004 12:20:43 +0200

Hi,

On Sun, 2004-08-15 at 12:07, Mark Wielaard wrote:
> If nobody objects I want to commit the attached patch next week.
> 
> 2004-08-14  Mark Wielaard  <address@hidden>
> 
>         * vm/reference/java/lang/VMClassLoader.java (defineClass): Removed
>         version that didn't take a ProtectionDomain.

That would be the attached patch.

Cheers,

Mark
Index: NEWS
===================================================================
RCS file: /cvsroot/classpath/classpath/NEWS,v
retrieving revision 1.47
diff -u -r1.47 NEWS
--- NEWS        1 Aug 2004 21:31:11 -0000       1.47
+++ NEWS        15 Aug 2004 10:06:17 -0000
@@ -14,6 +14,12 @@
 * AWT 1.0 event model support.
 * GNU Classpath now comes with some example programs (see examples/README).
 
+Runtime interface Changes:
+
+* Runtimes should implement the VMClassLoader.defineClass() that takes a
+  ProtectionDomain. The version that didn't take a ProtectionDomain has
+  been removed from the reference implementation.
+
 New in release 0.10 (Jul 9, 2004)
 
 * java.net.URL now uses application classloader to load URLStreamHandlers
Index: vm/reference/java/lang/VMClassLoader.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/vm/reference/java/lang/VMClassLoader.java,v
retrieving revision 1.17
diff -u -r1.17 VMClassLoader.java
--- vm/reference/java/lang/VMClassLoader.java   12 Aug 2004 17:40:24 -0000      
1.17
+++ vm/reference/java/lang/VMClassLoader.java   15 Aug 2004 10:06:17 -0000
@@ -62,30 +62,6 @@
   /**
    * Helper to define a class using a string of bytes. This assumes that
    * the security checks have already been performed, if necessary.
-   * <strong>This method will be removed in a future version of GNU
-   * Classpath</strong>.
-   *
-   * @param name the name to give the class, or null if unknown
-   * @param data the data representing the classfile, in classfile format
-   * @param offset the offset into the data where the classfile starts
-   * @param len the length of the classfile data in the array
-   * @return the class that was defined
-   * @throws ClassFormatError if data is not in proper classfile format
-   * @deprecated Implement
-   * address@hidden #defineClass(ClassLoader, String, byte[], int, int, 
ProtectionDomain)}
-   *   instead.
-   */
-  static final native Class defineClass(ClassLoader cl, String name,
-                                        byte[] data, int offset, int len)
-    throws ClassFormatError;
-
-  /**
-   * Helper to define a class using a string of bytes. This assumes that
-   * the security checks have already been performed, if necessary.
-   *
-   * <strong>For backward compatibility, this just ignores the protection
-   * domain; that is the wrong behavior, and you should directly implement
-   * this method natively if you can.</strong>
    *
    * Implementations of this method are advised to consider the
    * situation where user code modifies the byte array after it has
@@ -101,13 +77,10 @@
    * @return the class that was defined
    * @throws ClassFormatError if data is not in proper classfile format
    */
-  static final Class defineClass(ClassLoader cl, String name,
-                                 byte[] data, int offset, int len,
-                                 ProtectionDomain pd)
-    throws ClassFormatError
-  {
-    return defineClass(cl, name, data, offset, len);
-  }
+  static final native Class defineClass(ClassLoader cl, String name,
+                                       byte[] data, int offset, int len,
+                                       ProtectionDomain pd)
+    throws ClassFormatError;
 
   /**
    * Helper to resolve all references to other classes from this class.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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