[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: Small cleanups in java.lang

Kaffe CVS cvs-commits at kaffe.org
Fri Oct 15 07:28:53 PDT 2004


PatchSet 5297 
Date: 2004/10/15 14:24:58
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: Small cleanups in java.lang

2004-10-15  Dalibor Topic <robilad at kaffe.org>

        * libraries/javalib/java/lang/Object.java,
        libraries/javalib/java/lang/Thread.java,
        libraries/javalib/java/lang/ThreadLocal.java:
        Resynced with GNU Classpath.

        * libraries/javalib/java/lang/Void.java:
        Replaced by implementation from GNU Classpath.

        2004-10-15  Michael Koch  <konqueror at gmx.de>

        * java/lang/Object.java (equals): Rename 'o' to 'obj'.
        * java/lang/Thread.java,
        java/lang/ThreadLocal.java, java/lang/Void.java:
        Improved javadocs to be valid XHTML.

Members: 
	ChangeLog:1.2849->1.2850 
	libraries/javalib/java/lang/Object.java:1.13->1.14 
	libraries/javalib/java/lang/Thread.java:1.49->1.50 
	libraries/javalib/java/lang/ThreadLocal.java:1.3->1.4 
	libraries/javalib/java/lang/Void.java:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2849 kaffe/ChangeLog:1.2850
--- kaffe/ChangeLog:1.2849	Fri Oct 15 13:52:21 2004
+++ kaffe/ChangeLog	Fri Oct 15 14:24:58 2004
@@ -1,5 +1,22 @@
 2004-10-15  Dalibor Topic <robilad at kaffe.org>
 
+	* libraries/javalib/java/lang/Object.java,
+	libraries/javalib/java/lang/Thread.java,
+	libraries/javalib/java/lang/ThreadLocal.java:
+	Resynced with GNU Classpath.
+
+	* libraries/javalib/java/lang/Void.java:
+	Replaced by implementation from GNU Classpath.
+
+	2004-10-15  Michael Koch  <konqueror at gmx.de>
+
+        * java/lang/Object.java (equals): Rename 'o' to 'obj'.
+        * java/lang/Thread.java,
+        java/lang/ThreadLocal.java, java/lang/Void.java:
+        Improved javadocs to be valid XHTML.
+
+2004-10-15  Dalibor Topic <robilad at kaffe.org>
+
 	* libraries/javalib/java/lang/reflect/AccessibleObject.java,
 	libraries/javalib/java/lang/reflect/ReflectPermission.java:
 	Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/java/lang/Object.java
diff -u kaffe/libraries/javalib/java/lang/Object.java:1.13 kaffe/libraries/javalib/java/lang/Object.java:1.14
--- kaffe/libraries/javalib/java/lang/Object.java:1.13	Thu Oct 14 22:02:27 2004
+++ kaffe/libraries/javalib/java/lang/Object.java	Fri Oct 15 14:25:01 2004
@@ -125,13 +125,13 @@
    *
    * <p>The default implementation returns <code>this == o</code>.
    *
-   * @param o the Object to compare to
+   * @param obj the Object to compare to
    * @return whether this Object is semantically equal to another
    * @see #hashCode()
    */
-  public boolean equals(Object o)
+  public boolean equals(Object obj)
   {
-    return this == o;
+    return this == obj;
   }
 
   /**
Index: kaffe/libraries/javalib/java/lang/Thread.java
diff -u kaffe/libraries/javalib/java/lang/Thread.java:1.49 kaffe/libraries/javalib/java/lang/Thread.java:1.50
--- kaffe/libraries/javalib/java/lang/Thread.java:1.49	Fri Jul 30 11:52:27 2004
+++ kaffe/libraries/javalib/java/lang/Thread.java	Fri Oct 15 14:25:01 2004
@@ -38,10 +38,11 @@
 
 package java.lang;
 
+
 /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
  * "The Java Language Specification", ISBN 0-201-63451-1
  * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
- * Status:  Believed complete to version 1.4, with caveats. We do not 
+ * Status:  Believed complete to version 1.4, with caveats. We do not
  *          implement the deprecated (and dangerous) stop, suspend, and resume
  *          methods. Security implementation is not complete.
  */
@@ -76,7 +77,7 @@
  *
  * @author Tom Tromey
  * @author John Keiser
- * @author Eric Blake <ebb9 at email.byu.edu>
+ * @author Eric Blake (ebb9 at email.byu.edu)
  * @see Runnable
  * @see Runtime#exit(int)
  * @see #run()
@@ -858,7 +859,7 @@
    * If you stop a Thread that has not yet started, the stop is ignored
    * (contrary to what the JDK documentation says).
    * <b>WARNING</b>This bypasses Java security, and can throw a checked
-   * exception which the call stack is unprepared to handle. Do not abuse 
+   * exception which the call stack is unprepared to handle. Do not abuse
    * this power.
    *
    * <p>This is inherently unsafe, as it can interrupt synchronized blocks and
Index: kaffe/libraries/javalib/java/lang/ThreadLocal.java
diff -u kaffe/libraries/javalib/java/lang/ThreadLocal.java:1.3 kaffe/libraries/javalib/java/lang/ThreadLocal.java:1.4
--- kaffe/libraries/javalib/java/lang/ThreadLocal.java:1.3	Thu Jul 29 14:25:17 2004
+++ kaffe/libraries/javalib/java/lang/ThreadLocal.java	Fri Oct 15 14:25:01 2004
@@ -41,6 +41,7 @@
 import java.util.Map;
 import java.util.WeakHashMap;
 
+
 /**
  * ThreadLocal objects have a different state associated with every
  * Thread that accesses them. Every access to the ThreadLocal object
@@ -51,8 +52,11 @@
  * <p>The first time a ThreadLocal object is accessed on a particular
  * Thread, the state for that Thread's copy of the local variable is set by
  * executing the method <code>initialValue()</code>.
+ * </p>
  *
  * <p>An example how you can use this:
+ * </p>
+ *
  * <pre>
  * class Connection
  * {
@@ -65,20 +69,22 @@
  *     };
  * ...
  * }
- * </pre></br>
+ * </pre>
  *
- * Now all instances of connection can see who the owner of the currently
+ * <p>Now all instances of connection can see who the owner of the currently
  * executing Thread is by calling <code>owner.get()</code>. By default any
  * Thread would be associated with 'nobody'. But the Connection object could
  * offer a method that changes the owner associated with the Thread on
  * which the method was called by calling <code>owner.put("somebody")</code>.
  * (Such an owner changing method should then be guarded by security checks.)
+ * </p>
  *
  * <p>When a Thread is garbage collected all references to values of
  * the ThreadLocal objects associated with that Thread are removed.
+ * </p>
  *
- * @author Mark Wielaard <mark at klomp.org>
- * @author Eric Blake <ebb9 at email.byu.edu>
+ * @author Mark Wielaard (mark at klomp.org)
+ * @author Eric Blake (ebb9 at email.byu.edu)
  * @since 1.2
  * @status updated to 1.4
  */
Index: kaffe/libraries/javalib/java/lang/Void.java
diff -u kaffe/libraries/javalib/java/lang/Void.java:1.3 kaffe/libraries/javalib/java/lang/Void.java:1.4
--- kaffe/libraries/javalib/java/lang/Void.java:1.3	Thu Nov 22 06:21:12 2001
+++ kaffe/libraries/javalib/java/lang/Void.java	Fri Oct 15 14:25:01 2004
@@ -1,19 +1,68 @@
-/*
- * Java core library component.
- *
- * Copyright (c) 1997, 1998
- *      Transvirtual Technologies, Inc.  All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- */
+/* Void.class - defines void.class
+   Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
 
 package java.lang;
 
-public final class Void {
 
+/**
+ * Void is a placeholder class so that the variable <code>Void.TYPE</code>
+ * (also available as <code>void.class</code>) can be supported for
+ * reflection return types.
+ *
+ * <p>This class could be Serializable, but that is up to Sun.</p>
+ *
+ * @author Paul Fisher
+ * @author John Keiser
+ * @author Eric Blake (ebb9 at email.byu.edu)
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public final class Void
+{
+  /**
+   * The return type <code>void</code> is represented by this
+   * <code>Class</code> object.
+   */
   public static final Class TYPE = Class.getPrimitiveClass("void");
 
-  private Void() { /* this class is not instantiable by the general public */ }
-
+  /**
+   * Void is non-instantiable.
+   */
+  private Void()
+  {
+  }
 }




More information about the kaffe mailing list