From 2047d8e479efea09e4f812662fc38e57f9f37226 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Mon, 18 Oct 2004 10:41:56 +0000 Subject: [PATCH] Math.java, [...]: Reworked import statements, HTML in javadocs and modifier orders. 2004-10-18 Michael Koch * java/lang/Math.java, java/lang/Package.java, java/lang/Runtime.java, java/lang/StrictMath.java, java/lang/System.java, java/lang/Thread.java, java/lang/ThreadLocal.java, java/lang/Void.java: Reworked import statements, HTML in javadocs and modifier orders. From-SVN: r89207 --- libjava/ChangeLog | 12 ++++++++++++ libjava/java/lang/Math.java | 5 +++-- libjava/java/lang/Package.java | 19 ++++++++++--------- libjava/java/lang/Runtime.java | 24 +++++++++++++----------- libjava/java/lang/StrictMath.java | 5 +++-- libjava/java/lang/System.java | 9 +-------- libjava/java/lang/Thread.java | 4 ++-- libjava/java/lang/ThreadLocal.java | 14 ++++++++++---- libjava/java/lang/Void.java | 10 ++++++---- 9 files changed, 60 insertions(+), 42 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2abe5d7e90c..98309209bb4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2004-10-18 Michael Koch + + * java/lang/Math.java, + java/lang/Package.java, + java/lang/Runtime.java, + java/lang/StrictMath.java, + java/lang/System.java, + java/lang/Thread.java, + java/lang/ThreadLocal.java, + java/lang/Void.java: + Reworked import statements, HTML in javadocs and modifier orders. + 2004-10-18 Jeroen Frijters * java/util/Timer.java diff --git a/libjava/java/lang/Math.java b/libjava/java/lang/Math.java index 5c9a39bff0f..aac33aa299d 100644 --- a/libjava/java/lang/Math.java +++ b/libjava/java/lang/Math.java @@ -38,9 +38,10 @@ exception statement from your version. */ package java.lang; -import java.util.Random; import gnu.classpath.Configuration; +import java.util.Random; + /** * Helper class containing useful mathematical functions and constants. *

@@ -50,7 +51,7 @@ import gnu.classpath.Configuration; * * @author Paul Fisher * @author John Keiser - * @author Eric Blake + * @author Eric Blake (ebb9@email.byu.edu) * @since 1.0 */ public final class Math diff --git a/libjava/java/lang/Package.java b/libjava/java/lang/Package.java index 3ccdbb1e642..89945cadd8a 100644 --- a/libjava/java/lang/Package.java +++ b/libjava/java/lang/Package.java @@ -41,6 +41,7 @@ import java.net.URL; import java.util.NoSuchElementException; import java.util.StringTokenizer; + /** * Everything you ever wanted to know about a package. This class makes it * possible to attach specification and implementation information to a @@ -63,7 +64,7 @@ import java.util.StringTokenizer; * then the other version, etc. (If a version has no minor, micro, etc numbers * then they are considered the be 0.) * - * @author Mark Wielaard + * @author Mark Wielaard (mark@klomp.org) * @see ClassLoader#definePackage(String, String, String, String, String, * String, String, URL) * @since 1.2 @@ -72,28 +73,28 @@ import java.util.StringTokenizer; public class Package { /** The name of the Package */ - final private String name; + private final String name; /** The name if the implementation */ - final private String implTitle; + private final String implTitle; /** The vendor that wrote this implementation */ - final private String implVendor; + private final String implVendor; /** The version of this implementation */ - final private String implVersion; + private final String implVersion; /** The name of the specification */ - final private String specTitle; + private final String specTitle; /** The name of the specification designer */ - final private String specVendor; + private final String specVendor; /** The version of this specification */ - final private String specVersion; + private final String specVersion; /** If sealed the origin of the package classes, otherwise null */ - final private URL sealed; + private final URL sealed; /** * A package local constructor for the Package class. All parameters except diff --git a/libjava/java/lang/Runtime.java b/libjava/java/lang/Runtime.java index b6b8c4f171a..a1babfc1817 100644 --- a/libjava/java/lang/Runtime.java +++ b/libjava/java/lang/Runtime.java @@ -35,11 +35,12 @@ 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; import java.io.File; -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; import java.io.OutputStream; import java.util.HashSet; import java.util.Iterator; @@ -79,27 +80,27 @@ public class Runtime * treated as read-only. * * No matter what class you start initialization with, it defers to the - * superclass, therefore Object. will be the first Java code + * superclass, therefore Object.<clinit> will be the first Java code * executed. From there, the bootstrap sequence, up to the point that * native libraries are loaded (as of March 24, when I traced this * manually) is as follows: * - * Object. uses a String literal, possibly triggering initialization - * String. calls WeakHashMap., triggering initialization + * Object.<clinit> uses a String literal, possibly triggering initialization + * String.<clinit> calls WeakHashMap.<init>, triggering initialization * AbstractMap, WeakHashMap, WeakHashMap$1 have no dependencies - * String. calls CaseInsensitiveComparator., triggering + * String.<clinit> calls CaseInsensitiveComparator.<init>, triggering * initialization * CaseInsensitiveComparator has no dependencies - * Object. calls System.loadLibrary, triggering initialization - * System. calls System.loadLibrary + * Object.<clinit> calls System.loadLibrary, triggering initialization + * System.<clinit> calls System.loadLibrary * System.loadLibrary calls Runtime.getRuntime, triggering initialization - * Runtime. calls Properties., triggering initialization + * Runtime.<clinit> calls Properties.<init>, triggering initialization * Dictionary, Hashtable, and Properties have no dependencies - * Runtime. calls VMRuntime.insertSystemProperties, triggering + * Runtime.<clinit> calls VMRuntime.insertSystemProperties, triggering * initialization of VMRuntime; the VM must make sure that there are * not any harmful dependencies - * Runtime. calls Runtime. - * Runtime. calls StringTokenizer., triggering initialization + * Runtime.<clinit> calls Runtime.<init> + * Runtime.<init> calls StringTokenizer.<init>, triggering initialization * StringTokenizer has no dependencies * System.loadLibrary calls Runtime.loadLibrary * Runtime.loadLibrary should be able to load the library, although it @@ -107,6 +108,7 @@ public class Runtime * ClassLoader first */ static Properties defaultProperties = new Properties(); + static { insertSystemProperties(defaultProperties); diff --git a/libjava/java/lang/StrictMath.java b/libjava/java/lang/StrictMath.java index 9411a9bd404..5a9c7cabb43 100644 --- a/libjava/java/lang/StrictMath.java +++ b/libjava/java/lang/StrictMath.java @@ -51,9 +51,10 @@ exception statement from your version. */ package java.lang; -import java.util.Random; import gnu.classpath.Configuration; +import java.util.Random; + /** * Helper class containing useful mathematical functions and constants. * This class mirrors {@link Math}, but is 100% portable, because it uses @@ -69,7 +70,7 @@ import gnu.classpath.Configuration; * Note that angles are specified in radians. Conversion functions are * provided for your convenience. * - * @author Eric Blake + * @author Eric Blake (ebb9@email.byu.edu) * @since 1.3 */ public final strictfp class StrictMath diff --git a/libjava/java/lang/System.java b/libjava/java/lang/System.java index 68add349dc3..8372fbec4a0 100644 --- a/libjava/java/lang/System.java +++ b/libjava/java/lang/System.java @@ -36,16 +36,9 @@ 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; import gnu.classpath.Configuration; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.FileDescriptor; -import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.InputStream; import java.io.PrintStream; import java.util.Properties; @@ -56,7 +49,7 @@ import java.util.PropertyPermission; * general environment. As such, all methods are static. * * @author John Keiser - * @author Eric Blake + * @author Eric Blake (ebb9@email.byu.edu) * @since 1.0 * @status still missing 1.4 functionality */ diff --git a/libjava/java/lang/Thread.java b/libjava/java/lang/Thread.java index f631cc5aaea..5f3940f8462 100644 --- a/libjava/java/lang/Thread.java +++ b/libjava/java/lang/Thread.java @@ -44,7 +44,7 @@ import gnu.gcj.RawDataManaged; /* 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. */ @@ -79,7 +79,7 @@ import gnu.gcj.RawDataManaged; * * @author Tom Tromey * @author John Keiser - * @author Eric Blake + * @author Eric Blake (ebb9@email.byu.edu) * @see Runnable * @see Runtime#exit(int) * @see #run() diff --git a/libjava/java/lang/ThreadLocal.java b/libjava/java/lang/ThreadLocal.java index 972565949a8..d9967c6a2c8 100644 --- a/libjava/java/lang/ThreadLocal.java +++ b/libjava/java/lang/ThreadLocal.java @@ -41,6 +41,7 @@ import java.util.Collections; 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 @@ import java.util.WeakHashMap; *

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 initialValue(). + *

* *

An example how you can use this: + *

+ * *
  * class Connection
  * {
@@ -65,20 +69,22 @@ import java.util.WeakHashMap;
  *     };
  * ...
  * }
- * 

+ * * - * Now all instances of connection can see who the owner of the currently + *

Now all instances of connection can see who the owner of the currently * executing Thread is by calling owner.get(). 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 owner.put("somebody"). * (Such an owner changing method should then be guarded by security checks.) + *

* *

When a Thread is garbage collected all references to values of * the ThreadLocal objects associated with that Thread are removed. + *

* - * @author Mark Wielaard - * @author Eric Blake + * @author Mark Wielaard (mark@klomp.org) + * @author Eric Blake (ebb9@email.byu.edu) * @since 1.2 * @status updated to 1.4 */ diff --git a/libjava/java/lang/Void.java b/libjava/java/lang/Void.java index b2d64dd5b72..39094d72244 100644 --- a/libjava/java/lang/Void.java +++ b/libjava/java/lang/Void.java @@ -35,19 +35,19 @@ 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; + /** * Void is a placeholder class so that the variable Void.TYPE * (also available as void.class) can be supported for * reflection return types. * - *

This class could be Serializable, but that is up to Sun. + *

This class could be Serializable, but that is up to Sun.

* * @author Paul Fisher * @author John Keiser - * @author Eric Blake + * @author Eric Blake (ebb9@email.byu.edu) * @since 1.1 * @status updated to 1.4 */ @@ -62,5 +62,7 @@ public final class Void /** * Void is non-instantiable. */ - private Void() { } + private Void() + { + } }