This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: java.lang - style and javadoc fixes


Hi list,


I just commited the attached patch to fix javadoc comments, coding style 
and argument names all over java.lang.


Michael


2004-04-20  Michael Koch  <konqueror@gmx.de>

	* java/lang/Byte.java,
	java/lang/CharSequence.java,
	java/lang/ClassLoader.java,
	java/lang/Compiler.java,
	java/lang/Double.java,
	java/lang/Float.java,
	java/lang/Integer.java,
	java/lang/Long.java,
	java/lang/Math.java,
	java/lang/Number.java,
	java/lang/Package.java,
	java/lang/Runtime.java,
	java/lang/RuntimePermission.java,
	java/lang/SecurityManager.java,
	java/lang/Short.java,
	java/lang/StringBuffer.java,
	java/lang/System.java,
	java/lang/ThreadGroup.java,
	java/lang/Throwable.java,
	java/lang/reflect/InvocationHandler.java,
	java/lang/reflect/Proxy.java:
	Fixed javadocs, coding style and argument names all over.

Index: java/lang/Byte.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Byte.java,v
retrieving revision 1.9
diff -u -r1.9 Byte.java
--- java/lang/Byte.java	15 Jun 2002 19:45:30 -0000	1.9
+++ java/lang/Byte.java	20 Apr 2004 12:01:17 -0000
@@ -147,7 +147,7 @@
    *
    * @param s the <code>String</code> to convert
    * @param radix the radix (base) to use in the conversion
-   * @return the <code>String</code> argument converted to </code>byte</code>
+   * @return the <code>String</code> argument converted to <code>byte</code>
    * @throws NumberFormatException if <code>s</code> cannot be parsed as a
    *         <code>byte</code>
    */
Index: java/lang/CharSequence.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/CharSequence.java,v
retrieving revision 1.3
diff -u -r1.3 CharSequence.java
--- java/lang/CharSequence.java	15 Jun 2002 19:45:30 -0000	1.3
+++ java/lang/CharSequence.java	20 Apr 2004 12:01:17 -0000
@@ -78,7 +78,7 @@
   int length();
 
   /**
-   * Returns a new <code>CharSequence</char> of the indicated range.
+   * Returns a new <code>CharSequence</code> of the indicated range.
    *
    * @param begin the start index (inclusive)
    * @param end the end index (exclusive)
Index: java/lang/ClassLoader.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/ClassLoader.java,v
retrieving revision 1.31
diff -u -r1.31 ClassLoader.java
--- java/lang/ClassLoader.java	9 Oct 2003 16:24:55 -0000	1.31
+++ java/lang/ClassLoader.java	20 Apr 2004 12:01:18 -0000
@@ -249,7 +249,7 @@
    * it. Calls <code>loadClass(name, false)</code>.
    *
    * <p>Subclasses should not override this method but should override
-   * <code>findClass()</code> which is called by this method.
+   * <code>findClass()</code> which is called by this method.</p>
    *
    * @param name the name of the class relative to this ClassLoader
    * @return the loaded class
@@ -266,14 +266,14 @@
    * out if the class has already been loaded through this classloader by
    * calling <code>findLoadedClass()</code>. Then it calls
    * <code>loadClass()</code> on the parent classloader (or when there is
-   * no parent it uses the VM bootclassloader)</code>). If the class is still
+   * no parent it uses the VM bootclassloader). If the class is still
    * not loaded it tries to create a new class by calling
    * <code>findClass()</code>. Finally when <code>resolve</code> is
    * <code>true</code> it also calls <code>resolveClass()</code> on the
    * newly loaded class.
    *
    * <p>Subclasses should not override this method but should override
-   * <code>findClass()</code> which is called by this method.
+   * <code>findClass()</code> which is called by this method.</p>
    *
    * @param name the fully qualified name of the class to load
    * @param resolve whether or not to resolve the class
@@ -384,7 +384,7 @@
    * <code>findClass()</code> implementation. The name should use '.'
    * separators, and discard the trailing ".class".  The default protection
    * domain has the permissions of
-   * <code>Policy.getPolicy().getPermissions(new CodeSource(null, null))<code>.
+   * <code>Policy.getPolicy().getPermissions(new CodeSource(null, null))</code>.
    *
    * @param name the name to give the class, or null if unknown
    * @param data the data representing the classfile, in classfile format
@@ -407,7 +407,7 @@
    * Helper to define a class using a string of bytes. Subclasses should call
    * this method from their <code>findClass()</code> implementation. If the
    * domain is null, the default of
-   * <code>Policy.getPolicy().getPermissions(new CodeSource(null, null))<code>
+   * <code>Policy.getPolicy().getPermissions(new CodeSource(null, null))</code>
    * is used. Once a class has been defined in a package, all further classes
    * in that package must have the same set of certificates or a
    * SecurityException is thrown.
@@ -475,6 +475,7 @@
    * <code>null</code>. A security check may be performed on
    * <code>RuntimePermission("getClassLoader")</code>.
    *
+   * @return the parent <code>ClassLoader</code>
    * @throws SecurityException if the security check fails
    * @since 1.2
    */
@@ -554,13 +555,13 @@
    * multiple resources with the same name that come from multiple locations.
    * It can also occur that a parent classloader offers a resource with a
    * certain name and the child classloader also offers a resource with that
-   * same name. <code>getResource() only offers the first resource (of the
+   * same name. <code>getResource()</code> only offers the first resource (of the
    * parent) with a given name. This method lists all resources with the
    * same name. The name should use '/' as path separators.
    *
    * <p>The Enumeration is created by first calling <code>getResources()</code>
    * on the parent classloader and then calling <code>findResources()</code>
-   * on this classloader.
+   * on this classloader.</p>
    *
    * @param name the resource name
    * @return an enumaration of all resources found
Index: java/lang/Compiler.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Compiler.java,v
retrieving revision 1.6
diff -u -r1.6 Compiler.java
--- java/lang/Compiler.java	15 Jun 2002 19:45:31 -0000	1.6
+++ java/lang/Compiler.java	20 Apr 2004 12:01:18 -0000
@@ -81,7 +81,7 @@
   }
 
   /**
-   * Compile the classes whose name matches <code>classNames/code>.
+   * Compile the classes whose name matches <code>classNames</code>.
    *
    * @param classNames the name of classes to compile
    * @return <code>false</code> if no compiler is available or
Index: java/lang/Double.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Double.java,v
retrieving revision 1.18
diff -u -r1.18 Double.java
--- java/lang/Double.java	23 Sep 2003 21:42:40 -0000	1.18
+++ java/lang/Double.java	20 Apr 2004 12:01:18 -0000
@@ -1,5 +1,6 @@
 /* Double.java -- object wrapper for double
-   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+   Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -35,7 +36,6 @@
 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;
@@ -243,7 +243,7 @@
    * @see #NEGATIVE_INFINITY
    * @since 1.2
    */
-  public static native double parseDouble(String s);
+  public static native double parseDouble(String str);
 
   /**
    * Return <code>true</code> if the <code>double</code> has the same
@@ -392,9 +392,9 @@
    * <code>Double.NaN</code> as equal, but treats <code>0.0</code> and
    * <code>-0.0</code> as unequal.
    *
-   * <p>Note that <code>d1.equals(d2)<code> is identical to
+   * <p>Note that <code>d1.equals(d2)</code> is identical to
    * <code>doubleToLongBits(d1.doubleValue()) ==
-   *    doubleToLongBits(d2.doubleValue())<code>.
+   *    doubleToLongBits(d2.doubleValue())</code>.
    *
    * @param obj the object to compare
    * @return whether the objects are semantically equal
Index: java/lang/Float.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Float.java,v
retrieving revision 1.16
diff -u -r1.16 Float.java
--- java/lang/Float.java	21 Nov 2003 13:24:28 -0000	1.16
+++ java/lang/Float.java	20 Apr 2004 12:01:18 -0000
@@ -1,5 +1,6 @@
 /* Float.java -- object wrapper for float
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+   Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -239,11 +240,11 @@
    * @see #NEGATIVE_INFINITY
    * @since 1.2
    */
-  public static float parseFloat(String s)
+  public static float parseFloat(String str)
   {
     // XXX Rounding parseDouble() causes some errors greater than 1 ulp from
     // the infinitely precise decimal.
-    return (float) Double.parseDouble(s);
+    return (float) Double.parseDouble(str);
   }
 
   /**
@@ -390,9 +391,9 @@
    * <code>Float.NaN</code> as equal, but treats <code>0.0</code> and
    * <code>-0.0</code> as unequal.
    *
-   * <p>Note that <code>f1.equals(f2)<code> is identical to
+   * <p>Note that <code>f1.equals(f2)</code> is identical to
    * <code>floatToIntBits(f1.floatValue()) ==
-   *    floatToIntBits(f2.floatValue())<code>.
+   *    floatToIntBits(f2.floatValue())</code>.
    *
    * @param obj the object to compare
    * @return whether the objects are semantically equal
Index: java/lang/Integer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Integer.java,v
retrieving revision 1.14
diff -u -r1.14 Integer.java
--- java/lang/Integer.java	13 Jun 2002 18:16:25 -0000	1.14
+++ java/lang/Integer.java	20 Apr 2004 12:01:18 -0000
@@ -220,9 +220,9 @@
    * within <code>MIN_VALUE</code> to <code>MAX_VALUE</code>, inclusive.
    * Unlike Double.parseDouble, you may not have a leading '+'.
    *
-   * @param s the <code>String</code> to convert
+   * @param str the <code>String</code> to convert
    * @param radix the radix (base) to use in the conversion
-   * @return the <code>String</code> argument converted to </code>int</code>
+   * @return the <code>String</code> argument converted to <code>int</code>
    * @throws NumberFormatException if <code>s</code> cannot be parsed as an
    *         <code>int</code>
    */
@@ -414,7 +414,7 @@
    * interpret the value of the property.
    *
    * @param nm the name of the system property
-   * @param val the default value
+   * @param def the default value
    * @return the value of the system property, or the default
    * @throws SecurityException if accessing the system property is forbidden
    * @see System#getProperty(String)
@@ -461,7 +461,7 @@
    * Finally, the value must be in the range <code>MIN_VALUE</code> to
    * <code>MAX_VALUE</code>, or an exception is thrown.
    *
-   * @param s the <code>String</code> to interpret
+   * @param str the <code>String</code> to interpret
    * @return the value of the String as an <code>Integer</code>
    * @throws NumberFormatException if <code>s</code> cannot be parsed as a
    *         <code>int</code>
Index: java/lang/Long.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Long.java,v
retrieving revision 1.12
diff -u -r1.12 Long.java
--- java/lang/Long.java	13 Jun 2002 18:16:25 -0000	1.12
+++ java/lang/Long.java	20 Apr 2004 12:01:18 -0000
@@ -223,9 +223,9 @@
    * 'L' as the last character is only valid in radices 22 or greater, where
    * it is a digit and not a type indicator.
    *
-   * @param s the <code>String</code> to convert
+   * @param str the <code>String</code> to convert
    * @param radix the radix (base) to use in the conversion
-   * @return the <code>String</code> argument converted to </code>long</code>
+   * @return the <code>String</code> argument converted to <code>long</code>
    * @throws NumberFormatException if <code>s</code> cannot be parsed as a
    *         <code>long</code>
    */
@@ -306,7 +306,7 @@
    * <code>MAX_VALUE</code>, or an exception is thrown. Note that you cannot
    * use a trailing 'l' or 'L', unlike in Java source code.
    *
-   * @param s the <code>String</code> to interpret
+   * @param str the <code>String</code> to interpret
    * @return the value of the String as a <code>Long</code>
    * @throws NumberFormatException if <code>s</code> cannot be parsed as a
    *         <code>long</code>
@@ -455,7 +455,7 @@
    * interpret the value of the property.
    *
    * @param nm the name of the system property
-   * @param val the default value
+   * @param def the default value
    * @return the value of the system property, or the default
    * @throws SecurityException if accessing the system property is forbidden
    * @see System#getProperty(String)
Index: java/lang/Math.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Math.java,v
retrieving revision 1.7
diff -u -r1.7 Math.java
--- java/lang/Math.java	8 Oct 2003 19:00:21 -0000	1.7
+++ java/lang/Math.java	20 Apr 2004 12:01:19 -0000
@@ -564,7 +564,7 @@
 
   /**
    * Take the nearest integer to the argument.  This is equivalent to
-   * <code>(int) Math.floor(a + 0.5f). If the argument is NaN, the result
+   * <code>(int) Math.floor(a + 0.5f)</code>. If the argument is NaN, the result
    * is 0; otherwise if the argument is outside the range of int, the result
    * will be Integer.MIN_VALUE or Integer.MAX_VALUE, as appropriate.
    *
Index: java/lang/Number.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Number.java,v
retrieving revision 1.7
diff -u -r1.7 Number.java
--- java/lang/Number.java	13 Jun 2002 18:16:25 -0000	1.7
+++ java/lang/Number.java	20 Apr 2004 12:01:19 -0000
@@ -69,7 +69,7 @@
     '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
     'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
     'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
-    'u', 'v', 'w', 'x', 'y', 'z'
+    'u', 'v', 'w', 'x', 'y', 'z',
   };
 
   /**
Index: java/lang/Package.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Package.java,v
retrieving revision 1.7
diff -u -r1.7 Package.java
--- java/lang/Package.java	6 Jan 2004 08:34:58 -0000	1.7
+++ java/lang/Package.java	20 Apr 2004 12:01:19 -0000
@@ -227,7 +227,10 @@
    * <code>getSpecificationVersion</code>.
    *
    * @param version the (minimal) desired version of the specification
-   * @throws NumberFormatException if either version string is invalid
+   *
+   * @return true if the version is compatible, false otherwise
+   *
+   * @Throws NumberFormatException if either version string is invalid
    * @throws NullPointerException if either version string is null
    */
   public boolean isCompatibleWith(String version)
Index: java/lang/Runtime.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Runtime.java,v
retrieving revision 1.13
diff -u -r1.13 Runtime.java
--- java/lang/Runtime.java	21 Jul 2003 01:54:05 -0000	1.13
+++ java/lang/Runtime.java	20 Apr 2004 12:01:19 -0000
@@ -95,8 +95,9 @@
    *  System.loadLibrary calls Runtime.getRuntime, triggering initialization
    *   Runtime.<clinit> calls Properties.<init>, triggering initialization
    *    Dictionary, Hashtable, and Properties have no dependencies
-   *   Runtime.<clinit> calls insertSystemProperties; the VM must make sure
-   *      that there are not any harmful dependencies
+   *   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
    *     StringTokenizer has no dependencies
@@ -170,13 +171,13 @@
    *
    * <p>First, all shutdown hooks are run, in unspecified order, and
    * concurrently. Next, if finalization on exit has been enabled, all pending
-   * finalizers are run. Finally, the system calls <code>halt</code>.
+   * finalizers are run. Finally, the system calls <code>halt</code>.</p>
    *
    * <p>If this is run a second time after shutdown has already started, there
    * are two actions. If shutdown hooks are still executing, it blocks
    * indefinitely. Otherwise, if the status is nonzero it halts immediately;
    * if it is zero, it blocks indefinitely. This is typically called by
-   * <code>System.exit</code>.
+   * <code>System.exit</code>.</p>
    *
    * @param status the status to exit with
    * @throws SecurityException if permission is denied
@@ -285,23 +286,23 @@
    * <code>System.exit</code> was invoked), or when the user terminates
    * the virtual machine (such as by typing ^C, or logging off). There is
    * a security check to add hooks,
-   * <code>RuntimePermission("shutdownHooks")<code>.
+   * <code>RuntimePermission("shutdownHooks")</code>.
    *
    * <p>The hook must be an initialized, but unstarted Thread. The threads
    * are run concurrently, and started in an arbitrary order; and user
    * threads or daemons may still be running. Once shutdown hooks have
    * started, they must all complete, or else you must use <code>halt</code>,
    * to actually finish the shutdown sequence. Attempts to modify hooks
-   * after shutdown has started result in IllegalStateExceptions.
+   * after shutdown has started result in IllegalStateExceptions.</p>
    *
    * <p>It is imperative that you code shutdown hooks defensively, as you
    * do not want to deadlock, and have no idea what other hooks will be
    * running concurrently. It is also a good idea to finish quickly, as the
-   * virtual machine really wants to shut down!
+   * virtual machine really wants to shut down!</p>
    *
    * <p>There are no guarantees that such hooks will run, as there are ways
    * to forcibly kill a process. But in such a drastic case, shutdown hooks
-   * would do little for you in the first place.
+   * would do little for you in the first place.</p>
    *
    * @param hook an initialized, unstarted Thread
    * @throws IllegalArgumentException if the hook is already registered or run
@@ -334,7 +335,7 @@
   /**
    * De-register a shutdown hook. As when you registered it, there is a
    * security check to remove hooks,
-   * <code>RuntimePermission("shutdownHooks")<code>.
+   * <code>RuntimePermission("shutdownHooks")</code>.
    *
    * @param hook the hook to remove
    * @return true if the hook was successfully removed, false if it was not
@@ -408,7 +409,7 @@
 
   /**
    * Create a new subprocess with the specified command line. Calls
-   * <code>exec(cmdline, null, null)<code>. A security check is performed,
+   * <code>exec(cmdline, null, null)</code>. A security check is performed,
    * <code>checkExec</code>.
    *
    * @param cmdline the command to call
@@ -635,9 +636,11 @@
    * <code>System.mapLibraryName(libname)</code>. There may be a security
    * check, of <code>checkLink</code>.
    *
-   * @param filename the file to load
+   * @param libname the library to load
+   *
    * @throws SecurityException if permission is denied
    * @throws UnsatisfiedLinkError if the library is not found
+   *
    * @see System#mapLibraryName(String)
    * @see ClassLoader#findLibrary(String)
    */
Index: java/lang/RuntimePermission.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/RuntimePermission.java,v
retrieving revision 1.4
diff -u -r1.4 RuntimePermission.java
--- java/lang/RuntimePermission.java	15 Jun 2002 19:45:31 -0000	1.4
+++ java/lang/RuntimePermission.java	20 Apr 2004 12:01:19 -0000
@@ -118,7 +118,7 @@
  *       access to in the system</td>
  *   <td>rogue code can stop arbitrary threads</td></tr>
  * <tr>
- *   <td><code>modifyThreadGroup</td>
+ *   <td><code>modifyThreadGroup</code></td>
  *   <td>allows the application to modify thread groups using any of the
  *       methods <code>destroy</code>, <code>resume</code>,
  *       <code>setDaemon</code>, <code>setMaxPriority</code>,
@@ -141,7 +141,7 @@
  *   <td>rogue code can write files, including viruses, and can modify the
  *       virtual machine binary; if not just fill up the disk</td></tr>
  * <tr>
- *   <td><code>loadLibrary.<code><em>library name</em></td>
+ *   <td><code>loadLibrary.</code><em>library name</em></td>
  *   <td>dynamic linking of the named library</td>
  *   <td>native code can bypass many security checks of pure Java</td></tr>
  * <tr>
Index: java/lang/SecurityManager.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/SecurityManager.java,v
retrieving revision 1.10
diff -u -r1.10 SecurityManager.java
--- java/lang/SecurityManager.java	1 Apr 2004 19:15:05 -0000	1.10
+++ java/lang/SecurityManager.java	20 Apr 2004 12:01:20 -0000
@@ -86,7 +86,7 @@
  * // now, in worker thread
  * if (sm != null)
  *   sm.checkPermission(permission, context);
- * <pre>
+ * </pre>
  *
  * <p>Permissions fall into these categories: File, Socket, Net, Security,
  * Runtime, Property, AWT, Reflect, and Serializable. Each of these
@@ -174,13 +174,15 @@
    * Find the ClassLoader of the first non-system class on the execution
    * stack. A non-system class is one whose ClassLoader is not equal to
    * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
-   * will return null in three cases:<br><nl>
+   * will return null in three cases:
+   *
+   * <ul>
    * <li>All methods on the stack are from system classes</li>
    * <li>All methods on the stack up to the first "privileged" caller, as
    *  created by {@link AccessController.doPrivileged(PrivilegedAction)},
    *  are from system classes</li>
    * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
-   * </nl>
+   * </ul>
    * 
    * @return the most recent non-system ClassLoader on the execution stack
    * @deprecated use {@link #checkPermission(Permission)} instead
@@ -194,13 +196,15 @@
    * Find the first non-system class on the execution stack. A non-system
    * class is one whose ClassLoader is not equal to
    * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
-   * will return null in three cases:<br><nl>
+   * will return null in three cases:
+   *
+   * <ul>
    * <li>All methods on the stack are from system classes</li>
    * <li>All methods on the stack up to the first "privileged" caller, as
    *  created by {@link AccessController.doPrivileged(PrivilegedAction)},
    *  are from system classes</li>
    * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
-   * </nl>
+   * </ul>
    * 
    * @return the most recent non-system Class on the execution stack
    * @deprecated use {@link #checkPermission(Permission)} instead
@@ -231,13 +235,15 @@
    * Get the depth on the execution stack of the most recent non-system class.
    * A non-system class is one whose ClassLoader is not equal to
    * {@link ClassLoader#getSystemClassLoader()} or its ancestors. This
-   * will return -1 in three cases:<br><nl>
+   * will return -1 in three cases:
+   *
+   * <ul>
    * <li>All methods on the stack are from system classes</li>
    * <li>All methods on the stack up to the first "privileged" caller, as
    *  created by {@link AccessController.doPrivileged(PrivilegedAction)},
    *  are from system classes</li>
    * <li>A check of <code>java.security.AllPermission</code> succeeds.</li>
-   * </nl>
+   * </ul>
    * 
    * @return the index of the most recent non-system Class on the stack
    * @deprecated use {@link #checkPermission(Permission)} instead
@@ -365,8 +371,8 @@
    * Check if the current thread is allowed to modify another Thread. This is
    * called by Thread.stop(), suspend(), resume(), interrupt(), destroy(),
    * setPriority(), setName(), and setDaemon(). The default implementation
-   * checks <code>RuntimePermission("modifyThread") on system threads (ie.
-   * threads in ThreadGroup with a null parent), and returns silently on
+   * checks <code>RuntimePermission("modifyThread")</code> on system threads
+   * (ie. threads in ThreadGroup with a null parent), and returns silently on
    * other threads.
    *
    * <p>If you override this, you must do two things. First, call
@@ -375,9 +381,9 @@
    * <code>RuntimePermission("modifyThread")</code>, return silently, so that
    * core classes (the Classpath library!) can modify any thread.
    *
-   * @param t the other Thread to check
+   * @param thread the other Thread to check
    * @throws SecurityException if permission is denied
-   * @throws NullPointerException if t is null
+   * @throws NullPointerException if thread is null
    * @see Thread#stop()
    * @see Thread#suspend()
    * @see Thread#resume()
@@ -385,9 +391,10 @@
    * @see Thread#setName(String)
    * @see Thread#setDaemon(boolean)
    */
-  public void checkAccess(Thread t)
+  public void checkAccess(Thread thread)
   {
-    if (t.group != null && t.group.getParent() != null)
+    if (thread.getThreadGroup() != null 
+	&& thread.getThreadGroup().getParent() != null)
       checkPermission(new RuntimePermission("modifyThread"));
   }
 
@@ -397,8 +404,8 @@
    * ThreadGroup.ThreadGroup() (to add this ThreadGroup to a parent),
    * ThreadGroup.stop(), suspend(), resume(), interrupt(), destroy(),
    * setDaemon(), and setMaxPriority(). The default implementation
-   * checks <code>RuntimePermission("modifyThread") on the system group (ie.
-   * the one with a null parent), and returns silently on other groups.
+   * checks <code>RuntimePermission("modifyThread")</code> on the system group
+   * (ie. the one with a null parent), and returns silently on other groups.
    *
    * <p>If you override this, you must do two things. First, call
    * <code>super.checkAccess(t)</code>, to make sure you are not relaxing
@@ -650,13 +657,15 @@
    * @param host the host to connect to
    * @param port the port to connect on
    * @param context the context to determine access for
+   *
    * @throws SecurityException if permission is denied, or if context is
    *         not an AccessControlContext
    * @throws NullPointerException if host is null
+   *
    * @see #getSecurityContext()
    * @see AccessControlContext#checkPermission(Permission)
    */
-  public void checkConnect(String host, int port, Object securityContext)
+  public void checkConnect(String host, int port, Object context)
   {
     // XXX Should be:
     // if (! (context instanceof AccessControlContext))
@@ -775,9 +784,12 @@
    * you override this, call <code>super.checkPropertyAccess</code> rather
    * than throwing an exception.
    *
+   * @param key the key of the property to check
+   *
    * @throws SecurityException if permission is denied
    * @throws NullPointerException if key is null
    * @throws IllegalArgumentException if key is ""
+   *
    * @see System#getProperty(String)
    */
   public void checkPropertyAccess(String key)
Index: java/lang/Short.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Short.java,v
retrieving revision 1.9
diff -u -r1.9 Short.java
--- java/lang/Short.java	15 Jun 2002 19:45:31 -0000	1.9
+++ java/lang/Short.java	20 Apr 2004 12:01:20 -0000
@@ -60,13 +60,13 @@
 
   /**
    * The minimum value a <code>short</code> can represent is -32768 (or
-   * -2<sup>15</sup).
+   * -2<sup>15</sup>).
    */
   public static final short MIN_VALUE = -32768;
 
   /**
    * The minimum value a <code>short</code> can represent is 32767 (or
-   * 2<sup>15</sup).
+   * 2<sup>15</sup>).
    */
   public static final short MAX_VALUE = 32767;
 
@@ -144,7 +144,7 @@
    *
    * @param s the <code>String</code> to convert
    * @param radix the radix (base) to use in the conversion
-   * @return the <code>String</code> argument converted to </code>short</code>
+   * @return the <code>String</code> argument converted to <code>short</code>
    * @throws NumberFormatException if <code>s</code> cannot be parsed as a
    *         <code>short</code>
    */
Index: java/lang/StringBuffer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/StringBuffer.java,v
retrieving revision 1.19
diff -u -r1.19 StringBuffer.java
--- java/lang/StringBuffer.java	25 Feb 2004 19:52:58 -0000	1.19
+++ java/lang/StringBuffer.java	20 Apr 2004 12:01:20 -0000
@@ -396,7 +396,7 @@
   /**
    * Append the <code>char</code> to this <code>StringBuffer</code>.
    *
-   * @param c the <code>char</code> to append
+   * @param ch the <code>char</code> to append
    * @return this <code>StringBuffer</code>
    */
   public synchronized StringBuffer append(char ch)
Index: java/lang/System.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/System.java,v
retrieving revision 1.14
diff -u -r1.14 System.java
--- java/lang/System.java	24 Sep 2003 01:56:56 -0000	1.14
+++ java/lang/System.java	20 Apr 2004 12:01:20 -0000
@@ -310,51 +310,53 @@
    *
    * <p>The required properties include:
    * <dl>
-   * <dt>java.version         <dd>Java version number
-   * <dt>java.vendor          <dd>Java vendor specific string
-   * <dt>java.vendor.url      <dd>Java vendor URL
-   * <dt>java.home            <dd>Java installation directory
-   * <dt>java.vm.specification.version <dd>VM Spec version
-   * <dt>java.vm.specification.vendor  <dd>VM Spec vendor
-   * <dt>java.vm.specification.name    <dd>VM Spec name
-   * <dt>java.vm.version      <dd>VM implementation version
-   * <dt>java.vm.vendor       <dd>VM implementation vendor
-   * <dt>java.vm.name         <dd>VM implementation name
-   * <dt>java.specification.version    <dd>Java Runtime Environment version
-   * <dt>java.specification.vendor     <dd>Java Runtime Environment vendor
-   * <dt>java.specification.name       <dd>Java Runtime Environment name
-   * <dt>java.class.version   <dd>Java class version number
-   * <dt>java.class.path      <dd>Java classpath
-   * <dt>java.library.path    <dd>Path for finding Java libraries
-   * <dt>java.io.tmpdir       <dd>Default temp file path
-   * <dt>java.compiler        <dd>Name of JIT to use
-   * <dt>java.ext.dirs        <dd>Java extension path
-   * <dt>os.name              <dd>Operating System Name
-   * <dt>os.arch              <dd>Operating System Architecture
-   * <dt>os.version           <dd>Operating System Version
-   * <dt>file.separator       <dd>File separator ("/" on Unix)
-   * <dt>path.separator       <dd>Path separator (":" on Unix)
-   * <dt>line.separator       <dd>Line separator ("\n" on Unix)
-   * <dt>user.name            <dd>User account name
-   * <dt>user.home            <dd>User home directory
-   * <dt>user.dir             <dd>User's current working directory
+   * <dt>java.version</dt>         <dd>Java version number</dd>
+   * <dt>java.vendor</dt>          <dd>Java vendor specific string</dd>
+   * <dt>java.vendor.url</dt>      <dd>Java vendor URL</dd>
+   * <dt>java.home</dt>            <dd>Java installation directory</dd>
+   * <dt>java.vm.specification.version</dt> <dd>VM Spec version</dd>
+   * <dt>java.vm.specification.vendor</dt>  <dd>VM Spec vendor</dd>
+   * <dt>java.vm.specification.name</dt>    <dd>VM Spec name</dd>
+   * <dt>java.vm.version</dt>      <dd>VM implementation version</dd>
+   * <dt>java.vm.vendor</dt>       <dd>VM implementation vendor</dd>
+   * <dt>java.vm.name</dt>         <dd>VM implementation name</dd>
+   * <dt>java.specification.version</dt>    <dd>Java Runtime Environment version</dd>
+   * <dt>java.specification.vendor</dt>     <dd>Java Runtime Environment vendor</dd>
+   * <dt>java.specification.name</dt>       <dd>Java Runtime Environment name</dd>
+   * <dt>java.class.version</dt>   <dd>Java class version number</dd>
+   * <dt>java.class.path</dt>      <dd>Java classpath</dd>
+   * <dt>java.library.path</dt>    <dd>Path for finding Java libraries</dd>
+   * <dt>java.io.tmpdir</dt>       <dd>Default temp file path</dd>
+   * <dt>java.compiler</dt>        <dd>Name of JIT to use</dd>
+   * <dt>java.ext.dirs</dt>        <dd>Java extension path</dd>
+   * <dt>os.name</dt>              <dd>Operating System Name</dd>
+   * <dt>os.arch</dt>              <dd>Operating System Architecture</dd>
+   * <dt>os.version</dt>           <dd>Operating System Version</dd>
+   * <dt>file.separator</dt>       <dd>File separator ("/" on Unix)</dd>
+   * <dt>path.separator</dt>       <dd>Path separator (":" on Unix)</dd>
+   * <dt>line.separator</dt>       <dd>Line separator ("\n" on Unix)</dd>
+   * <dt>user.name</dt>            <dd>User account name</dd>
+   * <dt>user.home</dt>            <dd>User home directory</dd>
+   * <dt>user.dir</dt>             <dd>User's current working directory</dd>
    * </dl>
    *
    * In addition, gnu defines several other properties, where ? stands for
    * each character in '0' through '9':
    * <dl>
-   * <dl> gnu.classpath.vm.shortname <dd> Succinct version of the VM name;
-   *      used for finding property files in file system
-   * <dl> gnu.classpath.home.url <dd> Base URL; used for finding
-   *      property files in file system
-   * <dt> gnu.cpu.endian      <dd>big or little
-   * <dt> gnu.java.io.encoding_scheme_alias.ISO-8859-?   <dd>8859_?
-   * <dt> gnu.java.io.encoding_scheme_alias.iso-8859-?   <dd>8859_?
-   * <dt> gnu.java.io.encoding_scheme_alias.iso8859_?    <dd>8859_?
-   * <dt> gnu.java.io.encoding_scheme_alias.iso-latin-_? <dd>8859_?
-   * <dt> gnu.java.io.encoding_scheme_alias.latin?       <dd>8859_?
-   * <dt> gnu.java.io.encoding_scheme_alias.UTF-8        <dd>UTF8
-   * <dt> gnu.java.io.encoding_scheme_alias.utf-8        <dd>UTF8
+   * <dt>gnu.classpath.home</dt>         <dd>Path to the classpath libraries.</dd>
+   * <dt>gnu.classpath.version</dt>      <dd>Version of the classpath libraries.</dd>
+   * <dt>gnu.classpath.vm.shortname</dt> <dd>Succinct version of the VM name;
+   *     used for finding property files in file system</dd>
+   * <dt>gnu.classpath.home.url</dt>     <dd> Base URL; used for finding
+   *     property files in file system</dd>
+   * <dt>gnu.cpu.endian</dt>             <dd>big or little</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.ISO-8859-?</dt>   <dd>8859_?</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.iso-8859-?</dt>   <dd>8859_?</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.iso8859_?</dt>    <dd>8859_?</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.iso-latin-_?</dt> <dd>8859_?</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.latin?</dt>       <dd>8859_?</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.UTF-8</dt>        <dd>UTF8</dd>
+   * <dt>gnu.java.io.encoding_scheme_alias.utf-8</dt>        <dd>UTF8</dd>
    * </dl>
    *
    * @return the system properties, will never be null
Index: java/lang/ThreadGroup.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/ThreadGroup.java,v
retrieving revision 1.18
diff -u -r1.18 ThreadGroup.java
--- java/lang/ThreadGroup.java	19 Mar 2004 22:59:51 -0000	1.18
+++ java/lang/ThreadGroup.java	20 Apr 2004 12:01:21 -0000
@@ -238,16 +238,16 @@
    * Check whether this ThreadGroup is an ancestor of the specified
    * ThreadGroup, or if they are the same.
    *
-   * @param g the group to test on
+   * @param group the group to test on
    * @return whether this ThreadGroup is a parent of the specified group
    */
-  public final boolean parentOf(ThreadGroup tg)
+  public final boolean parentOf(ThreadGroup group)
   {
-    while (tg != null)
+    while (group != null)
       {
-        if (tg == this)
+        if (group == this)
           return true;
-        tg = tg.parent;
+        group = group.parent;
       }
     return false;
   }
@@ -535,7 +535,7 @@
    * manner.
    *
    * @param thread the thread that exited
-   * @param exception the uncaught exception
+   * @param t the uncaught throwable
    * @throws NullPointerException if t is null
    * @see ThreadDeath
    * @see System#err
Index: java/lang/Throwable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/Throwable.java,v
retrieving revision 1.14
diff -u -r1.14 Throwable.java
--- java/lang/Throwable.java	4 Oct 2002 16:47:36 -0000	1.14
+++ java/lang/Throwable.java	20 Apr 2004 12:01:21 -0000
@@ -392,7 +392,7 @@
    * then a line starting with three spaces and the string "... X more" is
    * printed, where X is the number of remaining stackframes.
    *
-   * @param w the PrintWriter to write the trace to
+   * @param pw the PrintWriter to write the trace to
    * @since 1.1
    */
   public void printStackTrace (PrintWriter pw)
Index: java/lang/reflect/InvocationHandler.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/reflect/InvocationHandler.java,v
retrieving revision 1.1
diff -u -r1.1 InvocationHandler.java
--- java/lang/reflect/InvocationHandler.java	30 Sep 2002 05:19:09 -0000	1.1
+++ java/lang/reflect/InvocationHandler.java	20 Apr 2004 12:01:21 -0000
@@ -49,37 +49,38 @@
  * interface.  But in order for the proxy instance to do any good, it
  * needs to know what to do when interface methods are invoked!  So,
  * this interface is basically a cool wrapper that provides runtime
- * code generation needed by proxy instances.<p>
+ * code generation needed by proxy instances.
  *
- * While this interface was designed for use by Proxy, it will also
- * work on any object in general.<p>
+ * <p>While this interface was designed for use by Proxy, it will also
+ * work on any object in general.</p>
  *
- * Hints for implementing this class:<br>
+ * <p>Hints for implementing this class:</p>
+ * 
  * <ul>
- *  <li>Don't forget that Object.equals, Object.hashCode, and
- *      Object.toString will call this handler.  In particular,
- *      a naive call to proxy.equals, proxy.hashCode, or proxy.toString
- *      will put you in an infinite loop.  And remember that string
- *      concatenation also invokes toString.</li>
- *  <li>Obey the contract of the Method object you are handling, or
- *      the proxy instance will be forced to throw a
- *      {@link NullPointerException}, {@link ClassCastException},
- *      or {@link UndeclaredThrowableException}.</li>
- *  <li>Be prepared to wrap/unwrap primitives as necessary.</li>
- *  <li>The Method object may be owned by a different interface than
- *      what was actually used as the qualifying type of the method
- *      invocation in the Java source code. This means that it might
- *      not always be safe to throw an exception listed as belonging
- *      to the method's throws clause.</li>
+ * <li>Don't forget that Object.equals, Object.hashCode, and
+ *     Object.toString will call this handler.  In particular,
+ *     a naive call to proxy.equals, proxy.hashCode, or proxy.toString
+ *     will put you in an infinite loop.  And remember that string
+ *     concatenation also invokes toString.</li>
+ * <li>Obey the contract of the Method object you are handling, or
+ *     the proxy instance will be forced to throw a
+ *     {@link NullPointerException}, {@link ClassCastException},
+ *     or {@link UndeclaredThrowableException}.</li>
+ * <li>Be prepared to wrap/unwrap primitives as necessary.</li>
+ * <li>The Method object may be owned by a different interface than
+ *     what was actually used as the qualifying type of the method
+ *     invocation in the Java source code. This means that it might
+ *     not always be safe to throw an exception listed as belonging
+ *     to the method's throws clause.</li>
  * </ul>
  *
  * <p><small>For a fun time, create an InvocationHandler that handles the
- * methods of a proxy instance of the InvocationHandler interface!</small>
+ * methods of a proxy instance of the InvocationHandler interface!</small></p>
  *
  * @see Proxy
  * @see UndeclaredThrowableException
  *
- * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Eric Blake (ebb9@email.byu.edu)
  * @since 1.3
  * @status updated to 1.4
  */
Index: java/lang/reflect/Proxy.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/reflect/Proxy.java,v
retrieving revision 1.6
diff -u -r1.6 Proxy.java
--- java/lang/reflect/Proxy.java	25 Sep 2003 20:46:14 -0000	1.6
+++ java/lang/reflect/Proxy.java	20 Apr 2004 12:01:22 -0000
@@ -211,35 +211,36 @@
    * Returns the proxy {@link Class} for the given ClassLoader and array
    * of interfaces, dynamically generating it if necessary.
    *
-   * There are several restrictions on this method, the violation of
+   * <p>There are several restrictions on this method, the violation of
    * which will result in an IllegalArgumentException or
-   * NullPointerException:
+   * NullPointerException:</p>
+   * 
    * <ul>
-   *  <li>All objects in `interfaces' must represent distinct interfaces.
-   *      Classes, primitive types, null, and duplicates are forbidden.</li>
-   *  <li>The interfaces must be visible in the specified ClassLoader.
-   *      In other words, for each interface i:
-   *      <code>Class.forName(i.getName(), false, loader) == i</code>
-   *      must be true.</li>
-   *  <li>All non-public interfaces (if any) must reside in the same
-   *      package, or the proxy class would be non-instantiable.  If
-   *      there are no non-public interfaces, the package of the proxy
-   *      class is unspecified.</li>
-   *  <li>All interfaces must be compatible - if two declare a method
-   *      with the same name and parameters, the return type must be
-   *      the same and the throws clause of the proxy class will be
-   *      the maximal subset of subclasses of the throws clauses for
-   *      each method that is overridden.</li>
-   *  <li>VM constraints limit the number of interfaces a proxy class
-   *      may directly implement (however, the indirect inheritance
-   *      of {@link Serializable} does not count against this limit).
-   *      Even though most VMs can theoretically have 65535
-   *      superinterfaces for a class, the actual limit is smaller
-   *      because a class's constant pool is limited to 65535 entries,
-   *      and not all entries can be interfaces.</li>
-   * </ul><p>
+   * <li>All objects in `interfaces' must represent distinct interfaces.
+   *     Classes, primitive types, null, and duplicates are forbidden.</li>
+   * <li>The interfaces must be visible in the specified ClassLoader.
+   *     In other words, for each interface i:
+   *     <code>Class.forName(i.getName(), false, loader) == i</code>
+   *     must be true.</li>
+   * <li>All non-public interfaces (if any) must reside in the same
+   *     package, or the proxy class would be non-instantiable.  If
+   *     there are no non-public interfaces, the package of the proxy
+   *     class is unspecified.</li>
+   * <li>All interfaces must be compatible - if two declare a method
+   *     with the same name and parameters, the return type must be
+   *     the same and the throws clause of the proxy class will be
+   *     the maximal subset of subclasses of the throws clauses for
+   *     each method that is overridden.</li>
+   * <li>VM constraints limit the number of interfaces a proxy class
+   *     may directly implement (however, the indirect inheritance
+   *     of {@link Serializable} does not count against this limit).
+   *     Even though most VMs can theoretically have 65535
+   *     superinterfaces for a class, the actual limit is smaller
+   *     because a class's constant pool is limited to 65535 entries,
+   *     and not all entries can be interfaces.</li>
+   * </ul>
    *
-   * Note that different orders of interfaces produce distinct classes.
+   * <p>Note that different orders of interfaces produce distinct classes.</p>
    *
    * @param loader the class loader to define the proxy class in; null
    *        implies the bootstrap class loader

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]