# HG changeset patch # User bpb # Date 1372896494 25200 # Node ID 62d512966daa497b26b3c9db4193142ffd8b1403 # Parent a4920823759920d548b3b09e64cd8d44178f1ace 8019862: Fix doclint errors in java.lang.*. Summary: Fix doclint errors in java.lang.* Reviewed-by: darcy Contributed-by: Brian Burkhalter diff --git a/src/share/classes/java/lang/CharSequence.java b/src/share/classes/java/lang/CharSequence.java --- a/src/share/classes/java/lang/CharSequence.java +++ b/src/share/classes/java/lang/CharSequence.java @@ -60,7 +60,7 @@ /** * Returns the length of this character sequence. The length is the number - * of 16-bit chars in the sequence.

+ * of 16-bit chars in the sequence. * * @return the number of chars in this sequence */ @@ -70,7 +70,7 @@ * Returns the char value at the specified index. An index ranges from zero * to length() - 1. The first char value of the sequence is at * index zero, the next at index one, and so on, as for array - * indexing.

+ * indexing. * *

If the char value specified by the index is a * surrogate, the surrogate @@ -92,7 +92,7 @@ * ends with the char value at index end - 1. The length * (in chars) of the * returned sequence is end - start, so if start == end - * then an empty sequence is returned.

+ * then an empty sequence is returned. * * @param start the start index, inclusive * @param end the end index, exclusive @@ -109,7 +109,7 @@ /** * Returns a string containing the characters in this sequence in the same * order as this sequence. The length of the string will be the length of - * this sequence.

+ * this sequence. * * @return a string consisting of exactly this sequence of characters */ diff --git a/src/share/classes/java/lang/Character.java b/src/share/classes/java/lang/Character.java --- a/src/share/classes/java/lang/Character.java +++ b/src/share/classes/java/lang/Character.java @@ -54,7 +54,7 @@ *
  • http://www.unicode.org * * - *

    Unicode Character Representations

    + *

    Unicode Character Representations

    * *

    The {@code char} data type (and therefore the value that a * {@code Character} object encapsulates) are based on the @@ -68,7 +68,7 @@ * definition of the U+n notation in the Unicode * Standard.) * - *

    The set of characters from U+0000 to U+FFFF is + *

    The set of characters from U+0000 to U+FFFF is * sometimes referred to as the Basic Multilingual Plane (BMP). * Characters whose code points are greater * than U+FFFF are called supplementary characters. The Java @@ -4599,6 +4599,7 @@ * * @since 1.8 * + * @param value The {@code char} for which to return a hash code. * @return a hash code value for a {@code char} value. */ public static int hashCode(char value) { @@ -6637,7 +6638,7 @@ * Determines if the specified character is ISO-LATIN-1 white space. * This method returns {@code true} for the following five * characters only: - * + *
    * * * @@ -7174,6 +7175,7 @@ * Returns the value obtained by reversing the order of the bytes in the * specified char value. * + * @param ch The {@code char} of which to reverse the byte order. * @return the value obtained by reversing (or, equivalently, swapping) * the bytes in the specified char value. * @since 1.5 diff --git a/src/share/classes/java/lang/ClassLoader.java b/src/share/classes/java/lang/ClassLoader.java --- a/src/share/classes/java/lang/ClassLoader.java +++ b/src/share/classes/java/lang/ClassLoader.java @@ -157,7 +157,7 @@ * } * * - *

    Binary names

    + *

    Binary names

    * *

    Any class name provided as a {@link String} parameter to methods in * ClassLoader must be a binary name as defined by @@ -342,7 +342,7 @@ * #loadClass(String, boolean)} method. It is invoked by the Java virtual * machine to resolve class references. Invoking this method is equivalent * to invoking {@link #loadClass(String, boolean) loadClass(name, - * false)}.

    + * false)}. * * @param name * The binary name of the class @@ -441,7 +441,7 @@ * behaves as follows. If this ClassLoader object is registered as * parallel capable, the method returns a dedicated object associated * with the specified class name. Otherwise, the method returns this - * ClassLoader object.

    + * ClassLoader object. * * @param className * The name of the to-be-loaded class @@ -506,7 +506,7 @@ * follow the delegation model for loading classes, and will be invoked by * the {@link #loadClass loadClass} method after checking the * parent class loader for the requested class. The default implementation - * throws a ClassNotFoundException.

    + * throws a ClassNotFoundException. * * @param name * The binary name of the class @@ -772,16 +772,16 @@ * bBuffer,pd) yields exactly the same * result as the statements * - *
    + *

    * ...
    - * byte[] temp = new byte[
    bBuffer.{@link + * byte[] temp = new byte[bBuffer.{@link * java.nio.ByteBuffer#remaining remaining}()];
    - *
    bBuffer.{@link java.nio.ByteBuffer#get(byte[]) + * bBuffer.{@link java.nio.ByteBuffer#get(byte[]) * get}(temp);
    * return {@link #defineClass(String, byte[], int, int, ProtectionDomain) - *
    cl.defineClass}(name, temp, 0, - * temp.length, pd);
    - *

    + * cl.defineClass}(name, temp, 0, + * temp.length, pd);
    + *

    * * @param name * The expected binary name. of the class, or @@ -940,7 +940,6 @@ * already been linked, then this method simply returns. Otherwise, the * class is linked as described in the "Execution" chapter of * The Java™ Language Specification. - *

    * * @param c * The class to link @@ -1012,7 +1011,7 @@ * Returns the class with the given binary name if this * loader has been recorded by the Java virtual machine as an initiating * loader of a class with that binary name. Otherwise - * null is returned.

    + * null is returned. * * @param name * The binary name of the class @@ -1032,7 +1031,7 @@ /** * Sets the signers of a class. This should be invoked after defining a - * class.

    + * class. * * @param c * The Class object @@ -1125,7 +1124,7 @@ /** * Finds the resource with the given name. Class loader implementations - * should override this method to specify where to find resources.

    + * should override this method to specify where to find resources. * * @param name * The resource name @@ -1143,7 +1142,7 @@ * Returns an enumeration of {@link java.net.URL URL} objects * representing all the resources with the given name. Class loader * implementations should override this method to specify where to load - * resources from.

    + * resources from. * * @param name * The resource name @@ -1161,14 +1160,16 @@ } /** - * Registers the caller as parallel capable.

    + * Registers the caller as parallel capable. * The registration succeeds if and only if all of the following - * conditions are met:
    - * 1. no instance of the caller has been created

    - * 2. all of the super classes (except class Object) of the caller are - * registered as parallel capable

    - * Note that once a class loader is registered as parallel capable, there - * is no way to change it back.

    + * conditions are met: + *
      + *
    1. no instance of the caller has been created
    2. + *
    3. all of the super classes (except class Object) of the caller are + * registered as parallel capable
    4. + *
    + *

    Note that once a class loader is registered as parallel capable, there + * is no way to change it back.

    * * @return true if the caller is successfully registered as * parallel capable and false if otherwise. @@ -1185,7 +1186,7 @@ /** * Find a resource of the specified name from the search path used to load * classes. This method locates the resource through the system class - * loader (see {@link #getSystemClassLoader()}).

    + * loader (see {@link #getSystemClassLoader()}). * * @param name * The resource name @@ -1292,7 +1293,7 @@ /** * Open for reading, a resource of the specified name from the search path * used to load classes. This method locates the resource through the - * system class loader (see {@link #getSystemClassLoader()}).

    + * system class loader (see {@link #getSystemClassLoader()}). * * @param name * The resource name @@ -1515,7 +1516,7 @@ * class loaders to define the packages for their classes. Packages must * be created before the class is defined, and package names must be * unique within a class loader and cannot be redefined or changed once - * created.

    + * created. * * @param name * The package name @@ -1572,7 +1573,7 @@ /** * Returns a Package that has been defined by this class loader - * or any of its ancestors.

    + * or any of its ancestors. * * @param name * The package name @@ -1609,7 +1610,7 @@ /** * Returns all of the Packages defined by this class loader and - * its ancestors.

    + * its ancestors. * * @return The array of Package objects defined by this * ClassLoader @@ -1646,7 +1647,7 @@ * method to locate the native libraries that belong to classes loaded with * this class loader. If this method returns null, the VM * searches the library along the path specified as the - * "java.library.path" property.

    + * "java.library.path" property. * * @param libname * The library name @@ -1966,7 +1967,7 @@ * in the future will have assertions enabled or disabled by default. * This setting may be overridden on a per-package or per-class basis by * invoking {@link #setPackageAssertionStatus(String, boolean)} or {@link - * #setClassAssertionStatus(String, boolean)}.

    + * #setClassAssertionStatus(String, boolean)}. * * @param enabled * true if classes loaded by this class loader will @@ -2068,7 +2069,6 @@ * status settings associated with the class loader. This method is * provided so that class loaders can be made to ignore any command line or * persistent assertion status settings and "start with a clean slate." - *

    * * @since 1.4 */ diff --git a/src/share/classes/java/lang/Double.java b/src/share/classes/java/lang/Double.java --- a/src/share/classes/java/lang/Double.java +++ b/src/share/classes/java/lang/Double.java @@ -256,7 +256,7 @@ * * *
    {@code '\t'} {@code U+0009}{@code HORIZONTAL TABULATION}
    {@code '\n'} {@code U+000A}
    - * + * * * * diff --git a/src/share/classes/java/lang/Float.java b/src/share/classes/java/lang/Float.java --- a/src/share/classes/java/lang/Float.java +++ b/src/share/classes/java/lang/Float.java @@ -258,7 +258,7 @@ * * *

    Examples

    Examples
    Floating-point ValueHexadecimal String
    {@code 1.0} {@code 0x1.0p0}
    {@code -1.0} {@code -0x1.0p0}
    - * + * * * * diff --git a/src/share/classes/java/lang/ProcessBuilder.java b/src/share/classes/java/lang/ProcessBuilder.java --- a/src/share/classes/java/lang/ProcessBuilder.java +++ b/src/share/classes/java/lang/ProcessBuilder.java @@ -65,7 +65,7 @@ * working directory of the current process, usually the directory * named by the system property {@code user.dir}. * - *
  • a source of standard input. + *
  • a source of standard input. * By default, the subprocess reads input from a pipe. Java code * can access this pipe via the output stream returned by * {@link Process#getOutputStream()}. However, standard input may @@ -81,7 +81,7 @@ * * *
  • a destination for standard output - * and standard error. By default, the subprocess writes standard + * and standard error. By default, the subprocess writes standard * output and standard error to pipes. Java code can access these pipes * via the input streams returned by {@link Process#getInputStream()} and * {@link Process#getErrorStream()}. However, standard output and @@ -554,6 +554,7 @@ * Redirect.from(file).type() == Redirect.Type.READ * } * + * @param file The {@code File} for the {@code Redirect}. * @throws NullPointerException if the specified file is null * @return a redirect to read from the specified file */ @@ -580,6 +581,7 @@ * Redirect.to(file).type() == Redirect.Type.WRITE * } * + * @param file The {@code File} for the {@code Redirect}. * @throws NullPointerException if the specified file is null * @return a redirect to write to the specified file */ @@ -610,6 +612,7 @@ * Redirect.appendTo(file).type() == Redirect.Type.APPEND * } * + * @param file The {@code File} for the {@code Redirect}. * @throws NullPointerException if the specified file is null * @return a redirect to append to the specified file */ diff --git a/src/share/classes/java/lang/Runtime.java b/src/share/classes/java/lang/Runtime.java --- a/src/share/classes/java/lang/Runtime.java +++ b/src/share/classes/java/lang/Runtime.java @@ -661,7 +661,7 @@ /** * Returns the maximum amount of memory that the Java virtual machine will * attempt to use. If there is no inherent limit then the value {@link - * java.lang.Long#MAX_VALUE} will be returned.

    + * java.lang.Long#MAX_VALUE} will be returned. * * @return the maximum amount of memory that the virtual machine will * attempt to use, measured in bytes diff --git a/src/share/classes/java/lang/Thread.java b/src/share/classes/java/lang/Thread.java --- a/src/share/classes/java/lang/Thread.java +++ b/src/share/classes/java/lang/Thread.java @@ -865,8 +865,8 @@ * will receive an {@link InterruptedException}. * *

    If this thread is blocked in an I/O operation upon an {@link - * java.nio.channels.InterruptibleChannel interruptible - * channel} then the channel will be closed, the thread's interrupt + * java.nio.channels.InterruptibleChannel InterruptibleChannel} + * then the channel will be closed, the thread's interrupt * status will be set, and the thread will receive a {@link * java.nio.channels.ClosedByInterruptException}. * @@ -1883,6 +1883,7 @@ * there is no default. * @since 1.5 * @see #setDefaultUncaughtExceptionHandler + * @return the default uncaught exception handler for all threads */ public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler(){ return defaultUncaughtExceptionHandler; @@ -1895,6 +1896,7 @@ * ThreadGroup object is returned, unless this thread * has terminated, in which case null is returned. * @since 1.5 + * @return the uncaught exception handler for this thread */ public UncaughtExceptionHandler getUncaughtExceptionHandler() { return uncaughtExceptionHandler != null ? diff --git a/src/share/classes/java/lang/ThreadLocal.java b/src/share/classes/java/lang/ThreadLocal.java --- a/src/share/classes/java/lang/ThreadLocal.java +++ b/src/share/classes/java/lang/ThreadLocal.java @@ -131,12 +131,13 @@ * Creates a thread local variable. The initial value of the variable is * determined by invoking the {@code get} method on the {@code Supplier}. * + * @param the type of the thread local's value * @param supplier the supplier to be used to determine the initial value * @return a new thread local variable * @throws NullPointerException if the specified supplier is null * @since 1.8 */ - public static ThreadLocal withInitial(Supplier supplier) { + public static ThreadLocal withInitial(Supplier supplier) { return new SuppliedThreadLocal<>(supplier); }

  • Examples

    Examples
    Floating-point ValueHexadecimal String
    {@code 1.0} {@code 0x1.0p0}
    {@code -1.0} {@code -0x1.0p0}