>>>>> "Jeroen" == Jeroen Frijters <[EMAIL PROTECTED]> writes:

Jeroen> +public class Unsafe

Jeroen> Unsafe should be final, otherwise you can create an instance by
Jeroen> subclassing and capturing the this in the finalize method.

Thanks.  I'm checking in the appended.

Note that this class was made by looking through the public domain
concurrency sources and then writing declarations for the calls it
needed.  It is necessary but not sufficient -- my local copy of the
concurrency code has some stuff that I simply commented out, which
must be resolved before we can have it all working.

And, of course, we can change this class if we like.  However I would
like to try to keep the changes to a minimum, as extensive changes
will most likely make future concurrency imports more difficult.

Tom

2006-03-21  Tom Tromey  <[EMAIL PROTECTED]>

        * vm/reference/gnu/classpath/Unsafe.java (arrayBaseOffset): Javadoc
        fix.
        (Unsafe): Now final.

Index: vm/reference/gnu/classpath/Unsafe.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/classpath/Unsafe.java,v
retrieving revision 1.1
diff -u -r1.1 Unsafe.java
--- vm/reference/gnu/classpath/Unsafe.java      19 Mar 2006 23:35:41 -0000      
1.1
+++ vm/reference/gnu/classpath/Unsafe.java      21 Mar 2006 22:00:04 -0000
@@ -48,7 +48,7 @@
  * @author Tom Tromey ([EMAIL PROTECTED])
  * @author Andrew John Hughes ([EMAIL PROTECTED])
  */
-public class Unsafe
+public final class Unsafe
 {
   // Singleton class.
   private static Unsafe unsafe = new Unsafe();
@@ -279,7 +279,7 @@
    * @param arrayClass the class for which the first element's address should
    *                   be obtained.
    * @return the offset of the first element of the array class.
-   * @see arrayIndexScale(Class)
+   * @see #arrayIndexScale(Class)
    */
   public native int arrayBaseOffset(Class arrayClass);
 

Reply via email to