[Patch] java.lang - style fixes

Michael Koch konqueror@gmx.de
Mon Oct 18 10:42:00 GMT 2004


Hi list,

I just commited the attached patch with some style fixes for java.lang.
This mainly merges it more with GNU classpath.


Michael.


2004-10-18  Michael Koch  <konqueror@gmx.de>

	* 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.

-------------- next part --------------
Index: java/lang/Math.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Math.java,v
retrieving revision 1.8
diff -u -r1.8 Math.java
--- java/lang/Math.java	20 Apr 2004 12:30:18 -0000	1.8
+++ java/lang/Math.java	18 Oct 2004 10:39:00 -0000
@@ -38,9 +38,10 @@
 
 package java.lang;
 
-import java.util.Random;
 import gnu.classpath.Configuration;
 
+import java.util.Random;
+
 /**
  * Helper class containing useful mathematical functions and constants.
  * <P>
@@ -50,7 +51,7 @@
  *
  * @author Paul Fisher
  * @author John Keiser
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @since 1.0
  */
 public final class Math
Index: java/lang/Package.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Package.java,v
retrieving revision 1.8
diff -u -r1.8 Package.java
--- java/lang/Package.java	20 Apr 2004 12:30:18 -0000	1.8
+++ java/lang/Package.java	18 Oct 2004 10:39:00 -0000
@@ -41,6 +41,7 @@
 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 @@
  * then the other version, etc. (If a version has no minor, micro, etc numbers
  * then they are considered the be 0.)
  *
- * @author Mark Wielaard <mark@klomp.org>
+ * @author Mark Wielaard (mark@klomp.org)
  * @see ClassLoader#definePackage(String, String, String, String, String,
  *      String, String, URL)
  * @since 1.2
@@ -72,28 +73,28 @@
 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
Index: java/lang/Runtime.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Runtime.java,v
retrieving revision 1.16
diff -u -r1.16 Runtime.java
--- java/lang/Runtime.java	12 Aug 2004 16:20:10 -0000	1.16
+++ java/lang/Runtime.java	18 Oct 2004 10:39:00 -0000
@@ -35,11 +35,12 @@
 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 @@
    * treated as read-only.
    *
    * No matter what class you start initialization with, it defers to the
-   * superclass, therefore Object.<clinit> 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.<clinit> uses a String literal, possibly triggering initialization
-   *  String.<clinit> calls WeakHashMap.<init>, 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.<clinit> calls CaseInsensitiveComparator.<init>, triggering
+   *  String.<clinit> calls CaseInsensitiveComparator.<init>, triggering
    *      initialization
    *   CaseInsensitiveComparator has no dependencies
-   * Object.<clinit> calls System.loadLibrary, triggering initialization
-   *  System.<clinit> calls System.loadLibrary
+   * Object.<clinit> calls System.loadLibrary, triggering initialization
+   *  System.<clinit> calls System.loadLibrary
    *  System.loadLibrary calls Runtime.getRuntime, triggering initialization
-   *   Runtime.<clinit> calls Properties.<init>, triggering initialization
+   *   Runtime.<clinit> calls Properties.<init>, triggering initialization
    *    Dictionary, Hashtable, and Properties have no dependencies
-   *   Runtime.<clinit> 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.<clinit> calls Runtime.<init>
-   *    Runtime.<init> calls StringTokenizer.<init>, 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 @@
    *       ClassLoader first
    */
   static Properties defaultProperties = new Properties();
+
   static
   {
     insertSystemProperties(defaultProperties);
Index: java/lang/StrictMath.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/StrictMath.java,v
retrieving revision 1.3
diff -u -r1.3 StrictMath.java
--- java/lang/StrictMath.java	8 Oct 2003 19:00:21 -0000	1.3
+++ java/lang/StrictMath.java	18 Oct 2004 10:39:01 -0000
@@ -51,9 +51,10 @@
 
 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 @@
  * Note that angles are specified in radians.  Conversion functions are
  * provided for your convenience.
  *
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @since 1.3
  */
 public final strictfp class StrictMath
Index: java/lang/System.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/System.java,v
retrieving revision 1.20
diff -u -r1.20 System.java
--- java/lang/System.java	26 Sep 2004 17:11:14 -0000	1.20
+++ java/lang/System.java	18 Oct 2004 10:39:01 -0000
@@ -36,16 +36,9 @@
 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 @@
  * general environment.  As such, all methods are static.
  *
  * @author John Keiser
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @since 1.0
  * @status still missing 1.4 functionality
  */
Index: java/lang/Thread.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Thread.java,v
retrieving revision 1.33
diff -u -r1.33 Thread.java
--- java/lang/Thread.java	28 May 2004 18:53:04 -0000	1.33
+++ java/lang/Thread.java	18 Oct 2004 10:39:01 -0000
@@ -44,7 +44,7 @@
 /* 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 @@
  *
  * @author Tom Tromey
  * @author John Keiser
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @see Runnable
  * @see Runtime#exit(int)
  * @see #run()
Index: java/lang/ThreadLocal.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/ThreadLocal.java,v
retrieving revision 1.4
diff -u -r1.4 ThreadLocal.java
--- java/lang/ThreadLocal.java	26 Aug 2003 23:14:07 -0000	1.4
+++ java/lang/ThreadLocal.java	18 Oct 2004 10:39:01 -0000
@@ -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@klomp.org>
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Mark Wielaard (mark@klomp.org)
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @since 1.2
  * @status updated to 1.4
  */
Index: java/lang/Void.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Void.java,v
retrieving revision 1.7
diff -u -r1.7 Void.java
--- java/lang/Void.java	13 Jun 2002 18:16:26 -0000	1.7
+++ java/lang/Void.java	18 Oct 2004 10:39:01 -0000
@@ -35,19 +35,19 @@
 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 <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>This class could be Serializable, but that is up to Sun.</p>
  *
  * @author Paul Fisher
  * @author John Keiser
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @since 1.1
  * @status updated to 1.4
  */
@@ -62,5 +62,7 @@
   /**
    * Void is non-instantiable.
    */
-  private Void() { }
+  private Void()
+  {
+  }
 }


More information about the Java-patches mailing list