From 321faa7346fbbb5c7e4ed317f0086ca89cd99547 Mon Sep 17 00:00:00 2001 From: Alexander Stepanov Date: Thu, 6 Aug 2015 13:20:13 +0300 Subject: [PATCH] 8132468: docs: replace tags (obsolete in html5) for java.io, java.lang, java.math Reviewed-by: lancea, dfuchs, smarks --- .../classes/java/io/BufferedOutputStream.java | 4 +- .../share/classes/java/io/BufferedReader.java | 2 +- .../share/classes/java/io/BufferedWriter.java | 6 +- .../classes/java/io/ByteArrayInputStream.java | 8 +- .../java/io/ByteArrayOutputStream.java | 36 +-- .../classes/java/io/CharArrayReader.java | 10 +- .../classes/java/io/CharArrayWriter.java | 31 +- .../share/classes/java/io/Console.java | 33 ++- .../java.base/share/classes/java/io/File.java | 205 ++++++------- .../classes/java/io/FileOutputStream.java | 2 +- .../share/classes/java/io/FileReader.java | 14 +- .../share/classes/java/io/FileWriter.java | 12 +- .../classes/java/io/FilterOutputStream.java | 6 +- .../share/classes/java/io/Flushable.java | 2 +- .../share/classes/java/io/IOError.java | 4 +- .../classes/java/io/LineNumberReader.java | 10 +- .../share/classes/java/io/OutputStream.java | 2 +- .../classes/java/io/OutputStreamWriter.java | 4 +- .../share/classes/java/io/PrintStream.java | 278 +++++++++--------- .../share/classes/java/io/PrintWriter.java | 234 ++++++++------- .../classes/java/io/RandomAccessFile.java | 72 ++--- .../share/classes/java/io/Reader.java | 4 +- .../share/classes/java/io/StringWriter.java | 48 +-- .../share/classes/java/io/Writer.java | 44 +-- .../share/classes/java/lang/Appendable.java | 42 +-- .../java/lang/ApplicationShutdownHooks.java | 2 +- .../java/lang/AssertionStatusDirectives.java | 42 +-- .../share/classes/java/lang/CharSequence.java | 44 +-- .../share/classes/java/lang/Character.java | 20 +- .../java/lang/ClassNotFoundException.java | 4 +- .../share/classes/java/lang/Cloneable.java | 4 +- .../share/classes/java/lang/Comparable.java | 73 ++--- .../lang/EnumConstantNotPresentException.java | 2 +- .../share/classes/java/lang/Exception.java | 8 +- .../java/lang/IllegalArgumentException.java | 8 +- .../java/lang/IllegalStateException.java | 8 +- .../java/lang/InheritableThreadLocal.java | 4 +- .../share/classes/java/lang/Readable.java | 4 +- .../classes/java/lang/RuntimeException.java | 8 +- .../classes/java/lang/RuntimePermission.java | 5 +- .../classes/java/lang/SecurityException.java | 16 +- .../share/classes/java/lang/String.java | 4 +- .../share/classes/java/lang/System.java | 4 +- .../share/classes/java/lang/Thread.java | 75 +++-- .../share/classes/java/lang/ThreadGroup.java | 2 +- .../java/lang/TypeNotPresentException.java | 6 +- .../lang/UnsupportedOperationException.java | 8 +- .../java/lang/annotation/Annotation.java | 46 +-- .../annotation/AnnotationFormatError.java | 16 +- .../AnnotationTypeMismatchException.java | 8 +- .../classes/java/lang/invoke/MethodType.java | 2 +- .../java/lang/ref/PhantomReference.java | 14 +- .../classes/java/lang/ref/ReferenceQueue.java | 8 +- .../classes/java/lang/ref/SoftReference.java | 8 +- .../classes/java/lang/ref/WeakReference.java | 2 +- .../java/lang/reflect/Constructor.java | 8 +- .../classes/java/lang/reflect/Method.java | 4 +- .../share/classes/java/math/BigDecimal.java | 64 ++-- .../share/classes/java/math/BigInteger.java | 16 +- .../share/classes/java/math/MathContext.java | 2 +- .../classes/java/math/MutableBigInteger.java | 2 +- 61 files changed, 845 insertions(+), 819 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java b/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java index a2cb25532ac..768872cdbb4 100644 --- a/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java @@ -42,8 +42,8 @@ public class BufferedOutputStream extends FilterOutputStream { /** * The number of valid bytes in the buffer. This value is always - * in the range 0 through buf.length; elements - * buf[0] through buf[count-1] contain valid + * in the range {@code 0} through {@code buf.length}; elements + * {@code buf[0]} through {@code buf[count-1]} contain valid * byte data. */ protected int count; diff --git a/jdk/src/java.base/share/classes/java/io/BufferedReader.java b/jdk/src/java.base/share/classes/java/io/BufferedReader.java index 38b32f27838..3940b3b8776 100644 --- a/jdk/src/java.base/share/classes/java/io/BufferedReader.java +++ b/jdk/src/java.base/share/classes/java/io/BufferedReader.java @@ -170,7 +170,7 @@ public class BufferedReader extends Reader { * Reads a single character. * * @return The character read, as an integer in the range - * 0 to 65535 (0x00-0xffff), or -1 if the + * 0 to 65535 ({@code 0x00-0xffff}), or -1 if the * end of the stream has been reached * @exception IOException If an I/O error occurs */ diff --git a/jdk/src/java.base/share/classes/java/io/BufferedWriter.java b/jdk/src/java.base/share/classes/java/io/BufferedWriter.java index 5755499b9ff..28e170fe800 100644 --- a/jdk/src/java.base/share/classes/java/io/BufferedWriter.java +++ b/jdk/src/java.base/share/classes/java/io/BufferedWriter.java @@ -34,7 +34,7 @@ package java.io; * The default is large enough for most purposes. * *

A newLine() method is provided, which uses the platform's own notion of - * line separator as defined by the system property line.separator. + * line separator as defined by the system property {@code line.separator}. * Not all platforms use the newline character ('\n') to terminate lines. * Calling this method to terminate each output line is therefore preferred to * writing a newline character directly. @@ -195,7 +195,7 @@ public class BufferedWriter extends Writer { /** * Writes a portion of a String. * - *

If the value of the len parameter is negative then no + *

If the value of the {@code len} parameter is negative then no * characters are written. This is contrary to the specification of this * method in the {@linkplain java.io.Writer#write(java.lang.String,int,int) * superclass}, which requires that an {@link IndexOutOfBoundsException} be @@ -225,7 +225,7 @@ public class BufferedWriter extends Writer { /** * Writes a line separator. The line separator string is defined by the - * system property line.separator, and is not necessarily a single + * system property {@code line.separator}, and is not necessarily a single * newline ('\n') character. * * @exception IOException If an I/O error occurs diff --git a/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java b/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java index 28fb1af3bda..99dd0287354 100644 --- a/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java @@ -32,9 +32,9 @@ package java.io; * counter keeps track of the next byte to * be supplied by the read method. *

- * Closing a ByteArrayInputStream has no effect. The methods in + * Closing a {@code ByteArrayInputStream} has no effect. The methods in * this class can be called after the stream has been closed without - * generating an IOException. + * generating an {@code IOException}. * * @author Arthur van Hoff * @see java.io.StringBufferInputStream @@ -272,9 +272,9 @@ class ByteArrayInputStream extends InputStream { } /** - * Closing a ByteArrayInputStream has no effect. The methods in + * Closing a {@code ByteArrayInputStream} has no effect. The methods in * this class can be called after the stream has been closed without - * generating an IOException. + * generating an {@code IOException}. */ public void close() throws IOException { } diff --git a/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java b/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java index 3d199579249..61a147d1c4d 100644 --- a/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java @@ -31,12 +31,12 @@ import java.util.Arrays; * This class implements an output stream in which the data is * written into a byte array. The buffer automatically grows as data * is written to it. - * The data can be retrieved using toByteArray() and - * toString(). + * The data can be retrieved using {@code toByteArray()} and + * {@code toString()}. *

- * Closing a ByteArrayOutputStream has no effect. The methods in + * Closing a {@code ByteArrayOutputStream} has no effect. The methods in * this class can be called after the stream has been closed without - * generating an IOException. + * generating an {@code IOException}. * * @author Arthur van Hoff * @since 1.0 @@ -138,8 +138,8 @@ public class ByteArrayOutputStream extends OutputStream { } /** - * Writes len bytes from the specified byte array - * starting at offset off to this byte array output stream. + * Writes {@code len} bytes from the specified byte array + * starting at offset {@code off} to this byte array output stream. * * @param b the data. * @param off the start offset in the data. @@ -158,7 +158,7 @@ public class ByteArrayOutputStream extends OutputStream { /** * Writes the complete contents of this byte array output stream to * the specified output stream argument, as if by calling the output - * stream's write method using out.write(buf, 0, count). + * stream's write method using {@code out.write(buf, 0, count)}. * * @param out the output stream to which to write the data. * @exception IOException if an I/O error occurs. @@ -168,7 +168,7 @@ public class ByteArrayOutputStream extends OutputStream { } /** - * Resets the count field of this byte array output + * Resets the {@code count} field of this byte array output * stream to zero, so that all currently accumulated output in the * output stream is discarded. The output stream can be used again, * reusing the already allocated buffer space. @@ -194,7 +194,7 @@ public class ByteArrayOutputStream extends OutputStream { /** * Returns the current size of the buffer. * - * @return the value of the count field, which is the number + * @return the value of the {@code count} field, which is the number * of valid bytes in this output stream. * @see java.io.ByteArrayOutputStream#count */ @@ -204,7 +204,7 @@ public class ByteArrayOutputStream extends OutputStream { /** * Converts the buffer's contents into a string decoding bytes using the - * platform's default character set. The length of the new String + * platform's default character set. The length of the new {@code String} * is a function of the character set, and hence may not be equal to the * size of the buffer. * @@ -224,7 +224,7 @@ public class ByteArrayOutputStream extends OutputStream { /** * Converts the buffer's contents into a string by decoding the bytes using * the named {@link java.nio.charset.Charset charset}. The length of the new - * String is a function of the charset, and hence may not be equal + * {@code String} is a function of the charset, and hence may not be equal * to the length of the byte array. * *

This method always replaces malformed-input and unmappable-character @@ -251,14 +251,14 @@ public class ByteArrayOutputStream extends OutputStream { * copied into it. Each character c in the resulting string is * constructed from the corresponding element b in the byte * array such that: - *

-     *     c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
-     * 
+ *
{@code
+     *     c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
+     * }
* * @deprecated This method does not properly convert bytes into characters. * As of JDK 1.1, the preferred way to do this is via the - * toString(String enc) method, which takes an encoding-name - * argument, or the toString() method, which uses the + * {@code toString(String enc)} method, which takes an encoding-name + * argument, or the {@code toString()} method, which uses the * platform's default character encoding. * * @param hibyte the high byte of each resulting Unicode character. @@ -273,9 +273,9 @@ public class ByteArrayOutputStream extends OutputStream { } /** - * Closing a ByteArrayOutputStream has no effect. The methods in + * Closing a {@code ByteArrayOutputStream} has no effect. The methods in * this class can be called after the stream has been closed without - * generating an IOException. + * generating an {@code IOException}. */ public void close() throws IOException { } diff --git a/jdk/src/java.base/share/classes/java/io/CharArrayReader.java b/jdk/src/java.base/share/classes/java/io/CharArrayReader.java index d14193512f2..bd6b13fa52d 100644 --- a/jdk/src/java.base/share/classes/java/io/CharArrayReader.java +++ b/jdk/src/java.base/share/classes/java/io/CharArrayReader.java @@ -62,13 +62,13 @@ public class CharArrayReader extends Reader { * Creates a CharArrayReader from the specified array of chars. * *

The resulting reader will start reading at the given - * offset. The total number of char values that can be - * read from this reader will be either length or - * buf.length-offset, whichever is smaller. + * {@code offset}. The total number of {@code char} values that can be + * read from this reader will be either {@code length} or + * {@code buf.length-offset}, whichever is smaller. * * @throws IllegalArgumentException - * If offset is negative or greater than - * buf.length, or if length is negative, or if + * If {@code offset} is negative or greater than + * {@code buf.length}, or if {@code length} is negative, or if * the sum of these two values is negative. * * @param buf Input buffer (not copied) diff --git a/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java b/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java index 317df3d7b3b..ed27bbae314 100644 --- a/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java +++ b/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java @@ -141,21 +141,21 @@ class CharArrayWriter extends Writer { /** * Appends the specified character sequence to this writer. * - *

An invocation of this method of the form out.append(csq) + *

An invocation of this method of the form {@code out.append(csq)} * behaves in exactly the same way as the invocation * *

      *     out.write(csq.toString()) 
* - *

Depending on the specification of toString for the - * character sequence csq, the entire sequence may not be - * appended. For instance, invoking the toString method of a + *

Depending on the specification of {@code toString} for the + * character sequence {@code csq}, the entire sequence may not be + * appended. For instance, invoking the {@code toString} method of a * character buffer will return a subsequence whose content depends upon * the buffer's position and limit. * * @param csq - * The character sequence to append. If csq is - * null, then the four characters "null" are + * The character sequence to append. If {@code csq} is + * {@code null}, then the four characters "{@code null}" are * appended to this writer. * * @return This writer @@ -171,8 +171,9 @@ class CharArrayWriter extends Writer { /** * Appends a subsequence of the specified character sequence to this writer. * - *

An invocation of this method of the form out.append(csq, start, - * end) when csq is not null, behaves in + *

An invocation of this method of the form + * {@code out.append(csq, start, end)} when + * {@code csq} is not {@code null}, behaves in * exactly the same way as the invocation * *

@@ -180,9 +181,9 @@ class CharArrayWriter extends Writer {
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If csq is null, then characters
-     *         will be appended as if csq contained the four
-     *         characters "null".
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters "{@code null}".
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -194,9 +195,9 @@ class CharArrayWriter extends Writer {
      * @return  This writer
      *
      * @throws  IndexOutOfBoundsException
-     *          If start or end are negative, start
-     *          is greater than end, or end is greater than
-     *          csq.length()
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @since  1.5
      */
@@ -209,7 +210,7 @@ class CharArrayWriter extends Writer {
     /**
      * Appends the specified character to this writer.
      *
-     * 

An invocation of this method of the form out.append(c) + *

An invocation of this method of the form {@code out.append(c)} * behaves in exactly the same way as the invocation * *

diff --git a/jdk/src/java.base/share/classes/java/io/Console.java b/jdk/src/java.base/share/classes/java/io/Console.java
index aa53c0ddfb0..df47870e14d 100644
--- a/jdk/src/java.base/share/classes/java/io/Console.java
+++ b/jdk/src/java.base/share/classes/java/io/Console.java
@@ -47,7 +47,7 @@ import sun.nio.cs.StreamEncoder;
  * If this virtual machine has a console then it is represented by a
  * unique instance of this class which can be obtained by invoking the
  * {@link java.lang.System#console()} method.  If no console device is
- * available then an invocation of that method will return null.
+ * available then an invocation of that method will return {@code null}.
  * 

* Read and write operations are synchronized to guarantee the atomic * completion of critical operations; therefore invoking methods @@ -56,17 +56,17 @@ import sun.nio.cs.StreamEncoder; * on the objects returned by {@link #reader()} and {@link #writer()} may * block in multithreaded scenarios. *

- * Invoking close() on the objects returned by the {@link #reader()} + * Invoking {@code close()} on the objects returned by the {@link #reader()} * and the {@link #writer()} will not close the underlying stream of those * objects. *

- * The console-read methods return null when the end of the + * The console-read methods return {@code null} when the end of the * console input stream is reached, for example by typing control-D on * Unix or control-Z on Windows. Subsequent read operations will succeed * if additional characters are later entered on the console's input * device. *

- * Unless otherwise specified, passing a null argument to any method + * Unless otherwise specified, passing a {@code null} argument to any method * in this class will cause a {@link NullPointerException} to be thrown. *

* Security note: @@ -107,7 +107,7 @@ public final class Console implements Flushable *

* This method is intended to be used by sophisticated applications, for * example, a {@link java.util.Scanner} object which utilizes the rich - * parsing/scanning functionality provided by the Scanner: + * parsing/scanning functionality provided by the {@code Scanner}: *

     * Console con = System.console();
     * if (con != null) {
@@ -117,7 +117,7 @@ public final class Console implements Flushable
     * 
*

* For simple applications requiring only line-oriented reading, use - * {@link #readLine}. + * {@link #readLine}. *

* The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) }, * {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and @@ -126,8 +126,8 @@ public final class Console implements Flushable * bound for each invocation, even if the destination buffer has space for * more characters. The {@code Reader}'s {@code read} methods may block if a * line bound has not been entered or reached on the console's input device. - * A line bound is considered to be any one of a line feed ('\n'), - * a carriage return ('\r'), a carriage return followed immediately + * A line bound is considered to be any one of a line feed ({@code '\n'}), + * a carriage return ({@code '\r'}), a carriage return followed immediately * by a linefeed, or an end of stream. * * @return The reader associated with this console @@ -152,7 +152,7 @@ public final class Console implements Flushable * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws IllegalFormatException @@ -175,8 +175,9 @@ public final class Console implements Flushable * A convenience method to write a formatted string to this console's * output stream using the specified format string and arguments. * - *

An invocation of this method of the form con.printf(format, - * args) behaves in exactly the same way as the invocation of + *

An invocation of this method of the form + * {@code con.printf(format, args)} behaves in exactly the same way + * as the invocation of *

con.format(format, args)
. * * @param format @@ -191,7 +192,7 @@ public final class Console implements Flushable * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws IllegalFormatException @@ -237,7 +238,7 @@ public final class Console implements Flushable * If an I/O error occurs. * * @return A string containing the line read from the console, not - * including any line-termination characters, or null + * including any line-termination characters, or {@code null} * if an end of stream has been reached. */ public String readLine(String fmt, Object ... args) { @@ -265,7 +266,7 @@ public final class Console implements Flushable * If an I/O error occurs. * * @return A string containing the line read from the console, not - * including any line-termination characters, or null + * including any line-termination characters, or {@code null} * if an end of stream has been reached. */ public String readLine() { @@ -302,7 +303,7 @@ public final class Console implements Flushable * * @return A character array containing the password or passphrase read * from the console, not including any line-termination characters, - * or null if an end of stream has been reached. + * or {@code null} if an end of stream has been reached. */ public char[] readPassword(String fmt, Object ... args) { char[] passwd = null; @@ -346,7 +347,7 @@ public final class Console implements Flushable * * @return A character array containing the password or passphrase read * from the console, not including any line-termination characters, - * or null if an end of stream has been reached. + * or {@code null} if an end of stream has been reached. */ public char[] readPassword() { return readPassword(""); diff --git a/jdk/src/java.base/share/classes/java/io/File.java b/jdk/src/java.base/share/classes/java/io/File.java index c2ae4400c77..e2ec80a92d1 100644 --- a/jdk/src/java.base/share/classes/java/io/File.java +++ b/jdk/src/java.base/share/classes/java/io/File.java @@ -63,8 +63,8 @@ import sun.security.action.GetPropertyAction; * pathname string, each name is separated from the next by a single copy of * the default separator character. The default name-separator * character is defined by the system property file.separator, and - * is made available in the public static fields {@link - * #separator} and {@link #separatorChar} of this class. + * is made available in the public static fields {@link + * #separator} and {@link #separatorChar} of this class. * When a pathname string is converted into an abstract pathname, the names * within it may be separated by the default name-separator character or by any * other name-separator character that is supported by the underlying system. @@ -82,11 +82,11 @@ import sun.security.action.GetPropertyAction; *

The parent of an abstract pathname may be obtained by invoking * the {@link #getParent} method of this class and consists of the pathname's * prefix and each name in the pathname's name sequence except for the last. - * Each directory's absolute pathname is an ancestor of any File + * Each directory's absolute pathname is an ancestor of any {@code File} * object with an absolute abstract pathname which begins with the directory's * absolute pathname. For example, the directory denoted by the abstract - * pathname "/usr" is an ancestor of the directory denoted by the - * pathname "/usr/local/bin". + * pathname {@code "/usr"} is an ancestor of the directory denoted by the + * pathname {@code "/usr/local/bin"}. * *

The prefix concept is used to handle root directories on UNIX platforms, * and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms, @@ -217,7 +217,7 @@ public class File /** * The system-dependent default name-separator character, represented as a * string for convenience. This string contains a single character, namely - * {@link #separatorChar}. + * {@link #separatorChar}. */ public static final String separator = "" + separatorChar; @@ -236,7 +236,7 @@ public class File /** * The system-dependent path-separator character, represented as a string * for convenience. This string contains a single character, namely - * {@link #pathSeparatorChar}. + * {@link #pathSeparatorChar}. */ public static final String pathSeparator = "" + pathSeparatorChar; @@ -374,33 +374,34 @@ public class File } /** - * Creates a new File instance by converting the given - * file: URI into an abstract pathname. + * Creates a new {@code File} instance by converting the given + * {@code file:} URI into an abstract pathname. * - *

The exact form of a file: URI is system-dependent, hence + *

The exact form of a {@code file:} URI is system-dependent, hence * the transformation performed by this constructor is also * system-dependent. * *

For a given abstract pathname f it is guaranteed that * - *

- * new File( f.{@link #toURI() toURI}()).equals( f.{@link #getAbsoluteFile() getAbsoluteFile}()) - *
+ *
+ * new File( f.{@link #toURI() + * toURI}()).equals( f.{@link #getAbsoluteFile() getAbsoluteFile}()) + *
* * so long as the original abstract pathname, the URI, and the new abstract * pathname are all created in (possibly different invocations of) the same * Java virtual machine. This relationship typically does not hold, - * however, when a file: URI that is created in a virtual machine + * however, when a {@code file:} URI that is created in a virtual machine * on one operating system is converted into an abstract pathname in a * virtual machine on a different operating system. * * @param uri * An absolute, hierarchical URI with a scheme equal to - * "file", a non-empty path component, and undefined + * {@code "file"}, a non-empty path component, and undefined * authority, query, and fragment components * * @throws NullPointerException - * If uri is null + * If {@code uri} is {@code null} * * @throws IllegalArgumentException * If the preconditions on the parameter do not hold @@ -533,7 +534,7 @@ public class File * Returns the absolute pathname string of this abstract pathname. * *

If this abstract pathname is already absolute, then the pathname - * string is simply returned as if by the {@link #getPath} + * string is simply returned as if by the {@link #getPath} * method. If this abstract pathname is the empty abstract pathname then * the pathname string of the current user directory, which is named by the * system property user.dir, is returned. Otherwise this @@ -581,7 +582,7 @@ public class File * converts this pathname to absolute form if necessary, as if by invoking the * {@link #getAbsolutePath} method, and then maps it to its unique form in a * system-dependent way. This typically involves removing redundant names - * such as "." and ".." from the pathname, resolving + * such as {@code "."} and {@code ".."} from the pathname, resolving * symbolic links (on UNIX platforms), and converting drive letters to a * standard case (on Microsoft Windows platforms). * @@ -604,8 +605,8 @@ public class File * * @throws SecurityException * If a required system property value cannot be accessed, or - * if a security manager exists and its {@link - * java.lang.SecurityManager#checkRead} method denies + * if a security manager exists and its {@link + * java.lang.SecurityManager#checkRead} method denies * read access to the file * * @since 1.1 @@ -632,8 +633,8 @@ public class File * * @throws SecurityException * If a required system property value cannot be accessed, or - * if a security manager exists and its {@link - * java.lang.SecurityManager#checkRead} method denies + * if a security manager exists and its {@link + * java.lang.SecurityManager#checkRead} method denies * read access to the file * * @since 1.2 @@ -687,7 +688,7 @@ public class File } /** - * Constructs a file: URI that represents this abstract pathname. + * Constructs a {@code file:} URI that represents this abstract pathname. * *

The exact form of the URI is system-dependent. If it can be * determined that the file denoted by this abstract pathname is a @@ -695,15 +696,16 @@ public class File * *

For a given abstract pathname f, it is guaranteed that * - *

- * new {@link #File(java.net.URI) File}( f.toURI()).equals( f.{@link #getAbsoluteFile() getAbsoluteFile}()) - *
+ *
+ * new {@link #File(java.net.URI) File}( f.toURI()).equals( + *  f.{@link #getAbsoluteFile() getAbsoluteFile}()) + *
* * so long as the original abstract pathname, the URI, and the new abstract * pathname are all created in (possibly different invocations of) the same * Java virtual machine. Due to the system-dependent nature of abstract * pathnames, however, this relationship typically does not hold when a - * file: URI that is created in a virtual machine on one operating + * {@code file:} URI that is created in a virtual machine on one operating * system is converted into an abstract pathname in a virtual machine on a * different operating system. * @@ -716,7 +718,7 @@ public class File * may be used to obtain a {@code Path} representing this abstract pathname. * * @return An absolute, hierarchical URI with a scheme equal to - * "file", a path representing this abstract pathname, + * {@code "file"}, a path representing this abstract pathname, * and undefined authority, query, and fragment components * @throws SecurityException If a required system property value cannot * be accessed. @@ -753,8 +755,8 @@ public class File * application; false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file */ public boolean canRead() { @@ -781,8 +783,8 @@ public class File * false otherwise. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file */ public boolean canWrite() { @@ -804,8 +806,8 @@ public class File * by this abstract pathname exists; false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file or directory */ public boolean exists() { @@ -834,8 +836,8 @@ public class File * false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file */ public boolean isDirectory() { @@ -867,8 +869,8 @@ public class File * false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file */ public boolean isFile() { @@ -894,8 +896,8 @@ public class File * underlying platform * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file * * @since 1.2 @@ -928,8 +930,8 @@ public class File * file does not exist or if an I/O error occurs * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file */ public long lastModified() { @@ -959,8 +961,8 @@ public class File * denoting system-dependent entities such as devices or pipes. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method denies read access to the file */ public long length() { @@ -997,8 +999,8 @@ public class File * If an I/O error occurred * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file * * @since 1.2 @@ -1026,8 +1028,8 @@ public class File * successfully deleted; false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkDelete} method denies + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkDelete} method denies * delete access to the file */ public boolean delete() { @@ -1060,8 +1062,8 @@ public class File * facility should be used instead. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkDelete} method denies + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkDelete} method denies * delete access to the file * * @see #delete @@ -1301,8 +1303,8 @@ public class File * created; false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not permit the named directory to be created */ public boolean mkdir() { @@ -1327,12 +1329,12 @@ public class File * otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkRead(java.lang.String)} * method does not permit verification of the existence of the * named directory and all necessary parent directories; or if - * the {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * the {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not permit the named directory and all necessary * parent directories to be created */ @@ -1375,8 +1377,8 @@ public class File * false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to either the old or new pathnames * * @throws NullPointerException @@ -1405,7 +1407,7 @@ public class File * but some provide more precision. The argument will be truncated to fit * the supported precision. If the operation succeeds and no intervening * operations on the file take place, then the next invocation of the - * {@link #lastModified} method will return the (possibly + * {@link #lastModified} method will return the (possibly * truncated) time argument that was passed to this method. * * @param time The new last-modified time, measured in milliseconds since @@ -1417,8 +1419,8 @@ public class File * @throws IllegalArgumentException If the argument is negative * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the named file * * @since 1.2 @@ -1448,8 +1450,8 @@ public class File * false otherwise * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the named file * * @since 1.2 @@ -1491,8 +1493,8 @@ public class File * the access permissions of this abstract pathname. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the named file * * @since 1.6 @@ -1514,11 +1516,12 @@ public class File * machine with special privileges that allow it to modify files that * disallow write operations. * - *

An invocation of this method of the form file.setWritable(arg) + *

An invocation of this method of the form {@code file.setWritable(arg)} * behaves in exactly the same way as the invocation * - *

-     *     file.setWritable(arg, true) 
+ *
{@code
+     *     file.setWritable(arg, true)
+     * }
* * @param writable * If true, sets the access permission to allow write @@ -1529,8 +1532,8 @@ public class File * change the access permissions of this abstract pathname. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file * * @since 1.6 @@ -1568,8 +1571,8 @@ public class File * operation will fail. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file * * @since 1.6 @@ -1591,11 +1594,12 @@ public class File * machine with special privileges that allow it to read files that are * marked as unreadable. * - *

An invocation of this method of the form file.setReadable(arg) + *

An invocation of this method of the form {@code file.setReadable(arg)} * behaves in exactly the same way as the invocation * - *

-     *     file.setReadable(arg, true) 
+ *
{@code
+     *     file.setReadable(arg, true)
+     * }
* * @param readable * If true, sets the access permission to allow read @@ -1609,8 +1613,8 @@ public class File * operation will fail. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file * * @since 1.6 @@ -1648,8 +1652,8 @@ public class File * operation will fail. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file * * @since 1.6 @@ -1671,11 +1675,12 @@ public class File * virtual machine with special privileges that allow it to execute files * that are not marked executable. * - *

An invocation of this method of the form file.setExcutable(arg) + *

An invocation of this method of the form {@code file.setExcutable(arg)} * behaves in exactly the same way as the invocation * - *

-     *     file.setExecutable(arg, true) 
+ *
{@code
+     *     file.setExecutable(arg, true)
+     * }
* * @param executable * If true, sets the access permission to allow execute @@ -1689,8 +1694,8 @@ public class File * operation will fail. * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method denies write access to the file * * @since 1.6 @@ -1710,8 +1715,8 @@ public class File * and the application is allowed to execute the file * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkExec(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkExec(java.lang.String)} * method denies execute access to the file * * @since 1.6 @@ -1783,12 +1788,12 @@ public class File * Returns the size of the partition named by this * abstract pathname. * - * @return The size, in bytes, of the partition or 0L if this + * @return The size, in bytes, of the partition or {@code 0L} if this * abstract pathname does not name a partition * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("getFileSystemAttributes") + * {@link RuntimePermission}{@code ("getFileSystemAttributes")} * or its {@link SecurityManager#checkRead(String)} method denies * read access to the file named by this abstract pathname * @@ -1819,14 +1824,14 @@ public class File * makes no guarantee that write operations to this file system * will succeed. * - * @return The number of unallocated bytes on the partition or 0L + * @return The number of unallocated bytes on the partition or {@code 0L} * if the abstract pathname does not name a partition. This * value will be less than or equal to the total file system size * returned by {@link #getTotalSpace}. * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("getFileSystemAttributes") + * {@link RuntimePermission}{@code ("getFileSystemAttributes")} * or its {@link SecurityManager#checkRead(String)} method denies * read access to the file named by this abstract pathname * @@ -1860,14 +1865,14 @@ public class File * virtual machine. This method makes no guarantee that write operations * to this file system will succeed. * - * @return The number of available bytes on the partition or 0L + * @return The number of available bytes on the partition or {@code 0L} * if the abstract pathname does not name a partition. On * systems where this information is not available, this method * will be equivalent to a call to {@link #getFreeSpace}. * * @throws SecurityException * If a security manager has been installed and it denies - * {@link RuntimePermission}("getFileSystemAttributes") + * {@link RuntimePermission}{@code ("getFileSystemAttributes")} * or its {@link SecurityManager#checkRead(String)} method denies * read access to the file named by this abstract pathname * @@ -1939,7 +1944,7 @@ public class File * * This method provides only part of a temporary-file facility. To arrange * for a file created by this method to be deleted automatically, use the - * {@link #deleteOnExit} method. + * {@link #deleteOnExit} method. * *

The prefix argument must be at least three characters * long. It is recommended that the prefix be a short, meaningful string @@ -1987,8 +1992,8 @@ public class File * @throws IOException If a file could not be created * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not allow a file to be created * * @since 1.2 @@ -2032,9 +2037,9 @@ public class File /** * Creates an empty file in the default temporary-file directory, using * the given prefix and suffix to generate its name. Invoking this method - * is equivalent to invoking {@link #createTempFile(java.lang.String, + * is equivalent to invoking {@link #createTempFile(java.lang.String, * java.lang.String, java.io.File) - * createTempFile(prefix, suffix, null)}. + * createTempFile(prefix, suffix, null)}. * *

The {@link * java.nio.file.Files#createTempFile(String,String,java.nio.file.attribute.FileAttribute[]) @@ -2059,8 +2064,8 @@ public class File * @throws IOException If a file could not be created * * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} + * If a security manager exists and its {@link + * java.lang.SecurityManager#checkWrite(java.lang.String)} * method does not allow a file to be created * * @since 1.2 @@ -2136,7 +2141,7 @@ public class File /** * Returns the pathname string of this abstract pathname. This is just the - * string returned by the {@link #getPath} method. + * string returned by the {@link #getPath} method. * * @return The string form of this abstract pathname */ diff --git a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java index 3c28433d15e..20d122048f4 100644 --- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java @@ -37,7 +37,7 @@ import sun.nio.ch.FileChannelImpl; * File or to a FileDescriptor. Whether or not * a file is available or may be created depends upon the underlying * platform. Some platforms, in particular, allow a file to be opened - * for writing by only one FileOutputStream (or other + * for writing by only one {@code FileOutputStream} (or other * file-writing object) at a time. In such situations the constructors in * this class will fail if the file involved is already open. * diff --git a/jdk/src/java.base/share/classes/java/io/FileReader.java b/jdk/src/java.base/share/classes/java/io/FileReader.java index 39aa197b461..aa502fc8358 100644 --- a/jdk/src/java.base/share/classes/java/io/FileReader.java +++ b/jdk/src/java.base/share/classes/java/io/FileReader.java @@ -32,9 +32,9 @@ package java.io; * size are appropriate. To specify these values yourself, construct an * InputStreamReader on a FileInputStream. * - *

FileReader is meant for reading streams of characters. + *

{@code FileReader} is meant for reading streams of characters. * For reading streams of raw bytes, consider using a - * FileInputStream. + * {@code FileInputStream}. * * @see InputStreamReader * @see FileInputStream @@ -45,7 +45,7 @@ package java.io; public class FileReader extends InputStreamReader { /** - * Creates a new FileReader, given the name of the + * Creates a new {@code FileReader}, given the name of the * file to read from. * * @param fileName the name of the file to read from @@ -59,10 +59,10 @@ public class FileReader extends InputStreamReader { } /** - * Creates a new FileReader, given the File + * Creates a new {@code FileReader}, given the {@code File} * to read from. * - * @param file the File to read from + * @param file the {@code File} to read from * @exception FileNotFoundException if the file does not exist, * is a directory rather than a regular file, * or for some other reason cannot be opened for @@ -73,8 +73,8 @@ public class FileReader extends InputStreamReader { } /** - * Creates a new FileReader, given the - * FileDescriptor to read from. + * Creates a new {@code FileReader}, given the + * {@code FileDescriptor} to read from. * * @param fd the FileDescriptor to read from */ diff --git a/jdk/src/java.base/share/classes/java/io/FileWriter.java b/jdk/src/java.base/share/classes/java/io/FileWriter.java index e6b8c6a2fd8..c63cb9f6ef9 100644 --- a/jdk/src/java.base/share/classes/java/io/FileWriter.java +++ b/jdk/src/java.base/share/classes/java/io/FileWriter.java @@ -34,13 +34,13 @@ package java.io; * *

Whether or not a file is available or may be created depends upon the * underlying platform. Some platforms, in particular, allow a file to be - * opened for writing by only one FileWriter (or other file-writing + * opened for writing by only one {@code FileWriter} (or other file-writing * object) at a time. In such situations the constructors in this class * will fail if the file involved is already open. * - *

FileWriter is meant for writing streams of characters. + *

{@code FileWriter} is meant for writing streams of characters. * For writing streams of raw bytes, consider using a - * FileOutputStream. + * {@code FileOutputStream}. * * @see OutputStreamWriter * @see FileOutputStream @@ -68,7 +68,7 @@ public class FileWriter extends OutputStreamWriter { * indicating whether or not to append the data written. * * @param fileName String The system-dependent filename. - * @param append boolean if true, then data will be written + * @param append boolean if {@code true}, then data will be written * to the end of the file rather than the beginning. * @throws IOException if the named file exists but is a directory rather * than a regular file, does not exist but cannot be @@ -92,11 +92,11 @@ public class FileWriter extends OutputStreamWriter { /** * Constructs a FileWriter object given a File object. If the second - * argument is true, then bytes will be written to the end + * argument is {@code true}, then bytes will be written to the end * of the file rather than the beginning. * * @param file a File object to write to - * @param append if true, then bytes will be written + * @param append if {@code true}, then bytes will be written * to the end of the file rather than the beginning * @throws IOException if the file exists but is a directory rather than * a regular file, does not exist but cannot be created, diff --git a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java index 4fb4e69362a..cb8f122d0b1 100644 --- a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java @@ -57,7 +57,7 @@ public class FilterOutputStream extends OutputStream { * underlying output stream. * * @param out the underlying output stream to be assigned to - * the field this.out for later use, or + * the field {@code this.out} for later use, or * null if this instance is to be * created without an underlying stream. */ @@ -70,9 +70,9 @@ public class FilterOutputStream extends OutputStream { *

* The write method of FilterOutputStream * calls the write method of its underlying output stream, - * that is, it performs out.write(b). + * that is, it performs {@code out.write(b)}. *

- * Implements the abstract write method of OutputStream. + * Implements the abstract {@code write} method of {@code OutputStream}. * * @param b the byte. * @exception IOException if an I/O error occurs. diff --git a/jdk/src/java.base/share/classes/java/io/Flushable.java b/jdk/src/java.base/share/classes/java/io/Flushable.java index fe90fbdf6e1..9bdc56e6985 100644 --- a/jdk/src/java.base/share/classes/java/io/Flushable.java +++ b/jdk/src/java.base/share/classes/java/io/Flushable.java @@ -28,7 +28,7 @@ package java.io; import java.io.IOException; /** - * A Flushable is a destination of data that can be flushed. The + * A {@code Flushable} is a destination of data that can be flushed. The * flush method is invoked to write any buffered output to the underlying * stream. * diff --git a/jdk/src/java.base/share/classes/java/io/IOError.java b/jdk/src/java.base/share/classes/java/io/IOError.java index f9626cd3f1d..ea9ec0ffc30 100644 --- a/jdk/src/java.base/share/classes/java/io/IOError.java +++ b/jdk/src/java.base/share/classes/java/io/IOError.java @@ -35,11 +35,11 @@ public class IOError extends Error { /** * Constructs a new instance of IOError with the specified cause. The * IOError is created with the detail message of - * (cause==null ? null : cause.toString()) (which typically + * {@code (cause==null ? null : cause.toString())} (which typically * contains the class and detail message of cause). * * @param cause - * The cause of this error, or null if the cause + * The cause of this error, or {@code null} if the cause * is not known */ public IOError(Throwable cause) { diff --git a/jdk/src/java.base/share/classes/java/io/LineNumberReader.java b/jdk/src/java.base/share/classes/java/io/LineNumberReader.java index 7b5b51ffa95..cc7bb2ae5fa 100644 --- a/jdk/src/java.base/share/classes/java/io/LineNumberReader.java +++ b/jdk/src/java.base/share/classes/java/io/LineNumberReader.java @@ -34,10 +34,10 @@ package java.io; * *

By default, line numbering begins at 0. This number increments at every * line terminator as the data is read, and can be changed - * with a call to setLineNumber(int). Note however, that - * setLineNumber(int) does not actually change the current position in + * with a call to {@code setLineNumber(int)}. Note however, that + * {@code setLineNumber(int)} does not actually change the current position in * the stream; it only changes the value that will be returned by - * getLineNumber(). + * {@code getLineNumber()}. * *

A line is considered to be terminated by any one of a * line feed ('\n'), a carriage return ('\r'), or a carriage return followed @@ -193,7 +193,7 @@ public class LineNumberReader extends BufferedReader { * * @return A String containing the contents of the line, not including * any line termination characters, or - * null if the end of the stream has been reached + * {@code null} if the end of the stream has been reached * * @throws IOException * If an I/O error occurs @@ -226,7 +226,7 @@ public class LineNumberReader extends BufferedReader { * If an I/O error occurs * * @throws IllegalArgumentException - * If n is negative + * If {@code n} is negative */ public long skip(long n) throws IOException { if (n < 0) diff --git a/jdk/src/java.base/share/classes/java/io/OutputStream.java b/jdk/src/java.base/share/classes/java/io/OutputStream.java index 08c4b26dbf8..03a058b6e87 100644 --- a/jdk/src/java.base/share/classes/java/io/OutputStream.java +++ b/jdk/src/java.base/share/classes/java/io/OutputStream.java @@ -94,7 +94,7 @@ public abstract class OutputStream implements Closeable, Flushable { *

* If off is negative, or len is negative, or * off+len is greater than the length of the array - * b, then an IndexOutOfBoundsException is thrown. + * {@code b}, then an {@code IndexOutOfBoundsException} is thrown. * * @param b the data. * @param off the start offset in the data. diff --git a/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java b/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java index 3896c38e1f8..5533ff4bb53 100644 --- a/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java +++ b/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java @@ -53,7 +53,7 @@ import sun.nio.cs.StreamEncoder; *

* *

A surrogate pair is a character represented by a sequence of two - * char values: A high surrogate in the range '\uD800' to + * {@code char} values: A high surrogate in the range '\uD800' to * '\uDBFF' followed by a low surrogate in the range '\uDC00' to * '\uDFFF'. * @@ -161,7 +161,7 @@ public class OutputStreamWriter extends Writer { *

If this instance was created with the {@link * #OutputStreamWriter(OutputStream, String)} constructor then the returned * name, being unique for the encoding, may differ from the name passed to - * the constructor. This method may return null if the stream has + * the constructor. This method may return {@code null} if the stream has * been closed.

* * @return The historical name of this encoding, or possibly diff --git a/jdk/src/java.base/share/classes/java/io/PrintStream.java b/jdk/src/java.base/share/classes/java/io/PrintStream.java index f62ebb88868..2b40cefc4be 100644 --- a/jdk/src/java.base/share/classes/java/io/PrintStream.java +++ b/jdk/src/java.base/share/classes/java/io/PrintStream.java @@ -32,22 +32,22 @@ import java.nio.charset.IllegalCharsetNameException; import java.nio.charset.UnsupportedCharsetException; /** - * A PrintStream adds functionality to another output stream, + * A {@code PrintStream} adds functionality to another output stream, * namely the ability to print representations of various data values * conveniently. Two other features are provided as well. Unlike other output - * streams, a PrintStream never throws an - * IOException; instead, exceptional situations merely set an - * internal flag that can be tested via the checkError method. - * Optionally, a PrintStream can be created so as to flush - * automatically; this means that the flush method is + * streams, a {@code PrintStream} never throws an + * {@code IOException}; instead, exceptional situations merely set an + * internal flag that can be tested via the {@code checkError} method. + * Optionally, a {@code PrintStream} can be created so as to flush + * automatically; this means that the {@code flush} method is * automatically invoked after a byte array is written, one of the - * println methods is invoked, or a newline character or byte - * ('\n') is written. + * {@code println} methods is invoked, or a newline character or byte + * ({@code '\n'}) is written. * - *

All characters printed by a PrintStream are converted into - * bytes using the platform's default character encoding. The {@link - * PrintWriter} class should be used in situations that require writing - * characters rather than bytes. + *

All characters printed by a {@code PrintStream} are converted into + * bytes using the platform's default character encoding. + * The {@link PrintWriter} class should be used in situations that require + * writing characters rather than bytes. * * @author Frank Yellin * @author Mark Reinhold @@ -142,8 +142,8 @@ public class PrintStream extends FilterOutputStream * printed * @param autoFlush A boolean; if true, the output buffer will be flushed * whenever a byte array is written, one of the - * println methods is invoked, or a newline - * character or byte ('\n') is written + * {@code println} methods is invoked, or a newline + * character or byte ({@code '\n'}) is written * * @see java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean) */ @@ -158,8 +158,8 @@ public class PrintStream extends FilterOutputStream * printed * @param autoFlush A boolean; if true, the output buffer will be flushed * whenever a byte array is written, one of the - * println methods is invoked, or a newline - * character or byte ('\n') is written + * {@code println} methods is invoked, or a newline + * character or byte ({@code '\n'}) is written * @param encoding The name of a supported * * character encoding @@ -371,21 +371,21 @@ public class PrintStream extends FilterOutputStream /** * Flushes the stream and checks its error state. The internal error state - * is set to true when the underlying output stream throws an - * IOException other than InterruptedIOException, - * and when the setError method is invoked. If an operation + * is set to {@code true} when the underlying output stream throws an + * {@code IOException} other than {@code InterruptedIOException}, + * and when the {@code setError} method is invoked. If an operation * on the underlying output stream throws an - * InterruptedIOException, then the PrintStream + * {@code InterruptedIOException}, then the {@code PrintStream} * converts the exception back into an interrupt by doing: - *

+     * 
{@code
      *     Thread.currentThread().interrupt();
-     * 
+ * }
* or the equivalent. * - * @return true if and only if this stream has encountered an - * IOException other than - * InterruptedIOException, or the - * setError method has been invoked + * @return {@code true} if and only if this stream has encountered an + * {@code IOException} other than + * {@code InterruptedIOException}, or the + * {@code setError} method has been invoked */ public boolean checkError() { if (out != null) @@ -398,11 +398,11 @@ public class PrintStream extends FilterOutputStream } /** - * Sets the error state of the stream to true. + * Sets the error state of the stream to {@code true}. * *

This method will cause subsequent invocations of {@link - * #checkError()} to return true until {@link - * #clearError()} is invoked. + * #checkError()} to return {@code true} until + * {@link #clearError()} is invoked. * * @since 1.1 */ @@ -414,7 +414,7 @@ public class PrintStream extends FilterOutputStream * Clears the internal error state of this stream. * *

This method will cause subsequent invocations of {@link - * #checkError()} to return false until another write + * #checkError()} to return {@code false} until another write * operation fails and invokes {@link #setError()}. * * @since 1.6 @@ -430,12 +430,12 @@ public class PrintStream extends FilterOutputStream /** * Writes the specified byte to this stream. If the byte is a newline and - * automatic flushing is enabled then the flush method will be + * automatic flushing is enabled then the {@code flush} method will be * invoked. * *

Note that the byte is written as given; to write a character that * will be translated according to the platform's default character - * encoding, use the print(char) or println(char) + * encoding, use the {@code print(char)} or {@code println(char)} * methods. * * @param b The byte to be written @@ -460,13 +460,13 @@ public class PrintStream extends FilterOutputStream } /** - * Writes len bytes from the specified byte array starting at - * offset off to this stream. If automatic flushing is - * enabled then the flush method will be invoked. + * Writes {@code len} bytes from the specified byte array starting at + * offset {@code off} to this stream. If automatic flushing is + * enabled then the {@code flush} method will be invoked. * *

Note that the bytes will be written as given; to write characters * that will be translated according to the platform's default character - * encoding, use the print(char) or println(char) + * encoding, use the {@code print(char)} or {@code println(char)} * methods. * * @param buf A byte array @@ -559,13 +559,13 @@ public class PrintStream extends FilterOutputStream /* Methods that do not terminate lines */ /** - * Prints a boolean value. The string produced by {@link - * java.lang.String#valueOf(boolean)} is translated into bytes + * Prints a boolean value. The string produced by {@link + * java.lang.String#valueOf(boolean)} is translated into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param b The boolean to be printed + * @param b The {@code boolean} to be printed */ public void print(boolean b) { write(b ? "true" : "false"); @@ -575,22 +575,22 @@ public class PrintStream extends FilterOutputStream * Prints a character. The character is translated into one or more bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param c The char to be printed + * @param c The {@code char} to be printed */ public void print(char c) { write(String.valueOf(c)); } /** - * Prints an integer. The string produced by {@link - * java.lang.String#valueOf(int)} is translated into bytes + * Prints an integer. The string produced by {@link + * java.lang.String#valueOf(int)} is translated into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param i The int to be printed + * @param i The {@code int} to be printed * @see java.lang.Integer#toString(int) */ public void print(int i) { @@ -598,13 +598,13 @@ public class PrintStream extends FilterOutputStream } /** - * Prints a long integer. The string produced by {@link - * java.lang.String#valueOf(long)} is translated into bytes + * Prints a long integer. The string produced by {@link + * java.lang.String#valueOf(long)} is translated into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param l The long to be printed + * @param l The {@code long} to be printed * @see java.lang.Long#toString(long) */ public void print(long l) { @@ -612,13 +612,13 @@ public class PrintStream extends FilterOutputStream } /** - * Prints a floating-point number. The string produced by {@link - * java.lang.String#valueOf(float)} is translated into bytes + * Prints a floating-point number. The string produced by {@link + * java.lang.String#valueOf(float)} is translated into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param f The float to be printed + * @param f The {@code float} to be printed * @see java.lang.Float#toString(float) */ public void print(float f) { @@ -627,12 +627,12 @@ public class PrintStream extends FilterOutputStream /** * Prints a double-precision floating-point number. The string produced by - * {@link java.lang.String#valueOf(double)} is translated into + * {@link java.lang.String#valueOf(double)} is translated into * bytes according to the platform's default character encoding, and these - * bytes are written in exactly the manner of the {@link - * #write(int)} method. + * bytes are written in exactly the manner of the {@link + * #write(int)} method. * - * @param d The double to be printed + * @param d The {@code double} to be printed * @see java.lang.Double#toString(double) */ public void print(double d) { @@ -643,24 +643,24 @@ public class PrintStream extends FilterOutputStream * Prints an array of characters. The characters are converted into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * * @param s The array of chars to be printed * - * @throws NullPointerException If s is null + * @throws NullPointerException If {@code s} is {@code null} */ public void print(char s[]) { write(s); } /** - * Prints a string. If the argument is null then the string - * "null" is printed. Otherwise, the string's characters are + * Prints a string. If the argument is {@code null} then the string + * {@code "null"} is printed. Otherwise, the string's characters are * converted into bytes according to the platform's default character * encoding, and these bytes are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param s The String to be printed + * @param s The {@code String} to be printed */ public void print(String s) { if (s == null) { @@ -670,13 +670,13 @@ public class PrintStream extends FilterOutputStream } /** - * Prints an object. The string produced by the {@link - * java.lang.String#valueOf(Object)} method is translated into bytes + * Prints an object. The string produced by the {@link + * java.lang.String#valueOf(Object)} method is translated into bytes * according to the platform's default character encoding, and these bytes * are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param obj The Object to be printed + * @param obj The {@code Object} to be printed * @see java.lang.Object#toString() */ public void print(Object obj) { @@ -689,8 +689,8 @@ public class PrintStream extends FilterOutputStream /** * Terminates the current line by writing the line separator string. The * line separator string is defined by the system property - * line.separator, and is not necessarily a single newline - * character ('\n'). + * {@code line.separator}, and is not necessarily a single newline + * character ({@code '\n'}). */ public void println() { newLine(); @@ -698,10 +698,10 @@ public class PrintStream extends FilterOutputStream /** * Prints a boolean and then terminate the line. This method behaves as - * though it invokes {@link #print(boolean)} and then - * {@link #println()}. + * though it invokes {@link #print(boolean)} and then + * {@link #println()}. * - * @param x The boolean to be printed + * @param x The {@code boolean} to be printed */ public void println(boolean x) { synchronized (this) { @@ -712,10 +712,10 @@ public class PrintStream extends FilterOutputStream /** * Prints a character and then terminate the line. This method behaves as - * though it invokes {@link #print(char)} and then - * {@link #println()}. + * though it invokes {@link #print(char)} and then + * {@link #println()}. * - * @param x The char to be printed. + * @param x The {@code char} to be printed. */ public void println(char x) { synchronized (this) { @@ -726,10 +726,10 @@ public class PrintStream extends FilterOutputStream /** * Prints an integer and then terminate the line. This method behaves as - * though it invokes {@link #print(int)} and then - * {@link #println()}. + * though it invokes {@link #print(int)} and then + * {@link #println()}. * - * @param x The int to be printed. + * @param x The {@code int} to be printed. */ public void println(int x) { synchronized (this) { @@ -740,10 +740,10 @@ public class PrintStream extends FilterOutputStream /** * Prints a long and then terminate the line. This method behaves as - * though it invokes {@link #print(long)} and then - * {@link #println()}. + * though it invokes {@link #print(long)} and then + * {@link #println()}. * - * @param x a The long to be printed. + * @param x a The {@code long} to be printed. */ public void println(long x) { synchronized (this) { @@ -754,10 +754,10 @@ public class PrintStream extends FilterOutputStream /** * Prints a float and then terminate the line. This method behaves as - * though it invokes {@link #print(float)} and then - * {@link #println()}. + * though it invokes {@link #print(float)} and then + * {@link #println()}. * - * @param x The float to be printed. + * @param x The {@code float} to be printed. */ public void println(float x) { synchronized (this) { @@ -768,10 +768,10 @@ public class PrintStream extends FilterOutputStream /** * Prints a double and then terminate the line. This method behaves as - * though it invokes {@link #print(double)} and then - * {@link #println()}. + * though it invokes {@link #print(double)} and then + * {@link #println()}. * - * @param x The double to be printed. + * @param x The {@code double} to be printed. */ public void println(double x) { synchronized (this) { @@ -782,8 +782,8 @@ public class PrintStream extends FilterOutputStream /** * Prints an array of characters and then terminate the line. This method - * behaves as though it invokes {@link #print(char[])} and - * then {@link #println()}. + * behaves as though it invokes {@link #print(char[])} and + * then {@link #println()}. * * @param x an array of chars to print. */ @@ -796,10 +796,10 @@ public class PrintStream extends FilterOutputStream /** * Prints a String and then terminate the line. This method behaves as - * though it invokes {@link #print(String)} and then - * {@link #println()}. + * though it invokes {@link #print(String)} and then + * {@link #println()}. * - * @param x The String to be printed. + * @param x The {@code String} to be printed. */ public void println(String x) { synchronized (this) { @@ -812,10 +812,10 @@ public class PrintStream extends FilterOutputStream * Prints an Object and then terminate the line. This method calls * at first String.valueOf(x) to get the printed object's string value, * then behaves as - * though it invokes {@link #print(String)} and then - * {@link #println()}. + * though it invokes {@link #print(String)} and then + * {@link #println()}. * - * @param x The Object to be printed. + * @param x The {@code Object} to be printed. */ public void println(Object x) { String s = String.valueOf(x); @@ -830,11 +830,13 @@ public class PrintStream extends FilterOutputStream * A convenience method to write a formatted string to this output stream * using the specified format string and arguments. * - *

An invocation of this method of the form out.printf(format, - * args) behaves in exactly the same way as the invocation + *

An invocation of this method of the form + * {@code out.printf(format, args)} behaves + * in exactly the same way as the invocation * - *

-     *     out.format(format, args) 
+ *
{@code
+     *     out.format(format, args)
+     * }
* * @param format * A format string as described in The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -861,7 +863,7 @@ public class PrintStream extends FilterOutputStream * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This output stream * @@ -875,15 +877,17 @@ public class PrintStream extends FilterOutputStream * A convenience method to write a formatted string to this output stream * using the specified format string and arguments. * - *

An invocation of this method of the form out.printf(l, format, - * args) behaves in exactly the same way as the invocation + *

An invocation of this method of the form + * {@code out.printf(l, format, args)} behaves + * in exactly the same way as the invocation * - *

-     *     out.format(l, format, args) 
+ *
{@code
+     *     out.format(l, format, args)
+     * }
* * @param l * The {@linkplain java.util.Locale locale} to apply during - * formatting. If l is null then no localization + * formatting. If {@code l} is {@code null} then no localization * is applied. * * @param format @@ -898,7 +902,7 @@ public class PrintStream extends FilterOutputStream * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -911,7 +915,7 @@ public class PrintStream extends FilterOutputStream * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This output stream * @@ -941,7 +945,7 @@ public class PrintStream extends FilterOutputStream * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -954,7 +958,7 @@ public class PrintStream extends FilterOutputStream * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This output stream * @@ -983,7 +987,7 @@ public class PrintStream extends FilterOutputStream * * @param l * The {@linkplain java.util.Locale locale} to apply during - * formatting. If l is null then no localization + * formatting. If {@code l} is {@code null} then no localization * is applied. * * @param format @@ -998,7 +1002,7 @@ public class PrintStream extends FilterOutputStream * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -1011,7 +1015,7 @@ public class PrintStream extends FilterOutputStream * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This output stream * @@ -1037,21 +1041,22 @@ public class PrintStream extends FilterOutputStream /** * Appends the specified character sequence to this output stream. * - *

An invocation of this method of the form out.append(csq) + *

An invocation of this method of the form {@code out.append(csq)} * behaves in exactly the same way as the invocation * - *

-     *     out.print(csq.toString()) 
+ *
{@code
+     *     out.print(csq.toString())
+     * }
* - *

Depending on the specification of toString for the - * character sequence csq, the entire sequence may not be - * appended. For instance, invoking then toString method of a + *

Depending on the specification of {@code toString} for the + * character sequence {@code csq}, the entire sequence may not be + * appended. For instance, invoking then {@code toString} method of a * character buffer will return a subsequence whose content depends upon * the buffer's position and limit. * * @param csq - * The character sequence to append. If csq is - * null, then the four characters "null" are + * The character sequence to append. If {@code csq} is + * {@code null}, then the four characters {@code "null"} are * appended to this output stream. * * @return This output stream @@ -1070,18 +1075,20 @@ public class PrintStream extends FilterOutputStream * Appends a subsequence of the specified character sequence to this output * stream. * - *

An invocation of this method of the form out.append(csq, start, - * end) when csq is not null, behaves in + *

An invocation of this method of the form + * {@code out.append(csq, start, end)} when + * {@code csq} is not {@code null}, behaves in * exactly the same way as the invocation * - *

-     *     out.print(csq.subSequence(start, end).toString()) 
+ *
{@code
+     *     out.print(csq.subSequence(start, end).toString())
+     * }
* * @param csq * The character sequence from which a subsequence will be - * appended. If csq is null, then characters - * will be appended as if csq contained the four - * characters "null". + * appended. If {@code csq} is {@code null}, then characters + * will be appended as if {@code csq} contained the four + * characters {@code "null"}. * * @param start * The index of the first character in the subsequence @@ -1093,9 +1100,9 @@ public class PrintStream extends FilterOutputStream * @return This output stream * * @throws IndexOutOfBoundsException - * If start or end are negative, start - * is greater than end, or end is greater than - * csq.length() + * If {@code start} or {@code end} are negative, {@code start} + * is greater than {@code end}, or {@code end} is greater than + * {@code csq.length()} * * @since 1.5 */ @@ -1108,11 +1115,12 @@ public class PrintStream extends FilterOutputStream /** * Appends the specified character to this output stream. * - *

An invocation of this method of the form out.append(c) + *

An invocation of this method of the form {@code out.append(c)} * behaves in exactly the same way as the invocation * - *

-     *     out.print(c) 
+ *
{@code
+     *     out.print(c)
+     * }
* * @param c * The 16-bit character to append diff --git a/jdk/src/java.base/share/classes/java/io/PrintWriter.java b/jdk/src/java.base/share/classes/java/io/PrintWriter.java index 03f4ef67e2f..662f930ef90 100644 --- a/jdk/src/java.base/share/classes/java/io/PrintWriter.java +++ b/jdk/src/java.base/share/classes/java/io/PrintWriter.java @@ -34,13 +34,13 @@ import java.nio.charset.UnsupportedCharsetException; /** * Prints formatted representations of objects to a text-output stream. This - * class implements all of the print methods found in {@link + * class implements all of the {@code print} methods found in {@link * PrintStream}. It does not contain methods for writing raw bytes, for which * a program should use unencoded byte streams. * *

Unlike the {@link PrintStream} class, if automatic flushing is enabled - * it will be done only when one of the println, printf, or - * format methods is invoked, rather than whenever a newline character + * it will be done only when one of the {@code println}, {@code printf}, or + * {@code format} methods is invoked, rather than whenever a newline character * happens to be output. These methods use the platform's own notion of line * separator rather than the newline character. * @@ -57,7 +57,7 @@ public class PrintWriter extends Writer { /** * The underlying character-output stream of this - * PrintWriter. + * {@code PrintWriter}. * * @since 1.2 */ @@ -98,8 +98,8 @@ public class PrintWriter extends Writer { * Creates a new PrintWriter. * * @param out A character-output stream - * @param autoFlush A boolean; if true, the println, - * printf, or format methods will + * @param autoFlush A boolean; if true, the {@code println}, + * {@code printf}, or {@code format} methods will * flush the output buffer */ public PrintWriter(Writer out, @@ -130,8 +130,8 @@ public class PrintWriter extends Writer { * default character encoding. * * @param out An output stream - * @param autoFlush A boolean; if true, the println, - * printf, or format methods will + * @param autoFlush A boolean; if true, the {@code println}, + * {@code printf}, or {@code format} methods will * flush the output buffer * * @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream) @@ -340,7 +340,7 @@ public class PrintWriter extends Writer { /** * Flushes the stream if it's not closed and checks its error state. * - * @return true if the print stream has encountered an error, + * @return {@code true} if the print stream has encountered an error, * either on the underlying output stream or during a format * conversion. */ @@ -361,7 +361,7 @@ public class PrintWriter extends Writer { * Indicates that an error has occurred. * *

This method will cause subsequent invocations of {@link - * #checkError()} to return true until {@link + * #checkError()} to return {@code true} until {@link * #clearError()} is invoked. */ protected void setError() { @@ -372,7 +372,7 @@ public class PrintWriter extends Writer { * Clears the error state of this stream. * *

This method will cause subsequent invocations of {@link - * #checkError()} to return false until another write + * #checkError()} to return {@code false} until another write * operation fails and invokes {@link #setError()}. * * @since 1.6 @@ -485,13 +485,13 @@ public class PrintWriter extends Writer { /* Methods that do not terminate lines */ /** - * Prints a boolean value. The string produced by {@link - * java.lang.String#valueOf(boolean)} is translated into bytes + * Prints a boolean value. The string produced by {@link + * java.lang.String#valueOf(boolean)} is translated into bytes * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the {@link - * #write(int)} method. + * are written in exactly the manner of the {@link + * #write(int)} method. * - * @param b The boolean to be printed + * @param b The {@code boolean} to be printed */ public void print(boolean b) { write(b ? "true" : "false"); @@ -500,23 +500,23 @@ public class PrintWriter extends Writer { /** * Prints a character. The character is translated into one or more bytes * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the {@link - * #write(int)} method. + * are written in exactly the manner of the {@link + * #write(int)} method. * - * @param c The char to be printed + * @param c The {@code char} to be printed */ public void print(char c) { write(c); } /** - * Prints an integer. The string produced by {@link - * java.lang.String#valueOf(int)} is translated into bytes according + * Prints an integer. The string produced by {@link + * java.lang.String#valueOf(int)} is translated into bytes according * to the platform's default character encoding, and these bytes are - * written in exactly the manner of the {@link #write(int)} + * written in exactly the manner of the {@link #write(int)} * method. * - * @param i The int to be printed + * @param i The {@code int} to be printed * @see java.lang.Integer#toString(int) */ public void print(int i) { @@ -524,13 +524,13 @@ public class PrintWriter extends Writer { } /** - * Prints a long integer. The string produced by {@link - * java.lang.String#valueOf(long)} is translated into bytes + * Prints a long integer. The string produced by {@link + * java.lang.String#valueOf(long)} is translated into bytes * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the {@link #write(int)} + * are written in exactly the manner of the {@link #write(int)} * method. * - * @param l The long to be printed + * @param l The {@code long} to be printed * @see java.lang.Long#toString(long) */ public void print(long l) { @@ -538,13 +538,13 @@ public class PrintWriter extends Writer { } /** - * Prints a floating-point number. The string produced by {@link - * java.lang.String#valueOf(float)} is translated into bytes + * Prints a floating-point number. The string produced by {@link + * java.lang.String#valueOf(float)} is translated into bytes * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the {@link #write(int)} + * are written in exactly the manner of the {@link #write(int)} * method. * - * @param f The float to be printed + * @param f The {@code float} to be printed * @see java.lang.Float#toString(float) */ public void print(float f) { @@ -553,12 +553,12 @@ public class PrintWriter extends Writer { /** * Prints a double-precision floating-point number. The string produced by - * {@link java.lang.String#valueOf(double)} is translated into + * {@link java.lang.String#valueOf(double)} is translated into * bytes according to the platform's default character encoding, and these - * bytes are written in exactly the manner of the {@link - * #write(int)} method. + * bytes are written in exactly the manner of the {@link + * #write(int)} method. * - * @param d The double to be printed + * @param d The {@code double} to be printed * @see java.lang.Double#toString(double) */ public void print(double d) { @@ -568,25 +568,25 @@ public class PrintWriter extends Writer { /** * Prints an array of characters. The characters are converted into bytes * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the {@link #write(int)} + * are written in exactly the manner of the {@link #write(int)} * method. * * @param s The array of chars to be printed * - * @throws NullPointerException If s is null + * @throws NullPointerException If {@code s} is {@code null} */ public void print(char s[]) { write(s); } /** - * Prints a string. If the argument is null then the string - * "null" is printed. Otherwise, the string's characters are + * Prints a string. If the argument is {@code null} then the string + * {@code "null"} is printed. Otherwise, the string's characters are * converted into bytes according to the platform's default character * encoding, and these bytes are written in exactly the manner of the - * {@link #write(int)} method. + * {@link #write(int)} method. * - * @param s The String to be printed + * @param s The {@code String} to be printed */ public void print(String s) { if (s == null) { @@ -596,13 +596,13 @@ public class PrintWriter extends Writer { } /** - * Prints an object. The string produced by the {@link - * java.lang.String#valueOf(Object)} method is translated into bytes + * Prints an object. The string produced by the {@link + * java.lang.String#valueOf(Object)} method is translated into bytes * according to the platform's default character encoding, and these bytes - * are written in exactly the manner of the {@link #write(int)} + * are written in exactly the manner of the {@link #write(int)} * method. * - * @param obj The Object to be printed + * @param obj The {@code Object} to be printed * @see java.lang.Object#toString() */ public void print(Object obj) { @@ -614,8 +614,8 @@ public class PrintWriter extends Writer { /** * Terminates the current line by writing the line separator string. The * line separator string is defined by the system property - * line.separator, and is not necessarily a single newline - * character ('\n'). + * {@code line.separator}, and is not necessarily a single newline + * character ({@code '\n'}). */ public void println() { newLine(); @@ -623,10 +623,10 @@ public class PrintWriter extends Writer { /** * Prints a boolean value and then terminates the line. This method behaves - * as though it invokes {@link #print(boolean)} and then - * {@link #println()}. + * as though it invokes {@link #print(boolean)} and then + * {@link #println()}. * - * @param x the boolean value to be printed + * @param x the {@code boolean} value to be printed */ public void println(boolean x) { synchronized (lock) { @@ -637,10 +637,10 @@ public class PrintWriter extends Writer { /** * Prints a character and then terminates the line. This method behaves as - * though it invokes {@link #print(char)} and then {@link - * #println()}. + * though it invokes {@link #print(char)} and then {@link + * #println()}. * - * @param x the char value to be printed + * @param x the {@code char} value to be printed */ public void println(char x) { synchronized (lock) { @@ -651,10 +651,10 @@ public class PrintWriter extends Writer { /** * Prints an integer and then terminates the line. This method behaves as - * though it invokes {@link #print(int)} and then {@link - * #println()}. + * though it invokes {@link #print(int)} and then {@link + * #println()}. * - * @param x the int value to be printed + * @param x the {@code int} value to be printed */ public void println(int x) { synchronized (lock) { @@ -665,10 +665,10 @@ public class PrintWriter extends Writer { /** * Prints a long integer and then terminates the line. This method behaves - * as though it invokes {@link #print(long)} and then - * {@link #println()}. + * as though it invokes {@link #print(long)} and then + * {@link #println()}. * - * @param x the long value to be printed + * @param x the {@code long} value to be printed */ public void println(long x) { synchronized (lock) { @@ -679,10 +679,10 @@ public class PrintWriter extends Writer { /** * Prints a floating-point number and then terminates the line. This method - * behaves as though it invokes {@link #print(float)} and then - * {@link #println()}. + * behaves as though it invokes {@link #print(float)} and then + * {@link #println()}. * - * @param x the float value to be printed + * @param x the {@code float} value to be printed */ public void println(float x) { synchronized (lock) { @@ -693,10 +693,10 @@ public class PrintWriter extends Writer { /** * Prints a double-precision floating-point number and then terminates the - * line. This method behaves as though it invokes {@link - * #print(double)} and then {@link #println()}. + * line. This method behaves as though it invokes {@link + * #print(double)} and then {@link #println()}. * - * @param x the double value to be printed + * @param x the {@code double} value to be printed */ public void println(double x) { synchronized (lock) { @@ -707,10 +707,10 @@ public class PrintWriter extends Writer { /** * Prints an array of characters and then terminates the line. This method - * behaves as though it invokes {@link #print(char[])} and then - * {@link #println()}. + * behaves as though it invokes {@link #print(char[])} and then + * {@link #println()}. * - * @param x the array of char values to be printed + * @param x the array of {@code char} values to be printed */ public void println(char x[]) { synchronized (lock) { @@ -721,10 +721,10 @@ public class PrintWriter extends Writer { /** * Prints a String and then terminates the line. This method behaves as - * though it invokes {@link #print(String)} and then - * {@link #println()}. + * though it invokes {@link #print(String)} and then + * {@link #println()}. * - * @param x the String value to be printed + * @param x the {@code String} value to be printed */ public void println(String x) { synchronized (lock) { @@ -737,10 +737,10 @@ public class PrintWriter extends Writer { * Prints an Object and then terminates the line. This method calls * at first String.valueOf(x) to get the printed object's string value, * then behaves as - * though it invokes {@link #print(String)} and then - * {@link #println()}. + * though it invokes {@link #print(String)} and then + * {@link #println()}. * - * @param x The Object to be printed. + * @param x The {@code Object} to be printed. */ public void println(Object x) { String s = String.valueOf(x); @@ -755,11 +755,13 @@ public class PrintWriter extends Writer { * the specified format string and arguments. If automatic flushing is * enabled, calls to this method will flush the output buffer. * - *

An invocation of this method of the form out.printf(format, - * args) behaves in exactly the same way as the invocation + *

An invocation of this method of the form + * {@code out.printf(format, args)} + * behaves in exactly the same way as the invocation * - *

-     *     out.format(format, args) 
+ *
{@code
+     *     out.format(format, args)
+     * }
* * @param format * A format string as described in The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -786,7 +788,7 @@ public class PrintWriter extends Writer { * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This writer * @@ -801,15 +803,17 @@ public class PrintWriter extends Writer { * the specified format string and arguments. If automatic flushing is * enabled, calls to this method will flush the output buffer. * - *

An invocation of this method of the form out.printf(l, format, - * args) behaves in exactly the same way as the invocation + *

An invocation of this method of the form + * {@code out.printf(l, format, args)} + * behaves in exactly the same way as the invocation * - *

-     *     out.format(l, format, args) 
+ *
{@code
+     *     out.format(l, format, args)
+     * }
* * @param l * The {@linkplain java.util.Locale locale} to apply during - * formatting. If l is null then no localization + * formatting. If {@code l} is {@code null} then no localization * is applied. * * @param format @@ -824,7 +828,7 @@ public class PrintWriter extends Writer { * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -837,7 +841,7 @@ public class PrintWriter extends Writer { * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This writer * @@ -868,7 +872,7 @@ public class PrintWriter extends Writer { * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -881,7 +885,7 @@ public class PrintWriter extends Writer { * Formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This writer * @@ -913,7 +917,7 @@ public class PrintWriter extends Writer { * * @param l * The {@linkplain java.util.Locale locale} to apply during - * formatting. If l is null then no localization + * formatting. If {@code l} is {@code null} then no localization * is applied. * * @param format @@ -928,7 +932,7 @@ public class PrintWriter extends Writer { * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -941,7 +945,7 @@ public class PrintWriter extends Writer { * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return This writer * @@ -968,21 +972,22 @@ public class PrintWriter extends Writer { /** * Appends the specified character sequence to this writer. * - *

An invocation of this method of the form out.append(csq) + *

An invocation of this method of the form {@code out.append(csq)} * behaves in exactly the same way as the invocation * - *

-     *     out.write(csq.toString()) 
+ *
{@code
+     *     out.write(csq.toString())
+     * }
* - *

Depending on the specification of toString for the - * character sequence csq, the entire sequence may not be - * appended. For instance, invoking the toString method of a + *

Depending on the specification of {@code toString} for the + * character sequence {@code csq}, the entire sequence may not be + * appended. For instance, invoking the {@code toString} method of a * character buffer will return a subsequence whose content depends upon * the buffer's position and limit. * * @param csq - * The character sequence to append. If csq is - * null, then the four characters "null" are + * The character sequence to append. If {@code csq} is + * {@code null}, then the four characters {@code "null"} are * appended to this writer. * * @return This writer @@ -1000,18 +1005,20 @@ public class PrintWriter extends Writer { /** * Appends a subsequence of the specified character sequence to this writer. * - *

An invocation of this method of the form out.append(csq, start, - * end) when csq is not null, behaves in + *

An invocation of this method of the form + * {@code out.append(csq, start, end)} + * when {@code csq} is not {@code null}, behaves in * exactly the same way as the invocation * - *

-     *     out.write(csq.subSequence(start, end).toString()) 
+ *
{@code
+     *     out.write(csq.subSequence(start, end).toString())
+     * }
* * @param csq * The character sequence from which a subsequence will be - * appended. If csq is null, then characters - * will be appended as if csq contained the four - * characters "null". + * appended. If {@code csq} is {@code null}, then characters + * will be appended as if {@code csq} contained the four + * characters {@code "null"}. * * @param start * The index of the first character in the subsequence @@ -1023,9 +1030,9 @@ public class PrintWriter extends Writer { * @return This writer * * @throws IndexOutOfBoundsException - * If start or end are negative, start - * is greater than end, or end is greater than - * csq.length() + * If {@code start} or {@code end} are negative, {@code start} + * is greater than {@code end}, or {@code end} is greater than + * {@code csq.length()} * * @since 1.5 */ @@ -1038,11 +1045,12 @@ public class PrintWriter extends Writer { /** * Appends the specified character to this writer. * - *

An invocation of this method of the form out.append(c) + *

An invocation of this method of the form {@code out.append(c)} * behaves in exactly the same way as the invocation * - *

-     *     out.write(c) 
+ *
{@code
+     *     out.write(c)
+     * }
* * @param c * The 16-bit character to append diff --git a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java index 34f32f69421..db6ae71f89f 100644 --- a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -82,10 +82,10 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * {@link FileDescriptor} object is created to represent the * connection to the file. * - *

The mode argument specifies the access mode with which the + *

The {@code mode} argument specifies the access mode with which the * file is to be opened. The permitted values and their meanings are as * specified for the RandomAccessFile(File,String) constructor. + * href="#mode">{@code RandomAccessFile(File,String)} constructor. * *

* If there is a security manager, its {@code checkRead} method @@ -99,19 +99,19 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * @param name the system-dependent filename * @param mode the access mode * @exception IllegalArgumentException if the mode argument is not equal - * to one of "r", "rw", "rws", or - * "rwd" + * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or + * {@code "rwd"} * @exception FileNotFoundException - * if the mode is "r" but the given string does not + * if the mode is {@code "r"} but the given string does not * denote an existing regular file, or if the mode begins with - * "rw" but the given string does not denote an + * {@code "rw"} but the given string does not denote an * existing, writable regular file and a new regular file of * that name cannot be created, or if some other error occurs * while opening or creating the file - * @exception SecurityException if a security manager exists and its - * {@code checkRead} method denies read access to the file - * or the mode is "rw" and the security manager's - * {@code checkWrite} method denies write access to the file + * @exception SecurityException if a security manager exists and its + * {@code checkRead} method denies read access to the file + * or the mode is {@code "rw"} and the security manager's + * {@code checkWrite} method denies write access to the file * @see java.lang.SecurityException * @see java.lang.SecurityManager#checkRead(java.lang.String) * @see java.lang.SecurityManager#checkWrite(java.lang.String) @@ -129,33 +129,33 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * write to, the file specified by the {@link File} argument. A new {@link * FileDescriptor} object is created to represent this file connection. * - *

The mode argument specifies the access mode + *

The {@code mode} argument specifies the access mode * in which the file is to be opened. The permitted values and their * meanings are: * * * - * - * - * + * + * + * * - * - * + * + * - * - * + * + * + * synchronously to the underlying storage device. *
ValueMeaning
"r" Open for reading only. Invoking any of the write - * methods of the resulting object will cause an {@link - * java.io.IOException} to be thrown.
"rw"
{@code "r"} Open for reading only. Invoking any of the {@code write} + * methods of the resulting object will cause an + * {@link java.io.IOException} to be thrown.
{@code "rw"} Open for reading and writing. If the file does not already - * exist then an attempt will be made to create it.
"rws" Open for reading and writing, as with "rw", and also + * exist then an attempt will be made to create it.
{@code "rws"} Open for reading and writing, as with {@code "rw"}, and also * require that every update to the file's content or metadata be - * written synchronously to the underlying storage device.
"rwd"   Open for reading and writing, as with "rw", and also + * written synchronously to the underlying storage device.
{@code "rwd"} Open for reading and writing, as with {@code "rw"}, and also * require that every update to the file's content be written - * synchronously to the underlying storage device.
* - * The "rws" and "rwd" modes work much like the {@link + * The {@code "rws"} and {@code "rwd"} modes work much like the {@link * java.nio.channels.FileChannel#force(boolean) force(boolean)} method of * the {@link java.nio.channels.FileChannel} class, passing arguments of - * true and false, respectively, except that they always + * {@code true} and {@code false}, respectively, except that they always * apply to every I/O operation and are therefore often more efficient. If * the file resides on a local storage device then when an invocation of a * method of this class returns it is guaranteed that all changes made to @@ -164,9 +164,9 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * event of a system crash. If the file does not reside on a local device * then no such guarantee is made. * - *

The "rwd" mode can be used to reduce the number of I/O - * operations performed. Using "rwd" only requires updates to the - * file's content to be written to storage; using "rws" requires + *

The {@code "rwd"} mode can be used to reduce the number of I/O + * operations performed. Using {@code "rwd"} only requires updates to the + * file's content to be written to storage; using {@code "rws"} requires * updates to both the file's content and its metadata to be written, which * generally requires at least one more low-level I/O operation. * @@ -181,19 +181,19 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * @param mode the access mode, as described * above * @exception IllegalArgumentException if the mode argument is not equal - * to one of "r", "rw", "rws", or - * "rwd" + * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or + * {@code "rwd"} * @exception FileNotFoundException - * if the mode is "r" but the given file object does + * if the mode is {@code "r"} but the given file object does * not denote an existing regular file, or if the mode begins - * with "rw" but the given file object does not denote + * with {@code "rw"} but the given file object does not denote * an existing, writable regular file and a new regular file of * that name cannot be created, or if some other error occurs * while opening or creating the file - * @exception SecurityException if a security manager exists and its - * {@code checkRead} method denies read access to the file - * or the mode is "rw" and the security manager's - * {@code checkWrite} method denies write access to the file + * @exception SecurityException if a security manager exists and its + * {@code checkRead} method denies read access to the file + * or the mode is {@code "rw"} and the security manager's + * {@code checkWrite} method denies write access to the file * @see java.lang.SecurityManager#checkRead(java.lang.String) * @see java.lang.SecurityManager#checkWrite(java.lang.String) * @see java.nio.channels.FileChannel#force(boolean) diff --git a/jdk/src/java.base/share/classes/java/io/Reader.java b/jdk/src/java.base/share/classes/java/io/Reader.java index b4bab79dab5..0045f00b6fd 100644 --- a/jdk/src/java.base/share/classes/java/io/Reader.java +++ b/jdk/src/java.base/share/classes/java/io/Reader.java @@ -54,7 +54,7 @@ public abstract class Reader implements Readable, Closeable { * The object used to synchronize operations on this stream. For * efficiency, a character-stream object may use an object other than * itself to protect critical sections. A subclass should therefore use - * the object in this field rather than this or a synchronized + * the object in this field rather than {@code this} or a synchronized * method. */ protected Object lock; @@ -111,7 +111,7 @@ public abstract class Reader implements Readable, Closeable { * should override this method. * * @return The character read, as an integer in the range 0 to 65535 - * (0x00-0xffff), or -1 if the end of the stream has + * ({@code 0x00-0xffff}), or -1 if the end of the stream has * been reached * * @exception IOException If an I/O error occurs diff --git a/jdk/src/java.base/share/classes/java/io/StringWriter.java b/jdk/src/java.base/share/classes/java/io/StringWriter.java index c62d82f4ea8..5d1babc3127 100644 --- a/jdk/src/java.base/share/classes/java/io/StringWriter.java +++ b/jdk/src/java.base/share/classes/java/io/StringWriter.java @@ -30,9 +30,9 @@ package java.io; * A character stream that collects its output in a string buffer, which can * then be used to construct a string. *

- * Closing a StringWriter has no effect. The methods in this class + * Closing a {@code StringWriter} has no effect. The methods in this class * can be called after the stream has been closed without generating an - * IOException. + * {@code IOException}. * * @author Mark Reinhold * @since 1.1 @@ -56,11 +56,11 @@ public class StringWriter extends Writer { * size. * * @param initialSize - * The number of char values that will fit into this buffer + * The number of {@code char} values that will fit into this buffer * before it is automatically expanded * * @throws IllegalArgumentException - * If initialSize is negative + * If {@code initialSize} is negative */ public StringWriter(int initialSize) { if (initialSize < 0) { @@ -115,21 +115,21 @@ public class StringWriter extends Writer { /** * Appends the specified character sequence to this writer. * - *

An invocation of this method of the form out.append(csq) + *

An invocation of this method of the form {@code out.append(csq)} * behaves in exactly the same way as the invocation * *

      *     out.write(csq.toString()) 
* - *

Depending on the specification of toString for the - * character sequence csq, the entire sequence may not be - * appended. For instance, invoking the toString method of a + *

Depending on the specification of {@code toString} for the + * character sequence {@code csq}, the entire sequence may not be + * appended. For instance, invoking the {@code toString} method of a * character buffer will return a subsequence whose content depends upon * the buffer's position and limit. * * @param csq - * The character sequence to append. If csq is - * null, then the four characters "null" are + * The character sequence to append. If {@code csq} is + * {@code null}, then the four characters "{@code null}" are * appended to this writer. * * @return This writer @@ -147,18 +147,20 @@ public class StringWriter extends Writer { /** * Appends a subsequence of the specified character sequence to this writer. * - *

An invocation of this method of the form out.append(csq, start, - * end) when csq is not null, behaves in + *

An invocation of this method of the form + * {@code out.append(csq, start, end)} when {@code csq} + * is not {@code null}, behaves in * exactly the same way as the invocation * - *

-     *     out.write(csq.subSequence(start, end).toString()) 
+ *
{@code
+     *     out.write(csq.subSequence(start, end).toString())
+     * }
* * @param csq * The character sequence from which a subsequence will be - * appended. If csq is null, then characters - * will be appended as if csq contained the four - * characters "null". + * appended. If {@code csq} is {@code null}, then characters + * will be appended as if {@code csq} contained the four + * characters "{@code null}". * * @param start * The index of the first character in the subsequence @@ -170,9 +172,9 @@ public class StringWriter extends Writer { * @return This writer * * @throws IndexOutOfBoundsException - * If start or end are negative, start - * is greater than end, or end is greater than - * csq.length() + * If {@code start} or {@code end} are negative, {@code start} + * is greater than {@code end}, or {@code end} is greater than + * {@code csq.length()} * * @since 1.5 */ @@ -185,7 +187,7 @@ public class StringWriter extends Writer { /** * Appends the specified character to this writer. * - *

An invocation of this method of the form out.append(c) + *

An invocation of this method of the form {@code out.append(c)} * behaves in exactly the same way as the invocation * *

@@ -226,9 +228,9 @@ public class StringWriter extends Writer {
     }
 
     /**
-     * Closing a StringWriter has no effect. The methods in this
+     * Closing a {@code StringWriter} has no effect. The methods in this
      * class can be called after the stream has been closed without generating
-     * an IOException.
+     * an {@code IOException}.
      */
     public void close() throws IOException {
     }
diff --git a/jdk/src/java.base/share/classes/java/io/Writer.java b/jdk/src/java.base/share/classes/java/io/Writer.java
index 68ae7b3822e..85d9290c2e1 100644
--- a/jdk/src/java.base/share/classes/java/io/Writer.java
+++ b/jdk/src/java.base/share/classes/java/io/Writer.java
@@ -63,7 +63,7 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
      * The object used to synchronize operations on this stream.  For
      * efficiency, a character-stream object may use an object other than
      * itself to protect critical sections.  A subclass should therefore use
-     * the object in this field rather than this or a synchronized
+     * the object in this field rather than {@code this} or a synchronized
      * method.
      */
     protected Object lock;
@@ -170,8 +170,8 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
      *         Number of characters to write
      *
      * @throws  IndexOutOfBoundsException
-     *          If off is negative, or len is negative,
-     *          or off+len is negative or greater than the length
+     *          If {@code off} is negative, or {@code len} is negative,
+     *          or {@code off+len} is negative or greater than the length
      *          of the given string
      *
      * @throws  IOException
@@ -196,21 +196,21 @@ public abstract class Writer implements Appendable, Closeable, Flushable {
     /**
      * Appends the specified character sequence to this writer.
      *
-     * 

An invocation of this method of the form out.append(csq) + *

An invocation of this method of the form {@code out.append(csq)} * behaves in exactly the same way as the invocation * *

      *     out.write(csq.toString()) 
* - *

Depending on the specification of toString for the - * character sequence csq, the entire sequence may not be - * appended. For instance, invoking the toString method of a + *

Depending on the specification of {@code toString} for the + * character sequence {@code csq}, the entire sequence may not be + * appended. For instance, invoking the {@code toString} method of a * character buffer will return a subsequence whose content depends upon * the buffer's position and limit. * * @param csq - * The character sequence to append. If csq is - * null, then the four characters "null" are + * The character sequence to append. If {@code csq} is + * {@code null}, then the four characters "{@code null}" are * appended to this writer. * * @return This writer @@ -230,20 +230,22 @@ public abstract class Writer implements Appendable, Closeable, Flushable { /** * Appends a subsequence of the specified character sequence to this writer. - * Appendable. + * {@code Appendable}. * - *

An invocation of this method of the form out.append(csq, start, - * end) when csq is not null behaves in exactly the + *

An invocation of this method of the form + * {@code out.append(csq, start, end)} when {@code csq} + * is not {@code null} behaves in exactly the * same way as the invocation * - *

-     *     out.write(csq.subSequence(start, end).toString()) 
+ *
{@code
+     *     out.write(csq.subSequence(start, end).toString())
+     * }
* * @param csq * The character sequence from which a subsequence will be - * appended. If csq is null, then characters - * will be appended as if csq contained the four - * characters "null". + * appended. If {@code csq} is {@code null}, then characters + * will be appended as if {@code csq} contained the four + * characters "{@code null}". * * @param start * The index of the first character in the subsequence @@ -255,9 +257,9 @@ public abstract class Writer implements Appendable, Closeable, Flushable { * @return This writer * * @throws IndexOutOfBoundsException - * If start or end are negative, start - * is greater than end, or end is greater than - * csq.length() + * If {@code start} or {@code end} are negative, {@code start} + * is greater than {@code end}, or {@code end} is greater than + * {@code csq.length()} * * @throws IOException * If an I/O error occurs @@ -273,7 +275,7 @@ public abstract class Writer implements Appendable, Closeable, Flushable { /** * Appends the specified character to this writer. * - *

An invocation of this method of the form out.append(c) + *

An invocation of this method of the form {@code out.append(c)} * behaves in exactly the same way as the invocation * *

diff --git a/jdk/src/java.base/share/classes/java/lang/Appendable.java b/jdk/src/java.base/share/classes/java/lang/Appendable.java
index 46fd78de258..0113d6f63f5 100644
--- a/jdk/src/java.base/share/classes/java/lang/Appendable.java
+++ b/jdk/src/java.base/share/classes/java/lang/Appendable.java
@@ -28,15 +28,15 @@ package java.lang;
 import java.io.IOException;
 
 /**
- * An object to which char sequences and values can be appended.  The
- * Appendable interface must be implemented by any class whose
+ * An object to which {@code char} sequences and values can be appended.  The
+ * {@code Appendable} interface must be implemented by any class whose
  * instances are intended to receive formatted output from a {@link
  * java.util.Formatter}.
  *
  * 

The characters to be appended should be valid Unicode characters as * described in Unicode Character * Representation. Note that supplementary characters may be composed of - * multiple 16-bit char values. + * multiple 16-bit {@code char} values. * *

Appendables are not necessarily safe for multithreaded access. Thread * safety is the responsibility of classes that extend and implement this @@ -51,19 +51,19 @@ import java.io.IOException; public interface Appendable { /** - * Appends the specified character sequence to this Appendable. + * Appends the specified character sequence to this {@code Appendable}. * *

Depending on which class implements the character sequence - * csq, the entire sequence may not be appended. For - * instance, if csq is a {@link java.nio.CharBuffer} then + * {@code csq}, the entire sequence may not be appended. For + * instance, if {@code csq} is a {@link java.nio.CharBuffer} then * the subsequence to append is defined by the buffer's position and limit. * * @param csq - * The character sequence to append. If csq is - * null, then the four characters "null" are + * The character sequence to append. If {@code csq} is + * {@code null}, then the four characters {@code "null"} are * appended to this Appendable. * - * @return A reference to this Appendable + * @return A reference to this {@code Appendable} * * @throws IOException * If an I/O error occurs @@ -72,10 +72,10 @@ public interface Appendable { /** * Appends a subsequence of the specified character sequence to this - * Appendable. + * {@code Appendable}. * - *

An invocation of this method of the form out.append(csq, start, - * end) when csq is not null, behaves in + *

An invocation of this method of the form {@code out.append(csq, start, end)} + * when {@code csq} is not {@code null}, behaves in * exactly the same way as the invocation * *

@@ -83,9 +83,9 @@ public interface Appendable {
      *
      * @param  csq
      *         The character sequence from which a subsequence will be
-     *         appended.  If csq is null, then characters
-     *         will be appended as if csq contained the four
-     *         characters "null".
+     *         appended.  If {@code csq} is {@code null}, then characters
+     *         will be appended as if {@code csq} contained the four
+     *         characters {@code "null"}.
      *
      * @param  start
      *         The index of the first character in the subsequence
@@ -94,12 +94,12 @@ public interface Appendable {
      *         The index of the character following the last character in the
      *         subsequence
      *
-     * @return  A reference to this Appendable
+     * @return  A reference to this {@code Appendable}
      *
      * @throws  IndexOutOfBoundsException
-     *          If start or end are negative, start
-     *          is greater than end, or end is greater than
-     *          csq.length()
+     *          If {@code start} or {@code end} are negative, {@code start}
+     *          is greater than {@code end}, or {@code end} is greater than
+     *          {@code csq.length()}
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -107,12 +107,12 @@ public interface Appendable {
     Appendable append(CharSequence csq, int start, int end) throws IOException;
 
     /**
-     * Appends the specified character to this Appendable.
+     * Appends the specified character to this {@code Appendable}.
      *
      * @param  c
      *         The character to append
      *
-     * @return  A reference to this Appendable
+     * @return  A reference to this {@code Appendable}
      *
      * @throws  IOException
      *          If an I/O error occurs
diff --git a/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java b/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java
index 512cfc1c22b..648725cb331 100644
--- a/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java
+++ b/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java
@@ -28,7 +28,7 @@ import java.util.*;
 
 /*
  * Class to track and run user level shutdown hooks registered through
- * {@link Runtime#addShutdownHook Runtime.addShutdownHook}.
+ * {@link Runtime#addShutdownHook Runtime.addShutdownHook}.
  *
  * @see java.lang.Runtime#addShutdownHook
  * @see java.lang.Runtime#removeShutdownHook
diff --git a/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java b/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java
index 7ae730e35e9..7746db2bee0 100644
--- a/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java
+++ b/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java
@@ -29,8 +29,8 @@ package java.lang;
  * A collection of assertion status directives (such as "enable assertions
  * in package p" or "disable assertions in class c").  This class is used by
  * the JVM to communicate the assertion status directives implied by
- * the java command line flags -enableassertions
- * (-ea) and -disableassertions (-da).
+ * the {@code java} command line flags {@code -enableassertions}
+ * ({@code -ea}) and {@code -disableassertions} ({@code -da}).
  *
  * @since  1.4
  * @author Josh Bloch
@@ -44,19 +44,19 @@ class AssertionStatusDirectives {
     String[] classes;
 
     /**
-     * A parallel array to classes, indicating whether each class
-     * is to have assertions enabled or disabled.  A value of true
-     * for classEnabled[i] indicates that the class named by
-     * classes[i] should have assertions enabled; a value of
-     * false indicates that it should have classes disabled.
-     * This array must have the same number of elements as classes.
+     * A parallel array to {@code classes}, indicating whether each class
+     * is to have assertions enabled or disabled.  A value of {@code true}
+     * for {@code classEnabled[i]} indicates that the class named by
+     * {@code classes[i]} should have assertions enabled; a value of
+     * {@code false} indicates that it should have classes disabled.
+     * This array must have the same number of elements as {@code classes}.
      *
      * 

In the case of conflicting directives for the same class, the * last directive for a given class wins. In other words, if a string - * s appears multiple times in the classes array - * and i is the highest integer for which - * classes[i].equals(s), then classEnabled[i] - * indicates whether assertions are to be enabled in class s. + * {@code s} appears multiple times in the {@code classes} array + * and {@code i} is the highest integer for which + * {@code classes[i].equals(s)}, then {@code classEnabled[i]} + * indicates whether assertions are to be enabled in class {@code s}. */ boolean[] classEnabled; @@ -68,21 +68,21 @@ class AssertionStatusDirectives { String[] packages; /** - * A parallel array to packages, indicating whether each + * A parallel array to {@code packages}, indicating whether each * package-tree is to have assertions enabled or disabled. A value of - * true for packageEnabled[i] indicates that the - * package-tree named by packages[i] should have assertions - * enabled; a value of false indicates that it should have + * {@code true} for {@code packageEnabled[i]} indicates that the + * package-tree named by {@code packages[i]} should have assertions + * enabled; a value of {@code false} indicates that it should have * assertions disabled. This array must have the same number of - * elements as packages. + * elements as {@code packages}. * * In the case of conflicting directives for the same package-tree, the * last directive for a given package-tree wins. In other words, if a - * string s appears multiple times in the packages array - * and i is the highest integer for which - * packages[i].equals(s), then packageEnabled[i] + * string {@code s} appears multiple times in the {@code packages} array + * and {@code i} is the highest integer for which + * {@code packages[i].equals(s)}, then {@code packageEnabled[i]} * indicates whether assertions are to be enabled in package-tree - * s. + * {@code s}. */ boolean[] packageEnabled; diff --git a/jdk/src/java.base/share/classes/java/lang/CharSequence.java b/jdk/src/java.base/share/classes/java/lang/CharSequence.java index 4d9ab3f7bc1..32b98fc4449 100644 --- a/jdk/src/java.base/share/classes/java/lang/CharSequence.java +++ b/jdk/src/java.base/share/classes/java/lang/CharSequence.java @@ -34,21 +34,21 @@ import java.util.stream.IntStream; import java.util.stream.StreamSupport; /** - * A CharSequence is a readable sequence of char values. This + * A {@code CharSequence} is a readable sequence of {@code char} values. This * interface provides uniform, read-only access to many different kinds of - * char sequences. - * A char value represents a character in the Basic + * {@code char} sequences. + * A {@code char} value represents a character in the Basic * Multilingual Plane (BMP) or a surrogate. Refer to Unicode Character Representation for details. * *

This interface does not refine the general contracts of the {@link * java.lang.Object#equals(java.lang.Object) equals} and {@link * java.lang.Object#hashCode() hashCode} methods. The result of comparing two - * objects that implement CharSequence is therefore, in general, + * objects that implement {@code CharSequence} is therefore, in general, * undefined. Each object may be implemented by a different class, and there * is no guarantee that each class will be capable of testing its instances * for equality with those of the other. It is therefore inappropriate to use - * arbitrary CharSequence instances as elements in a set or as keys in + * arbitrary {@code CharSequence} instances as elements in a set or as keys in * a map.

* * @author Mike McCloskey @@ -60,38 +60,38 @@ public interface CharSequence { /** * Returns the length of this character sequence. The length is the number - * of 16-bit chars in the sequence. + * of 16-bit {@code char}s in the sequence. * - * @return the number of chars in this sequence + * @return the number of {@code char}s in this sequence */ int length(); /** - * 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 + * Returns the {@code char} value at the specified index. An index ranges from zero + * to {@code length() - 1}. The first {@code char} value of the sequence is at * index zero, the next at index one, and so on, as for array * indexing. * - *

If the char value specified by the index is a + *

If the {@code char} value specified by the index is a * surrogate, the surrogate * value is returned. * - * @param index the index of the char value to be returned + * @param index the index of the {@code char} value to be returned * - * @return the specified char value + * @return the specified {@code char} value * * @throws IndexOutOfBoundsException - * if the index argument is negative or not less than - * length() + * if the {@code index} argument is negative or not less than + * {@code length()} */ char charAt(int index); /** - * Returns a CharSequence that is a subsequence of this sequence. - * The subsequence starts with the char value at the specified index and - * ends with the char value at index end - 1. The length - * (in chars) of the - * returned sequence is end - start, so if start == end + * Returns a {@code CharSequence} that is a subsequence of this sequence. + * The subsequence starts with the {@code char} value at the specified index and + * ends with the {@code char} value at index {@code end - 1}. The length + * (in {@code char}s) of the + * returned sequence is {@code end - start}, so if {@code start == end} * then an empty sequence is returned. * * @param start the start index, inclusive @@ -100,9 +100,9 @@ public interface CharSequence { * @return the specified subsequence * * @throws IndexOutOfBoundsException - * if start or end are negative, - * if end is greater than length(), - * or if start is greater than end + * if {@code start} or {@code end} are negative, + * if {@code end} is greater than {@code length()}, + * or if {@code start} is greater than {@code end} */ CharSequence subSequence(int start, int end); diff --git a/jdk/src/java.base/share/classes/java/lang/Character.java b/jdk/src/java.base/share/classes/java/lang/Character.java index a4e806876dc..25783cb45a8 100644 --- a/jdk/src/java.base/share/classes/java/lang/Character.java +++ b/jdk/src/java.base/share/classes/java/lang/Character.java @@ -3502,7 +3502,7 @@ class Character implements java.io.Serializable, Comparable { /** * Returns the UnicodeBlock with the given name. Block * names are determined by The Unicode Standard. The file - * Blocks-<version>.txt defines blocks for a particular + * {@code Blocks-.txt} defines blocks for a particular * version of the standard. The {@link Character} class specifies * the version of the standard that it supports. *

@@ -7195,8 +7195,8 @@ class Character implements java.io.Serializable, Comparable { /** * Returns the UnicodeScript constant with the given Unicode script * name or the script name alias. Script names and their aliases are - * determined by The Unicode Standard. The files Scripts<version>.txt - * and PropertyValueAliases<version>.txt define script names + * determined by The Unicode Standard. The files {@code Scripts.txt} + * and {@code PropertyValueAliases.txt} define script names * and the script name aliases for a particular version of the * standard. The {@link Character} class specifies the version of * the standard that it supports. @@ -7255,9 +7255,9 @@ class Character implements java.io.Serializable, Comparable { } /** - * Returns a Character instance representing the specified - * char value. - * If a new Character instance is not required, this method + * Returns a {@code Character} instance representing the specified + * {@code char} value. + * If a new {@code Character} instance is not required, this method * should generally be used in preference to the constructor * {@link #Character(char)}, as this method is likely to yield * significantly better space and time performance by caching @@ -7268,7 +7268,7 @@ class Character implements java.io.Serializable, Comparable { * cache other values outside of this range. * * @param c a char value. - * @return a Character instance representing c. + * @return a {@code Character} instance representing {@code c}. * @since 1.5 */ @HotSpotIntrinsicCandidate @@ -9871,7 +9871,7 @@ class Character implements java.io.Serializable, Comparable { } /** - * The number of bits used to represent a char value in unsigned + * The number of bits used to represent a {@code char} value in unsigned * binary form, constant {@code 16}. * * @since 1.5 @@ -9888,11 +9888,11 @@ class Character implements java.io.Serializable, Comparable { /** * Returns the value obtained by reversing the order of the bytes in the - * specified char value. + * specified {@code 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. + * the bytes in the specified {@code char} value. * @since 1.5 */ @HotSpotIntrinsicCandidate diff --git a/jdk/src/java.base/share/classes/java/lang/ClassNotFoundException.java b/jdk/src/java.base/share/classes/java/lang/ClassNotFoundException.java index 7ac8374ff8f..2f20dcef627 100644 --- a/jdk/src/java.base/share/classes/java/lang/ClassNotFoundException.java +++ b/jdk/src/java.base/share/classes/java/lang/ClassNotFoundException.java @@ -98,7 +98,7 @@ public class ClassNotFoundException extends ReflectiveOperationException { /** * Returns the exception that was raised if an error occurred while - * attempting to load the class. Otherwise, returns null. + * attempting to load the class. Otherwise, returns {@code null}. * *

This method predates the general-purpose exception chaining facility. * The {@link Throwable#getCause()} method is now the preferred means of @@ -114,7 +114,7 @@ public class ClassNotFoundException extends ReflectiveOperationException { /** * Returns the cause of this exception (the exception that was raised * if an error occurred while attempting to load the class; otherwise - * null). + * {@code null}). * * @return the cause of this exception. * @since 1.4 diff --git a/jdk/src/java.base/share/classes/java/lang/Cloneable.java b/jdk/src/java.base/share/classes/java/lang/Cloneable.java index d251449e741..f1bec051655 100644 --- a/jdk/src/java.base/share/classes/java/lang/Cloneable.java +++ b/jdk/src/java.base/share/classes/java/lang/Cloneable.java @@ -36,11 +36,11 @@ package java.lang; * CloneNotSupportedException being thrown. *

* By convention, classes that implement this interface should override - * Object.clone (which is protected) with a public method. + * {@code Object.clone} (which is protected) with a public method. * See {@link java.lang.Object#clone()} for details on overriding this * method. *

- * Note that this interface does not contain the clone method. + * Note that this interface does not contain the {@code clone} method. * Therefore, it is not possible to clone an object merely by virtue of the * fact that it implements this interface. Even if the clone method is invoked * reflectively, there is no guarantee that it will succeed. diff --git a/jdk/src/java.base/share/classes/java/lang/Comparable.java b/jdk/src/java.base/share/classes/java/lang/Comparable.java index a88cf167fbd..ff8892caacf 100644 --- a/jdk/src/java.base/share/classes/java/lang/Comparable.java +++ b/jdk/src/java.base/share/classes/java/lang/Comparable.java @@ -29,7 +29,7 @@ import java.util.*; /** * This interface imposes a total ordering on the objects of each class that * implements it. This ordering is referred to as the class's natural - * ordering, and the class's compareTo method is referred to as + * ordering, and the class's {@code compareTo} method is referred to as * its natural comparison method.

* * Lists (and arrays) of objects that implement this interface can be sorted @@ -39,45 +39,45 @@ import java.util.*; * elements in a {@linkplain SortedSet sorted set}, without the need to * specify a {@linkplain Comparator comparator}.

* - * The natural ordering for a class C is said to be consistent - * with equals if and only if e1.compareTo(e2) == 0 has - * the same boolean value as e1.equals(e2) for every - * e1 and e2 of class C. Note that null - * is not an instance of any class, and e.compareTo(null) should - * throw a NullPointerException even though e.equals(null) - * returns false.

+ * The natural ordering for a class {@code C} is said to be consistent + * with equals if and only if {@code e1.compareTo(e2) == 0} has + * the same boolean value as {@code e1.equals(e2)} for every + * {@code e1} and {@code e2} of class {@code C}. Note that {@code null} + * is not an instance of any class, and {@code e.compareTo(null)} should + * throw a {@code NullPointerException} even though {@code e.equals(null)} + * returns {@code false}.

* * It is strongly recommended (though not required) that natural orderings be * consistent with equals. This is so because sorted sets (and sorted maps) * without explicit comparators behave "strangely" when they are used with * elements (or keys) whose natural ordering is inconsistent with equals. In * particular, such a sorted set (or sorted map) violates the general contract - * for set (or map), which is defined in terms of the equals + * for set (or map), which is defined in terms of the {@code equals} * method.

* - * For example, if one adds two keys a and b such that + * For example, if one adds two keys {@code a} and {@code b} such that * {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted - * set that does not use an explicit comparator, the second add + * set that does not use an explicit comparator, the second {@code add} * operation returns false (and the size of the sorted set does not increase) - * because a and b are equivalent from the sorted set's + * because {@code a} and {@code b} are equivalent from the sorted set's * perspective.

* - * Virtually all Java core classes that implement Comparable have natural + * Virtually all Java core classes that implement {@code Comparable} have natural * orderings that are consistent with equals. One exception is - * java.math.BigDecimal, whose natural ordering equates - * BigDecimal objects with equal values and different precisions + * {@code java.math.BigDecimal}, whose natural ordering equates + * {@code BigDecimal} objects with equal values and different precisions * (such as 4.0 and 4.00).

* * For the mathematically inclined, the relation that defines - * the natural ordering on a given class C is:

- *       {(x, y) such that x.compareTo(y) <= 0}.
- * 
The quotient for this total order is:
+ * the natural ordering on a given class C is:
{@code
+ *       {(x, y) such that x.compareTo(y) <= 0}.
+ * }
The quotient for this total order is:
{@code
  *       {(x, y) such that x.compareTo(y) == 0}.
- * 
+ * }
* - * It follows immediately from the contract for compareTo that the - * quotient is an equivalence relation on C, and that the - * natural ordering is a total order on C. When we say that a + * It follows immediately from the contract for {@code compareTo} that the + * quotient is an equivalence relation on {@code C}, and that the + * natural ordering is a total order on {@code C}. When we say that a * class's natural ordering is consistent with equals, we mean that the * quotient for the natural ordering is the equivalence relation defined by * the class's {@link Object#equals(Object) equals(Object)} method:
@@ -99,30 +99,31 @@ public interface Comparable {
      * negative integer, zero, or a positive integer as this object is less
      * than, equal to, or greater than the specified object.
      *
-     * 

The implementor must ensure sgn(x.compareTo(y)) == - * -sgn(y.compareTo(x)) for all x and y. (This - * implies that x.compareTo(y) must throw an exception iff - * y.compareTo(x) throws an exception.) + *

The implementor must ensure + * {@code sgn(x.compareTo(y)) == -sgn(y.compareTo(x))} + * for all {@code x} and {@code y}. (This + * implies that {@code x.compareTo(y)} must throw an exception iff + * {@code y.compareTo(x)} throws an exception.) * *

The implementor must also ensure that the relation is transitive: - * (x.compareTo(y)>0 && y.compareTo(z)>0) implies - * x.compareTo(z)>0. + * {@code (x.compareTo(y) > 0 && y.compareTo(z) > 0)} implies + * {@code x.compareTo(z) > 0}. * - *

Finally, the implementor must ensure that x.compareTo(y)==0 - * implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for - * all z. + *

Finally, the implementor must ensure that {@code x.compareTo(y)==0} + * implies that {@code sgn(x.compareTo(z)) == sgn(y.compareTo(z))}, for + * all {@code z}. * *

It is strongly recommended, but not strictly required that - * (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any - * class that implements the Comparable interface and violates + * {@code (x.compareTo(y)==0) == (x.equals(y))}. Generally speaking, any + * class that implements the {@code Comparable} interface and violates * this condition should clearly indicate this fact. The recommended * language is "Note: this class has a natural ordering that is * inconsistent with equals." * *

In the foregoing description, the notation - * sgn(expression) designates the mathematical - * signum function, which is defined to return one of -1, - * 0, or 1 according to whether the value of + * {@code sgn(}expression{@code )} designates the mathematical + * signum function, which is defined to return one of {@code -1}, + * {@code 0}, or {@code 1} according to whether the value of * expression is negative, zero or positive. * * @param o the object to be compared. diff --git a/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java b/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java index 17731606ea4..78aeb204e81 100644 --- a/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java +++ b/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java @@ -51,7 +51,7 @@ public class EnumConstantNotPresentException extends RuntimeException { private String constantName; /** - * Constructs an EnumConstantNotPresentException for the + * Constructs an {@code EnumConstantNotPresentException} for the * specified constant. * * @param enumType the type of the missing enum constant diff --git a/jdk/src/java.base/share/classes/java/lang/Exception.java b/jdk/src/java.base/share/classes/java/lang/Exception.java index 034f4de2aa5..d81048eda19 100644 --- a/jdk/src/java.base/share/classes/java/lang/Exception.java +++ b/jdk/src/java.base/share/classes/java/lang/Exception.java @@ -75,7 +75,7 @@ public class Exception extends Throwable { * @param message the detail message (which is saved for later retrieval * by the {@link #getMessage()} method). * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A null value is + * {@link #getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.4 @@ -86,14 +86,14 @@ public class Exception extends Throwable { /** * Constructs a new exception with the specified cause and a detail - * message of (cause==null ? null : cause.toString()) (which - * typically contains the class and detail message of cause). + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). * This constructor is useful for exceptions that are little more than * wrappers for other throwables (for example, {@link * java.security.PrivilegedActionException}). * * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A null value is + * {@link #getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.4 diff --git a/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java b/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java index 4c9a014462d..67559f8f4dd 100644 --- a/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java +++ b/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java @@ -63,7 +63,7 @@ class IllegalArgumentException extends RuntimeException { * @param message the detail message (which is saved for later retrieval * by the {@link Throwable#getMessage()} method). * @param cause the cause (which is saved for later retrieval by the - * {@link Throwable#getCause()} method). (A null value + * {@link Throwable#getCause()} method). (A {@code null} value * is permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.5 @@ -74,14 +74,14 @@ class IllegalArgumentException extends RuntimeException { /** * Constructs a new exception with the specified cause and a detail - * message of (cause==null ? null : cause.toString()) (which - * typically contains the class and detail message of cause). + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). * This constructor is useful for exceptions that are little more than * wrappers for other throwables (for example, {@link * java.security.PrivilegedActionException}). * * @param cause the cause (which is saved for later retrieval by the - * {@link Throwable#getCause()} method). (A null value is + * {@link Throwable#getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java b/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java index 9b1cf3039c5..7cef7a19abc 100644 --- a/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java +++ b/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java @@ -66,7 +66,7 @@ class IllegalStateException extends RuntimeException { * @param message the detail message (which is saved for later retrieval * by the {@link Throwable#getMessage()} method). * @param cause the cause (which is saved for later retrieval by the - * {@link Throwable#getCause()} method). (A null value + * {@link Throwable#getCause()} method). (A {@code null} value * is permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.5 @@ -77,14 +77,14 @@ class IllegalStateException extends RuntimeException { /** * Constructs a new exception with the specified cause and a detail - * message of (cause==null ? null : cause.toString()) (which - * typically contains the class and detail message of cause). + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). * This constructor is useful for exceptions that are little more than * wrappers for other throwables (for example, {@link * java.security.PrivilegedActionException}). * * @param cause the cause (which is saved for later retrieval by the - * {@link Throwable#getCause()} method). (A null value is + * {@link Throwable#getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java b/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java index 935c5f19d08..07ea6be5d1e 100644 --- a/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java +++ b/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java @@ -27,12 +27,12 @@ package java.lang; import java.lang.ref.*; /** - * This class extends ThreadLocal to provide inheritance of values + * This class extends {@code ThreadLocal} to provide inheritance of values * from parent thread to child thread: when a child thread is created, the * child receives initial values for all inheritable thread-local variables * for which the parent has values. Normally the child's values will be * identical to the parent's; however, the child's value can be made an - * arbitrary function of the parent's by overriding the childValue + * arbitrary function of the parent's by overriding the {@code childValue} * method in this class. * *

Inheritable thread-local variables are used in preference to diff --git a/jdk/src/java.base/share/classes/java/lang/Readable.java b/jdk/src/java.base/share/classes/java/lang/Readable.java index c7a3d1a800a..2cc40c0db02 100644 --- a/jdk/src/java.base/share/classes/java/lang/Readable.java +++ b/jdk/src/java.base/share/classes/java/lang/Readable.java @@ -28,8 +28,8 @@ package java.lang; import java.io.IOException; /** - * A Readable is a source of characters. Characters from - * a Readable are made available to callers of the read + * A {@code Readable} is a source of characters. Characters from + * a {@code Readable} are made available to callers of the read * method via a {@link java.nio.CharBuffer CharBuffer}. * * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/lang/RuntimeException.java b/jdk/src/java.base/share/classes/java/lang/RuntimeException.java index 8ed5c9ba74e..bfa524d4ba7 100644 --- a/jdk/src/java.base/share/classes/java/lang/RuntimeException.java +++ b/jdk/src/java.base/share/classes/java/lang/RuntimeException.java @@ -71,7 +71,7 @@ public class RuntimeException extends Exception { * @param message the detail message (which is saved for later retrieval * by the {@link #getMessage()} method). * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A null value is + * {@link #getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.4 @@ -81,13 +81,13 @@ public class RuntimeException extends Exception { } /** Constructs a new runtime exception with the specified cause and a - * detail message of (cause==null ? null : cause.toString()) + * detail message of {@code (cause==null ? null : cause.toString())} * (which typically contains the class and detail message of - * cause). This constructor is useful for runtime exceptions + * {@code cause}). This constructor is useful for runtime exceptions * that are little more than wrappers for other throwables. * * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A null value is + * {@link #getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.4 diff --git a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java index a9ebed45b72..0df77f5e520 100644 --- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java +++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java @@ -172,9 +172,8 @@ import java.util.StringTokenizer; * * modifyThread * Modification of threads, e.g., via calls to Thread - * interrupt, stop, suspend, - * resume, setDaemon, setPriority, - * setName and setUncaughtExceptionHandler + * {@code interrupt, stop, suspend, resume, setDaemon, setPriority, + * setName} and {@code setUncaughtExceptionHandler} * methods * This allows an attacker to modify the behaviour of * any thread in the system. diff --git a/jdk/src/java.base/share/classes/java/lang/SecurityException.java b/jdk/src/java.base/share/classes/java/lang/SecurityException.java index 061e0c782e8..534c4841469 100644 --- a/jdk/src/java.base/share/classes/java/lang/SecurityException.java +++ b/jdk/src/java.base/share/classes/java/lang/SecurityException.java @@ -36,14 +36,14 @@ public class SecurityException extends RuntimeException { private static final long serialVersionUID = 6878364983674394167L; /** - * Constructs a SecurityException with no detail message. + * Constructs a {@code SecurityException} with no detail message. */ public SecurityException() { super(); } /** - * Constructs a SecurityException with the specified + * Constructs a {@code SecurityException} with the specified * detail message. * * @param s the detail message. @@ -53,13 +53,13 @@ public class SecurityException extends RuntimeException { } /** - * Creates a SecurityException with the specified + * Creates a {@code SecurityException} with the specified * detail message and cause. * * @param message the detail message (which is saved for later retrieval * by the {@link #getMessage()} method). * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A null value is permitted, + * {@link #getCause()} method). (A {@code null} value is permitted, * and indicates that the cause is nonexistent or unknown.) * @since 1.5 */ @@ -68,13 +68,13 @@ public class SecurityException extends RuntimeException { } /** - * Creates a SecurityException with the specified cause - * and a detail message of (cause==null ? null : cause.toString()) + * Creates a {@code SecurityException} with the specified cause + * and a detail message of {@code (cause==null ? null : cause.toString())} * (which typically contains the class and detail message of - * cause). + * {@code cause}). * * @param cause the cause (which is saved for later retrieval by the - * {@link #getCause()} method). (A null value is permitted, + * {@link #getCause()} method). (A {@code null} value is permitted, * and indicates that the cause is nonexistent or unknown.) * @since 1.5 */ diff --git a/jdk/src/java.base/share/classes/java/lang/String.java b/jdk/src/java.base/share/classes/java/lang/String.java index 9e0225f947d..dcee90e0e54 100644 --- a/jdk/src/java.base/share/classes/java/lang/String.java +++ b/jdk/src/java.base/share/classes/java/lang/String.java @@ -87,7 +87,7 @@ import jdk.internal.HotSpotIntrinsicCandidate; * string concatenation and conversion, see Gosling, Joy, and Steele, * The Java Language Specification. * - *

Unless otherwise noted, passing a null argument to a constructor + *

Unless otherwise noted, passing a {@code null} argument to a constructor * or method in this class will cause a {@link NullPointerException} to be * thrown. * @@ -1135,7 +1135,7 @@ public final class String * or both. If they have different characters at one or more index * positions, let k be the smallest such index; then the string * whose character at position k has the smaller value, as - * determined by using the < operator, lexicographically precedes the + * determined by using the {@code <} operator, lexicographically precedes the * other string. In this case, {@code compareTo} returns the * difference of the two character values at position {@code k} in * the two string -- that is, the value: diff --git a/jdk/src/java.base/share/classes/java/lang/System.java b/jdk/src/java.base/share/classes/java/lang/System.java index aef3cf1231f..87b6816940f 100644 --- a/jdk/src/java.base/share/classes/java/lang/System.java +++ b/jdk/src/java.base/share/classes/java/lang/System.java @@ -205,7 +205,7 @@ public final class System { * Returns the unique {@link java.io.Console Console} object associated * with the current Java virtual machine, if any. * - * @return The system console, if any, otherwise null. + * @return The system console, if any, otherwise {@code null}. * * @since 1.6 */ @@ -232,7 +232,7 @@ public final class System { * inheritedChannel}, this method may return other kinds of * channels in the future. * - * @return The inherited channel, if any, otherwise null. + * @return The inherited channel, if any, otherwise {@code null}. * * @throws IOException * If an I/O error occurs diff --git a/jdk/src/java.base/share/classes/java/lang/Thread.java b/jdk/src/java.base/share/classes/java/lang/Thread.java index 05953b3b520..3fca1bd8091 100644 --- a/jdk/src/java.base/share/classes/java/lang/Thread.java +++ b/jdk/src/java.base/share/classes/java/lang/Thread.java @@ -616,7 +616,7 @@ class Thread implements Runnable { * Similarly, specifying a lower value may allow a greater number of * threads to exist concurrently without throwing an {@link * OutOfMemoryError} (or other internal error). The details of - * the relationship between the value of the stackSize parameter + * the relationship between the value of the {@code stackSize} parameter * and the maximum recursion depth and concurrency level are * platform-dependent. On some platforms, the value of the * {@code stackSize} parameter may have no effect whatsoever. @@ -1476,7 +1476,7 @@ class Thread implements Runnable { } /** - * Returns true if and only if the current thread holds the + * Returns {@code true} if and only if the current thread holds the * monitor lock on the specified object. * *

This method is designed to allow a program to assert that @@ -1486,8 +1486,8 @@ class Thread implements Runnable { *

* * @param obj the object on which to test lock ownership - * @throws NullPointerException if obj is null - * @return true if the current thread holds the monitor lock on + * @throws NullPointerException if obj is {@code null} + * @return {@code true} if the current thread holds the monitor lock on * the specified object. * @since 1.4 */ @@ -1509,8 +1509,8 @@ class Thread implements Runnable { * *

If there is a security manager, and this thread is not * the current thread, then the security manager's - * checkPermission method is called with a - * RuntimePermission("getStackTrace") permission + * {@code checkPermission} method is called with a + * {@code RuntimePermission("getStackTrace")} permission * to see if it's ok to get the stack trace. * *

Some virtual machines may, under some circumstances, omit one @@ -1519,12 +1519,12 @@ class Thread implements Runnable { * this thread is permitted to return a zero-length array from this * method. * - * @return an array of StackTraceElement, + * @return an array of {@code StackTraceElement}, * each represents one stack frame. * * @throws SecurityException * if a security manager exists and its - * checkPermission method doesn't allow + * {@code checkPermission} method doesn't allow * getting the stack trace of thread. * @see SecurityManager#checkPermission * @see RuntimePermission @@ -1562,8 +1562,8 @@ class Thread implements Runnable { /** * Returns a map of stack traces for all live threads. * The map keys are threads and each map value is an array of - * StackTraceElement that represents the stack dump - * of the corresponding Thread. + * {@code StackTraceElement} that represents the stack dump + * of the corresponding {@code Thread}. * The returned stack traces are in the format specified for * the {@link #getStackTrace getStackTrace} method. * @@ -1574,18 +1574,18 @@ class Thread implements Runnable { * no stack trace information about a thread. * *

If there is a security manager, then the security manager's - * checkPermission method is called with a - * RuntimePermission("getStackTrace") permission as well as - * RuntimePermission("modifyThreadGroup") permission + * {@code checkPermission} method is called with a + * {@code RuntimePermission("getStackTrace")} permission as well as + * {@code RuntimePermission("modifyThreadGroup")} permission * to see if it is ok to get the stack trace of all threads. * - * @return a Map from Thread to an array of - * StackTraceElement that represents the stack trace of + * @return a {@code Map} from {@code Thread} to an array of + * {@code StackTraceElement} that represents the stack trace of * the corresponding thread. * * @throws SecurityException * if a security manager exists and its - * checkPermission method doesn't allow + * {@code checkPermission} method doesn't allow * getting the stack trace of thread. * @see #getStackTrace * @see SecurityManager#checkPermission @@ -1693,7 +1693,7 @@ class Thread implements Runnable { /** * Returns the identifier of this Thread. The thread ID is a positive - * long number generated when this thread was created. + * {@code long} number generated when this thread was created. * The thread ID is unique and remains unchanged during its lifetime. * When a thread is terminated, this thread ID may be reused. * @@ -1774,10 +1774,10 @@ class Thread implements Runnable { *

A thread in the waiting state is waiting for another thread to * perform a particular action. * - * For example, a thread that has called Object.wait() + * For example, a thread that has called {@code Object.wait()} * on an object is waiting for another thread to call - * Object.notify() or Object.notifyAll() on - * that object. A thread that has called Thread.join() + * {@code Object.notify()} or {@code Object.notifyAll()} on + * that object. A thread that has called {@code Thread.join()} * is waiting for a specified thread to terminate. */ WAITING, @@ -1819,17 +1819,17 @@ class Thread implements Runnable { // Added in JSR-166 /** - * Interface for handlers invoked when a Thread abruptly + * Interface for handlers invoked when a {@code Thread} abruptly * terminates due to an uncaught exception. *

When a thread is about to terminate due to an uncaught exception * the Java Virtual Machine will query the thread for its - * UncaughtExceptionHandler using + * {@code UncaughtExceptionHandler} using * {@link #getUncaughtExceptionHandler} and will invoke the handler's - * uncaughtException method, passing the thread and the + * {@code uncaughtException} method, passing the thread and the * exception as arguments. - * If a thread has not had its UncaughtExceptionHandler - * explicitly set, then its ThreadGroup object acts as its - * UncaughtExceptionHandler. If the ThreadGroup object + * If a thread has not had its {@code UncaughtExceptionHandler} + * explicitly set, then its {@code ThreadGroup} object acts as its + * {@code UncaughtExceptionHandler}. If the {@code ThreadGroup} object * has no * special requirements for dealing with the exception, it can forward * the invocation to the {@linkplain #getDefaultUncaughtExceptionHandler @@ -1869,8 +1869,8 @@ class Thread implements Runnable { * uncaught exception handler. If the thread does not have an explicit * uncaught exception handler set, and the thread's thread group * (including parent thread groups) does not specialize its - * uncaughtException method, then the default handler's - * uncaughtException method will be invoked. + * {@code uncaughtException} method, then the default handler's + * {@code uncaughtException} method will be invoked. *

By setting the default uncaught exception handler, an application * can change the way in which uncaught exceptions are handled (such as * logging to a specific device, or file) for those threads that would @@ -1878,15 +1878,14 @@ class Thread implements Runnable { * provided. * *

Note that the default uncaught exception handler should not usually - * defer to the thread's ThreadGroup object, as that could cause + * defer to the thread's {@code ThreadGroup} object, as that could cause * infinite recursion. * * @param eh the object to use as the default uncaught exception handler. - * If null then there is no default handler. + * If {@code null} then there is no default handler. * - * @throws SecurityException if a security manager is present and it - * denies {@link RuntimePermission} - * ("setDefaultUncaughtExceptionHandler") + * @throws SecurityException if a security manager is present and it denies + * {@link RuntimePermission}{@code ("setDefaultUncaughtExceptionHandler")} * * @see #setUncaughtExceptionHandler * @see #getUncaughtExceptionHandler @@ -1906,7 +1905,7 @@ class Thread implements Runnable { /** * Returns the default handler invoked when a thread abruptly terminates - * due to an uncaught exception. If the returned value is null, + * due to an uncaught exception. If the returned value is {@code null}, * there is no default. * @since 1.5 * @see #setDefaultUncaughtExceptionHandler @@ -1920,8 +1919,8 @@ class Thread implements Runnable { * Returns the handler invoked when this thread abruptly terminates * due to an uncaught exception. If this thread has not had an * uncaught exception handler explicitly set then this thread's - * ThreadGroup object is returned, unless this thread - * has terminated, in which case null is returned. + * {@code ThreadGroup} object is returned, unless this thread + * has terminated, in which case {@code null} is returned. * @since 1.5 * @return the uncaught exception handler for this thread */ @@ -1935,10 +1934,10 @@ class Thread implements Runnable { * due to an uncaught exception. *

A thread can take full control of how it responds to uncaught * exceptions by having its uncaught exception handler explicitly set. - * If no such handler is set then the thread's ThreadGroup + * If no such handler is set then the thread's {@code ThreadGroup} * object acts as its handler. * @param eh the object to use as this thread's uncaught exception - * handler. If null then this thread has no explicit handler. + * handler. If {@code null} then this thread has no explicit handler. * @throws SecurityException if the current thread is not allowed to * modify this thread. * @see #setDefaultUncaughtExceptionHandler diff --git a/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java b/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java index 57489eb241d..eda2e7d1ab8 100644 --- a/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java +++ b/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java @@ -728,7 +728,7 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler { * @see java.lang.ThreadGroup#checkAccess() * @since 1.0 * @deprecated This method is used solely in conjunction with - * Thread.suspend and ThreadGroup.suspend, + * {@code Thread.suspend} and {@code ThreadGroup.suspend}, * both of which have been deprecated, as they are inherently * deadlock-prone. See {@link Thread#suspend} for details. */ diff --git a/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java b/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java index 65a0207113c..0281612f858 100644 --- a/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java +++ b/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java @@ -29,7 +29,7 @@ package java.lang; * Thrown when an application tries to access a type using a string * representing the type's name, but no definition for the type with * the specified name can be found. This exception differs from - * {@link ClassNotFoundException} in that ClassNotFoundException is a + * {@link ClassNotFoundException} in that {@code ClassNotFoundException} is a * checked exception, whereas this exception is unchecked. * *

Note that this exception may be used when undefined type variables @@ -49,12 +49,12 @@ public class TypeNotPresentException extends RuntimeException { private String typeName; /** - * Constructs a TypeNotPresentException for the named type + * Constructs a {@code TypeNotPresentException} for the named type * with the specified cause. * * @param typeName the fully qualified name of the unavailable type * @param cause the exception that was thrown when the system attempted to - * load the named type, or null if unavailable or inapplicable + * load the named type, or {@code null} if unavailable or inapplicable */ public TypeNotPresentException(String typeName, Throwable cause) { super("Type " + typeName + " not present", cause); diff --git a/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java b/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java index fcb355c0366..2d9c7a00cbf 100644 --- a/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java +++ b/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java @@ -63,7 +63,7 @@ public class UnsupportedOperationException extends RuntimeException { * @param message the detail message (which is saved for later retrieval * by the {@link Throwable#getMessage()} method). * @param cause the cause (which is saved for later retrieval by the - * {@link Throwable#getCause()} method). (A null value + * {@link Throwable#getCause()} method). (A {@code null} value * is permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.5 @@ -74,14 +74,14 @@ public class UnsupportedOperationException extends RuntimeException { /** * Constructs a new exception with the specified cause and a detail - * message of (cause==null ? null : cause.toString()) (which - * typically contains the class and detail message of cause). + * message of {@code (cause==null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). * This constructor is useful for exceptions that are little more than * wrappers for other throwables (for example, {@link * java.security.PrivilegedActionException}). * * @param cause the cause (which is saved for later retrieval by the - * {@link Throwable#getCause()} method). (A null value is + * {@link Throwable#getCause()} method). (A {@code null} value is * permitted, and indicates that the cause is nonexistent or * unknown.) * @since 1.5 diff --git a/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java b/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java index 7de674681b0..efa02469153 100644 --- a/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java +++ b/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java @@ -50,28 +50,28 @@ public interface Annotation { * to the corresponding member of this annotation, as defined below: *

    *
  • Two corresponding primitive typed members whose values are - * x and y are considered equal if x == y, - * unless their type is float or double. + * {@code x} and {@code y} are considered equal if {@code x == y}, + * unless their type is {@code float} or {@code double}. * - *
  • Two corresponding float members whose values - * are x and y are considered equal if - * Float.valueOf(x).equals(Float.valueOf(y)). - * (Unlike the == operator, NaN is considered equal - * to itself, and 0.0f unequal to -0.0f.) + *
  • Two corresponding {@code float} members whose values + * are {@code x} and {@code y} are considered equal if + * {@code Float.valueOf(x).equals(Float.valueOf(y))}. + * (Unlike the {@code ==} operator, NaN is considered equal + * to itself, and {@code 0.0f} unequal to {@code -0.0f}.) * - *
  • Two corresponding double members whose values - * are x and y are considered equal if - * Double.valueOf(x).equals(Double.valueOf(y)). - * (Unlike the == operator, NaN is considered equal - * to itself, and 0.0 unequal to -0.0.) + *
  • Two corresponding {@code double} members whose values + * are {@code x} and {@code y} are considered equal if + * {@code Double.valueOf(x).equals(Double.valueOf(y))}. + * (Unlike the {@code ==} operator, NaN is considered equal + * to itself, and {@code 0.0} unequal to {@code -0.0}.) * - *
  • Two corresponding String, Class, enum, or - * annotation typed members whose values are x and y - * are considered equal if x.equals(y). (Note that this + *
  • Two corresponding {@code String}, {@code Class}, enum, or + * annotation typed members whose values are {@code x} and {@code y} + * are considered equal if {@code x.equals(y)}. (Note that this * definition is recursive for annotation typed members.) * - *
  • Two corresponding array typed members x and y - * are considered equal if Arrays.equals(x, y), for the + *
  • Two corresponding array typed members {@code x} and {@code y} + * are considered equal if {@code Arrays.equals(x, y)}, for the * appropriate overloading of {@link java.util.Arrays#equals}. *
* @@ -93,16 +93,16 @@ public interface Annotation { * *

The hash code of a member-value depends on its type: *

    - *
  • The hash code of a primitive value v is equal to - * WrapperType.valueOf(v).hashCode(), where - * WrapperType is the wrapper type corresponding - * to the primitive type of v ({@link Byte}, + *
  • The hash code of a primitive value {@code v} is equal to + * WrapperType.valueOf(v).hashCode(), where + * {@code WrapperType} is the wrapper type corresponding + * to the primitive type of {@code v} ({@link Byte}, * {@link Character}, {@link Double}, {@link Float}, {@link Integer}, * {@link Long}, {@link Short}, or {@link Boolean}). * *
  • The hash code of a string, enum, class, or annotation member-value - I v is computed as by calling - * v.hashCode(). (In the case of annotation + I {@code v} is computed as by calling + * v.hashCode(). (In the case of annotation * member values, this is a recursive definition.) * *
  • The hash code of an array member-value is computed by calling diff --git a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java index f02104f4641..c296ceda8a8 100644 --- a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java +++ b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationFormatError.java @@ -40,7 +40,7 @@ public class AnnotationFormatError extends Error { private static final long serialVersionUID = -4256701562333669892L; /** - * Constructs a new AnnotationFormatError with the specified + * Constructs a new {@code AnnotationFormatError} with the specified * detail message. * * @param message the detail message. @@ -50,13 +50,13 @@ public class AnnotationFormatError extends Error { } /** - * Constructs a new AnnotationFormatError with the specified + * Constructs a new {@code AnnotationFormatError} with the specified * detail message and cause. Note that the detail message associated - * with cause is not automatically incorporated in + * with {@code cause} is not automatically incorporated in * this error's detail message. * * @param message the detail message - * @param cause the cause (A null value is permitted, and + * @param cause the cause (A {@code null} value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public AnnotationFormatError(String message, Throwable cause) { @@ -65,12 +65,12 @@ public class AnnotationFormatError extends Error { /** - * Constructs a new AnnotationFormatError with the specified + * Constructs a new {@code AnnotationFormatError} with the specified * cause and a detail message of - * (cause == null ? null : cause.toString()) (which - * typically contains the class and detail message of cause). + * {@code (cause == null ? null : cause.toString())} (which + * typically contains the class and detail message of {@code cause}). * - * @param cause the cause (A null value is permitted, and + * @param cause the cause (A {@code null} value is permitted, and * indicates that the cause is nonexistent or unknown.) */ public AnnotationFormatError(Throwable cause) { diff --git a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java index 88e27125c34..5af586c4d52 100644 --- a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java +++ b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java @@ -42,7 +42,7 @@ public class AnnotationTypeMismatchException extends RuntimeException { private static final long serialVersionUID = 8125925355765570191L; /** - * The Method object for the annotation element. + * The {@code Method} object for the annotation element. */ private final Method element; @@ -57,7 +57,7 @@ public class AnnotationTypeMismatchException extends RuntimeException { * Constructs an AnnotationTypeMismatchException for the specified * annotation type element and found data type. * - * @param element the Method object for the annotation element + * @param element the {@code Method} object for the annotation element * @param foundType the (erroneous) type of data found in the annotation. * This string may, but is not required to, contain the value * as well. The exact format of the string is unspecified. @@ -70,9 +70,9 @@ public class AnnotationTypeMismatchException extends RuntimeException { } /** - * Returns the Method object for the incorrectly typed element. + * Returns the {@code Method} object for the incorrectly typed element. * - * @return the Method object for the incorrectly typed element + * @return the {@code Method} object for the incorrectly typed element */ public Method element() { return this.element; diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java index 2d1df3a5353..b43b0c35703 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java @@ -746,7 +746,7 @@ class MethodType implements java.io.Serializable { /** * Compares the specified object with this type for equality. - * That is, it returns true if and only if the specified object + * That is, it returns {@code true} if and only if the specified object * is also a method type with exactly the same parameters and return type. * @param x object to compare * @see Object#equals(Object) diff --git a/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java b/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java index 1c1364aff02..88fe8fe9fa1 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java @@ -38,8 +38,8 @@ package java.lang.ref; * time or at some later time it will enqueue the reference. * *

    In order to ensure that a reclaimable object remains so, the referent of - * a phantom reference may not be retrieved: The get method of a - * phantom reference always returns null. + * a phantom reference may not be retrieved: The {@code get} method of a + * phantom reference always returns {@code null}. * *

    Unlike soft and weak references, phantom references are not * automatically cleared by the garbage collector as they are enqueued. An @@ -55,9 +55,9 @@ public class PhantomReference extends Reference { /** * Returns this reference object's referent. Because the referent of a * phantom reference is always inaccessible, this method always returns - * null. + * {@code null}. * - * @return null + * @return {@code null} */ public T get() { return null; @@ -67,14 +67,14 @@ public class PhantomReference extends Reference { * Creates a new phantom reference that refers to the given object and * is registered with the given queue. * - *

    It is possible to create a phantom reference with a null - * queue, but such a reference is completely useless: Its get + *

    It is possible to create a phantom reference with a {@code null} + * queue, but such a reference is completely useless: Its {@code get} * method will always return null and, since it does not have a queue, it * will never be enqueued. * * @param referent the object the new phantom reference will refer to * @param q the queue with which the reference is to be registered, - * or null if registration is not required + * or {@code null} if registration is not required */ public PhantomReference(T referent, ReferenceQueue q) { super(referent, q); diff --git a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java index 534d21c7b2b..2466956db29 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java @@ -96,10 +96,10 @@ public class ReferenceQueue { /** * Polls this queue to see if a reference object is available. If one is * available without further delay then it is removed from the queue and - * returned. Otherwise this method immediately returns null. + * returned. Otherwise this method immediately returns {@code null}. * * @return A reference object, if one was immediately available, - * otherwise null + * otherwise {@code null} */ public Reference poll() { if (head == null) @@ -116,12 +116,12 @@ public class ReferenceQueue { *

    This method does not offer real-time guarantees: It schedules the * timeout as if by invoking the {@link Object#wait(long)} method. * - * @param timeout If positive, block for up to timeout + * @param timeout If positive, block for up to {@code timeout} * milliseconds while waiting for a reference to be * added to this queue. If zero, block indefinitely. * * @return A reference object, if one was available within the specified - * timeout period, otherwise null + * timeout period, otherwise {@code null} * * @throws IllegalArgumentException * If the value of the timeout argument is negative diff --git a/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java b/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java index 6f8229eb0da..5da95e789e8 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java @@ -42,7 +42,7 @@ package java.lang.ref; * *

    All soft references to softly-reachable objects are guaranteed to have * been cleared before the virtual machine throws an - * OutOfMemoryError. Otherwise no constraints are placed upon the + * {@code OutOfMemoryError}. Otherwise no constraints are placed upon the * time at which a soft reference will be cleared or the order in which a set * of such references to different objects will be cleared. Virtual machine * implementations are, however, encouraged to bias against clearing @@ -92,7 +92,7 @@ public class SoftReference extends Reference { * * @param referent object the new soft reference will refer to * @param q the queue with which the reference is to be registered, - * or null if registration is not required + * or {@code null} if registration is not required * */ public SoftReference(T referent, ReferenceQueue q) { @@ -103,10 +103,10 @@ public class SoftReference extends Reference { /** * Returns this reference object's referent. If this reference object has * been cleared, either by the program or by the garbage collector, then - * this method returns null. + * this method returns {@code null}. * * @return The object to which this reference refers, or - * null if this reference object has been cleared + * {@code null} if this reference object has been cleared */ public T get() { T o = super.get(); diff --git a/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java b/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java index 025949a3635..fdf2b5c9f02 100644 --- a/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java +++ b/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java @@ -63,7 +63,7 @@ public class WeakReference extends Reference { * * @param referent object the new weak reference will refer to * @param q the queue with which the reference is to be registered, - * or null if registration is not required + * or {@code null} if registration is not required */ public WeakReference(T referent, ReferenceQueue q) { super(referent, q); diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java index 97e66362904..25f6a3b6151 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java @@ -286,9 +286,9 @@ public final class Constructor extends Executable { * followed by the fully-qualified name of the declaring class, * followed by a parenthesized, comma-separated list of the * constructor's formal parameter types. For example: - *

    +     * 
    {@code
          *    public java.util.Hashtable(int,float)
    -     * 
    + * }
    * *

    The only possible modifiers for constructors are the access * modifiers {@code public}, {@code protected} or @@ -322,8 +322,8 @@ public final class Constructor extends Executable { * * If this constructor was declared to take a variable number of * arguments, instead of denoting the last parameter as - * "Type[]", it is denoted as - * "Type...". + * "Type[]", it is denoted as + * "Type...". * * A space is used to separate access modifiers from one another * and from the type parameters or return type. If there are no diff --git a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java index ce710c0ef5b..f137d8b1b39 100644 --- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java @@ -387,8 +387,8 @@ public final class Method extends Executable { * * If this method was declared to take a variable number of * arguments, instead of denoting the last parameter as - * "Type[]", it is denoted as - * "Type...". + * "Type[]", it is denoted as + * "Type...". * * A space is used to separate access modifiers from one another * and from the type parameters or return type. If there are no diff --git a/jdk/src/java.base/share/classes/java/math/BigDecimal.java b/jdk/src/java.base/share/classes/java/math/BigDecimal.java index 44d7a9f65f6..bb04b589dcb 100644 --- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java +++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java @@ -40,7 +40,7 @@ import java.util.Arrays; * decimal point. If negative, the unscaled value of the number is * multiplied by ten to the power of the negation of the scale. The * value of the number represented by the {@code BigDecimal} is - * therefore (unscaledValue × 10-scale). + * therefore (unscaledValue × 10-scale). * *

    The {@code BigDecimal} class provides operations for * arithmetic, scale manipulation, rounding, comparison, hashing, and @@ -709,8 +709,8 @@ public class BigDecimal extends Number implements Comparable { /** * Translates the string representation of a {@code BigDecimal} * into a {@code BigDecimal}. The string representation consists - * of an optional sign, {@code '+'} ( '\u002B') or - * {@code '-'} ('\u002D'), followed by a sequence of + * of an optional sign, {@code '+'} ( '\u002B') or + * {@code '-'} ('\u002D'), followed by a sequence of * zero or more decimal digits ("the integer"), optionally * followed by a fraction, optionally followed by an exponent. * @@ -721,7 +721,7 @@ public class BigDecimal extends Number implements Comparable { * significand. * *

    The exponent consists of the character {@code 'e'} - * ('\u0065') or {@code 'E'} ('\u0045') + * ('\u0065') or {@code 'E'} ('\u0045') * followed by one or more decimal digits. The value of the * exponent must lie between -{@link Integer#MAX_VALUE} ({@link * Integer#MIN_VALUE}+1) and {@link Integer#MAX_VALUE}, inclusive. @@ -834,7 +834,7 @@ public class BigDecimal extends Number implements Comparable { * is the exact decimal representation of the {@code double}'s * binary floating-point value. The scale of the returned * {@code BigDecimal} is the smallest value such that - * (10scale × val) is an integer. + * (10scale × val) is an integer. *

    * Notes: *

      @@ -857,7 +857,7 @@ public class BigDecimal extends Number implements Comparable { * creates a {@code BigDecimal} which is exactly equal to * 0.1, as one would expect. Therefore, it is generally * recommended that the {@linkplain #BigDecimal(String) - * String constructor} be used in preference to this one. + * String constructor} be used in preference to this one. * *
    1. * When a {@code double} must be used as a source for a @@ -881,7 +881,7 @@ public class BigDecimal extends Number implements Comparable { * Translates a {@code double} into a {@code BigDecimal}, with * rounding according to the context settings. The scale of the * {@code BigDecimal} is the smallest value such that - * (10scale × val) is an integer. + * (10scale × val) is an integer. * *

      The results of this constructor can be somewhat unpredictable * and its use is generally not recommended; see the notes under @@ -1010,7 +1010,7 @@ public class BigDecimal extends Number implements Comparable { * Translates a {@code BigInteger} unscaled value and an * {@code int} scale into a {@code BigDecimal}. The value of * the {@code BigDecimal} is - * (unscaledVal × 10-scale). + * (unscaledVal × 10-scale). * * @param unscaledVal unscaled value of the {@code BigDecimal}. * @param scale scale of the {@code BigDecimal}. @@ -1026,8 +1026,8 @@ public class BigDecimal extends Number implements Comparable { * Translates a {@code BigInteger} unscaled value and an * {@code int} scale into a {@code BigDecimal}, with rounding * according to the context settings. The value of the - * {@code BigDecimal} is (unscaledVal × - * 10-scale), rounded according to the + * {@code BigDecimal} is (unscaledVal × + * 10-scale), rounded according to the * {@code precision} and rounding mode settings. * * @param unscaledVal unscaled value of the {@code BigDecimal}. @@ -1196,7 +1196,7 @@ public class BigDecimal extends Number implements Comparable { * @param unscaledVal unscaled value of the {@code BigDecimal}. * @param scale scale of the {@code BigDecimal}. * @return a {@code BigDecimal} whose value is - * (unscaledVal × 10-scale). + * (unscaledVal × 10-scale). */ public static BigDecimal valueOf(long unscaledVal, int scale) { if (scale == 0) @@ -1476,8 +1476,8 @@ public class BigDecimal extends Number implements Comparable { } /** - * Returns a {@code BigDecimal} whose value is (this × - * multiplicand), and whose scale is {@code (this.scale() + + * Returns a {@code BigDecimal} whose value is (this × + * multiplicand), and whose scale is {@code (this.scale() + * multiplicand.scale())}. * * @param multiplicand value to be multiplied by this {@code BigDecimal}. @@ -1501,8 +1501,8 @@ public class BigDecimal extends Number implements Comparable { } /** - * Returns a {@code BigDecimal} whose value is (this × - * multiplicand), with rounding according to the context settings. + * Returns a {@code BigDecimal} whose value is (this × + * multiplicand), with rounding according to the context settings. * * @param multiplicand value to be multiplied by this {@code BigDecimal}. * @param mc the context to use. @@ -1995,7 +1995,7 @@ public class BigDecimal extends Number implements Comparable { /** * Returns a {@code BigDecimal} whose value is - * (thisn), The power is computed exactly, to + * (thisn), The power is computed exactly, to * unlimited precision. * *

      The parameter {@code n} must be in the range 0 through @@ -2006,7 +2006,7 @@ public class BigDecimal extends Number implements Comparable { * range of this method. * * @param n power to raise this {@code BigDecimal} to. - * @return thisn + * @return thisn * @throws ArithmeticException if {@code n} is out of range. * @since 1.5 */ @@ -2022,7 +2022,7 @@ public class BigDecimal extends Number implements Comparable { /** * Returns a {@code BigDecimal} whose value is - * (thisn). The current implementation uses + * (thisn). The current implementation uses * the core algorithm defined in ANSI standard X3.274-1996 with * rounding according to the context settings. In general, the * returned numerical value is within two ulps of the exact @@ -2063,7 +2063,7 @@ public class BigDecimal extends Number implements Comparable { * * @param n power to raise this {@code BigDecimal} to. * @param mc the context to use. - * @return thisn using the ANSI standard X3.274-1996 + * @return thisn using the ANSI standard X3.274-1996 * algorithm * @throws ArithmeticException if the result is inexact but the * rounding mode is {@code UNNECESSARY}, or {@code n} is out @@ -2251,8 +2251,8 @@ public class BigDecimal extends Number implements Comparable { /** * Returns a {@code BigInteger} whose value is the unscaled - * value of this {@code BigDecimal}. (Computes (this * - * 10this.scale()).) + * value of this {@code BigDecimal}. (Computes (this * + * 10this.scale()).) * * @return the unscaled value of this {@code BigDecimal}. * @since 1.2 @@ -2371,7 +2371,7 @@ public class BigDecimal extends Number implements Comparable { *

      Note that since BigDecimal objects are immutable, calls of * this method do not result in the original object being * modified, contrary to the usual convention of having methods - * named setX mutate field {@code X}. + * named setX mutate field {@code X}. * Instead, {@code setScale} returns an object with the proper * scale; the returned object may or may not be newly allocated. * @@ -2404,7 +2404,7 @@ public class BigDecimal extends Number implements Comparable { *

      Note that since BigDecimal objects are immutable, calls of * this method do not result in the original object being * modified, contrary to the usual convention of having methods - * named setX mutate field {@code X}. + * named setX mutate field {@code X}. * Instead, {@code setScale} returns an object with the proper * scale; the returned object may or may not be newly allocated. * @@ -2498,7 +2498,7 @@ public class BigDecimal extends Number implements Comparable { *

      Note that since {@code BigDecimal} objects are immutable, * calls of this method do not result in the original * object being modified, contrary to the usual convention of - * having methods named setX mutate field + * having methods named setX mutate field * {@code X}. Instead, {@code setScale} returns an * object with the proper scale; the returned object may or may * not be newly allocated. @@ -2525,8 +2525,8 @@ public class BigDecimal extends Number implements Comparable { * {@code n} is non-negative, the call merely adds {@code n} to * the scale. If {@code n} is negative, the call is equivalent * to {@code movePointRight(-n)}. The {@code BigDecimal} - * returned by this call has value (this × - * 10-n) and scale {@code max(this.scale()+n, + * returned by this call has value (this × + * 10-n) and scale {@code max(this.scale()+n, * 0)}. * * @param n number of places to move the decimal point to the left. @@ -2547,8 +2547,8 @@ public class BigDecimal extends Number implements Comparable { * If {@code n} is non-negative, the call merely subtracts * {@code n} from the scale. If {@code n} is negative, the call * is equivalent to {@code movePointLeft(-n)}. The - * {@code BigDecimal} returned by this call has value (this - * × 10n) and scale {@code max(this.scale()-n, + * {@code BigDecimal} returned by this call has value (this + * × 10n) and scale {@code max(this.scale()-n, * 0)}. * * @param n number of places to move the decimal point to the right. @@ -2825,12 +2825,12 @@ public class BigDecimal extends Number implements Comparable { * adjusted exponent converted to a character form. The latter is * in base ten, using the characters {@code '0'} through * {@code '9'} with no leading zeros, and is always prefixed by a - * sign character {@code '-'} ('\u002D') if the + * sign character {@code '-'} ('\u002D') if the * adjusted exponent is negative, {@code '+'} - * ('\u002B') otherwise). + * ('\u002B') otherwise). * *

      Finally, the entire string is prefixed by a minus sign - * character {@code '-'} ('\u002D') if the unscaled + * character {@code '-'} ('\u002D') if the unscaled * value is less than zero. No sign character is prefixed if the * unscaled value is zero or positive. * @@ -2930,7 +2930,7 @@ public class BigDecimal extends Number implements Comparable { * in the result. * * The entire string is prefixed by a minus sign character '-' - * ('\u002D') if the unscaled value is less than + * ('\u002D') if the unscaled value is less than * zero. No sign character is prefixed if the unscaled value is * zero or positive. * diff --git a/jdk/src/java.base/share/classes/java/math/BigInteger.java b/jdk/src/java.base/share/classes/java/math/BigInteger.java index 201fce2575b..7232724d84c 100644 --- a/jdk/src/java.base/share/classes/java/math/BigInteger.java +++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java @@ -2289,11 +2289,11 @@ public class BigInteger extends Number implements Comparable { } /** - * Returns a BigInteger whose value is (thisexponent). + * Returns a BigInteger whose value is (thisexponent). * Note that {@code exponent} is an integer rather than a BigInteger. * * @param exponent exponent to which this BigInteger is to be raised. - * @return thisexponent + * @return thisexponent * @throws ArithmeticException {@code exponent} is negative. (This would * cause the operation to yield a non-integer value.) */ @@ -2552,12 +2552,12 @@ public class BigInteger extends Number implements Comparable { /** * Returns a BigInteger whose value is - * (thisexponent mod m). (Unlike {@code pow}, this + * (thisexponent mod m). (Unlike {@code pow}, this * method permits negative exponents.) * * @param exponent the exponent. * @param m the modulus. - * @return thisexponent mod m + * @return thisexponent mod m * @throws ArithmeticException {@code m} ≤ 0 or the exponent is * negative and this BigInteger is not relatively * prime to {@code m}. @@ -3152,7 +3152,7 @@ public class BigInteger extends Number implements Comparable { * Returns a BigInteger whose value is {@code (this << n)}. * The shift distance, {@code n}, may be negative, in which case * this method performs a right shift. - * (Computes floor(this * 2n).) + * (Computes floor(this * 2n).) * * @param n shift distance, in bits. * @return {@code this << n} @@ -3175,7 +3175,7 @@ public class BigInteger extends Number implements Comparable { /** * Returns a magnitude array whose value is {@code (mag << n)}. * The shift distance, {@code n}, is considered unnsigned. - * (Computes this * 2n.) + * (Computes this * 2n.) * * @param mag magnitude, the most-significant int ({@code mag[0]}) must be non-zero. * @param n unsigned shift distance, in bits. @@ -3212,7 +3212,7 @@ public class BigInteger extends Number implements Comparable { * Returns a BigInteger whose value is {@code (this >> n)}. Sign * extension is performed. The shift distance, {@code n}, may be * negative, in which case this method performs a left shift. - * (Computes floor(this / 2n).) + * (Computes floor(this / 2n).) * * @param n shift distance, in bits. * @return {@code this >> n} @@ -3235,7 +3235,7 @@ public class BigInteger extends Number implements Comparable { /** * Returns a BigInteger whose value is {@code (this >> n)}. The shift * distance, {@code n}, is considered unsigned. - * (Computes floor(this * 2-n).) + * (Computes floor(this * 2-n).) * * @param n unsigned shift distance, in bits. * @return {@code this >> n} diff --git a/jdk/src/java.base/share/classes/java/math/MathContext.java b/jdk/src/java.base/share/classes/java/math/MathContext.java index f9947d36ca2..e0b2dcaa4f5 100644 --- a/jdk/src/java.base/share/classes/java/math/MathContext.java +++ b/jdk/src/java.base/share/classes/java/math/MathContext.java @@ -268,7 +268,7 @@ public final class MathContext implements Serializable { * Returns the string representation of this {@code MathContext}. * The {@code String} returned represents the settings of the * {@code MathContext} object as two space-delimited words - * (separated by a single space character, '\u0020', + * (separated by a single space character, '\u0020', * and with no leading or trailing white space), as follows: *

        *
      1. diff --git a/jdk/src/java.base/share/classes/java/math/MutableBigInteger.java b/jdk/src/java.base/share/classes/java/math/MutableBigInteger.java index 73a244fd5b4..46e79a1da60 100644 --- a/jdk/src/java.base/share/classes/java/math/MutableBigInteger.java +++ b/jdk/src/java.base/share/classes/java/math/MutableBigInteger.java @@ -254,7 +254,7 @@ class MutableBigInteger { /** * Compare the magnitude of two MutableBigIntegers. Returns -1, 0 or 1 * as this MutableBigInteger is numerically less than, equal to, or - * greater than b. + * greater than {@code b}. */ final int compare(MutableBigInteger b) { int blen = b.intLen;