# HG changeset patch
# User jboes
# Date 1569314623 -3600
# Node ID 48e480e56aadc368af91393aad5d89a1a91e529c
# Parent a7f16447085eb1234f10c0ca6b3644e344713b3e
8231186: Replace html tag foo
with javadoc tag {@code foo} in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: bchristi, lancea
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/BufferedInputStream.java
--- a/src/java.base/share/classes/java/io/BufferedInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/BufferedInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -29,20 +29,20 @@
import jdk.internal.util.ArraysSupport;
/**
- * A BufferedInputStream
adds
+ * A {@code BufferedInputStream} adds
* functionality to another input stream-namely,
* the ability to buffer the input and to
- * support the mark
and reset
- * methods. When the BufferedInputStream
+ * support the {@code mark} and {@code reset}
+ * methods. When the {@code BufferedInputStream}
* is created, an internal buffer array is
* created. As bytes from the stream are read
* or skipped, the internal buffer is refilled
* as necessary from the contained input stream,
- * many bytes at a time. The mark
+ * many bytes at a time. The {@code mark}
* operation remembers a point in the input
- * stream and the reset
operation
+ * stream and the {@code reset} operation
* causes all the bytes read since the most
- * recent mark
operation to be
+ * recent {@code mark} operation to be
* reread before new bytes are taken from
* the contained input stream.
*
@@ -81,23 +81,23 @@
* The index one greater than the index of the last valid byte in
* the buffer.
* This value is always
- * in the range 0
through buf.length
;
- * elements buf[0]
through buf[count-1]
- *
contain buffered input data obtained
+ * in the range {@code 0} through {@code buf.length};
+ * elements {@code buf[0]} through {@code buf[count-1]}
+ * contain buffered input data obtained
* from the underlying input stream.
*/
protected int count;
/**
* The current position in the buffer. This is the index of the next
- * character to be read from the buf
array.
+ * character to be read from the {@code buf} array.
*
- * This value is always in the range 0
- * through count
. If it is less
- * than count
, then buf[pos]
+ * This value is always in the range {@code 0}
+ * through {@code count}. If it is less
+ * than {@code count}, then {@code buf[pos]}
* is the next byte to be supplied as input;
- * if it is equal to count
, then
- * the next read
or skip
+ * if it is equal to {@code count}, then
+ * the next {@code read} or {@code skip}
* operation will require more bytes to be
* read from the contained input stream.
*
@@ -106,28 +106,28 @@
protected int pos;
/**
- * The value of the pos
field at the time the last
- * mark
method was called.
+ * The value of the {@code pos} field at the time the last
+ * {@code mark} method was called.
*
* This value is always
- * in the range -1
through pos
.
+ * in the range {@code -1} through {@code pos}.
* If there is no marked position in the input
- * stream, this field is -1
. If
+ * stream, this field is {@code -1}. If
* there is a marked position in the input
- * stream, then buf[markpos]
+ * stream, then {@code buf[markpos]}
* is the first byte to be supplied as input
- * after a reset
operation. If
- * markpos
is not -1
,
- * then all bytes from positions buf[markpos]
- * through buf[pos-1]
must remain
+ * after a {@code reset} operation. If
+ * {@code markpos} is not {@code -1},
+ * then all bytes from positions {@code buf[markpos]}
+ * through {@code buf[pos-1]} must remain
* in the buffer array (though they may be
* moved to another place in the buffer array,
* with suitable adjustments to the values
- * of count
, pos
,
- * and markpos
); they may not
+ * of {@code count}, {@code pos},
+ * and {@code markpos}); they may not
* be discarded unless and until the difference
- * between pos
and markpos
- * exceeds marklimit
.
+ * between {@code pos} and {@code markpos}
+ * exceeds {@code marklimit}.
*
* @see java.io.BufferedInputStream#mark(int)
* @see java.io.BufferedInputStream#pos
@@ -136,12 +136,12 @@
/**
* The maximum read ahead allowed after a call to the
- * mark
method before subsequent calls to the
- * reset
method fail.
- * Whenever the difference between pos
- * and markpos
exceeds marklimit
,
+ * {@code mark} method before subsequent calls to the
+ * {@code reset} method fail.
+ * Whenever the difference between {@code pos}
+ * and {@code markpos} exceeds {@code marklimit},
* then the mark may be dropped by setting
- * markpos
to -1
.
+ * {@code markpos} to {@code -1}.
*
* @see java.io.BufferedInputStream#mark(int)
* @see java.io.BufferedInputStream#reset()
@@ -171,10 +171,10 @@
}
/**
- * Creates a BufferedInputStream
+ * Creates a {@code BufferedInputStream}
* and saves its argument, the input stream
- * in
, for later use. An internal
- * buffer array is created and stored in buf
.
+ * {@code in}, for later use. An internal
+ * buffer array is created and stored in {@code buf}.
*
* @param in the underlying input stream.
*/
@@ -183,12 +183,12 @@
}
/**
- * Creates a BufferedInputStream
+ * Creates a {@code BufferedInputStream}
* with the specified buffer size,
* and saves its argument, the input stream
- * in
, for later use. An internal
- * buffer array of length size
- * is created and stored in buf
.
+ * {@code in}, for later use. An internal
+ * buffer array of length {@code size}
+ * is created and stored in {@code buf}.
*
* @param in the underlying input stream.
* @param size the buffer size.
@@ -249,10 +249,10 @@
/**
* See
- * the general contract of the read
- * method of InputStream
.
+ * the general contract of the {@code read}
+ * method of {@code InputStream}.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@@ -300,21 +300,21 @@
* {@link InputStream#read(byte[], int, int) read}
method of
* the {@link InputStream}
class. As an additional
* convenience, it attempts to read as many bytes as possible by repeatedly
- * invoking the read
method of the underlying stream. This
- * iterated read
continues until one of the following
+ * invoking the {@code read} method of the underlying stream. This
+ * iterated {@code read} continues until one of the following
* conditions becomes true:
read
method of the underlying stream returns
- * -1
, indicating end-of-file, or
+ * available
method of the underlying stream
+ * read
on the underlying stream returns
- * -1
to indicate end-of-file then this method returns
- * -1
. Otherwise this method returns the number of bytes
+ * If the first {@code read} on the underlying stream returns
+ * {@code -1} to indicate end-of-file then this method returns
+ * {@code -1}. Otherwise this method returns the number of bytes
* actually read.
*
* Subclasses of this class are encouraged, but not required, to
@@ -323,7 +323,7 @@
* @param b destination buffer.
* @param off offset at which to start storing bytes.
* @param len maximum number of bytes to read.
- * @return the number of bytes read, or -1
if the end of
+ * @return the number of bytes read, or {@code -1} if the end of
* the stream has been reached.
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@@ -355,8 +355,8 @@
}
/**
- * See the general contract of the skip
- * method of InputStream
.
+ * See the general contract of the {@code skip}
+ * method of {@code InputStream}.
*
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@@ -413,8 +413,8 @@
}
/**
- * See the general contract of the mark
- * method of InputStream
.
+ * See the general contract of the {@code mark}
+ * method of {@code InputStream}.
*
* @param readlimit the maximum limit of bytes that can be read before
* the mark position becomes invalid.
@@ -426,14 +426,14 @@
}
/**
- * See the general contract of the reset
- * method of InputStream
.
+ * See the general contract of the {@code reset}
+ * method of {@code InputStream}.
*
- * If markpos
is -1
+ * If {@code markpos} is {@code -1}
* (no mark has been set or the mark has been
- * invalidated), an IOException
- * is thrown. Otherwise, pos
is
- * set equal to markpos
.
+ * invalidated), an {@code IOException}
+ * is thrown. Otherwise, {@code pos} is
+ * set equal to {@code markpos}.
*
* @throws IOException if this stream has not been marked or,
* if the mark has been invalidated, or the stream
@@ -449,13 +449,13 @@
}
/**
- * Tests if this input stream supports the mark
- * and reset
methods. The markSupported
- * method of BufferedInputStream
returns
- * true
.
+ * Tests if this input stream supports the {@code mark}
+ * and {@code reset} methods. The {@code markSupported}
+ * method of {@code BufferedInputStream} returns
+ * {@code true}.
*
- * @return a boolean
indicating if this stream type supports
- * the mark
and reset
methods.
+ * @return a {@code boolean} indicating if this stream type supports
+ * the {@code mark} and {@code reset} methods.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/BufferedOutputStream.java
--- a/src/java.base/share/classes/java/io/BufferedOutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/BufferedOutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -98,15 +98,15 @@
}
/**
- * Writes len
bytes from the specified byte array
- * starting at offset off
to this buffered output stream.
+ * Writes {@code len} bytes from the specified byte array
+ * starting at offset {@code off} to this buffered output stream.
*
*
Ordinarily this method stores bytes from the given array into this
* stream's buffer, flushing the buffer to the underlying output stream as
* needed. If the requested length is at least as large as this stream's
* buffer, however, then this method will flush the buffer and write the
* bytes directly to the underlying output stream. Thus redundant
- * BufferedOutputStream
s will not copy data unnecessarily.
+ * {@code BufferedOutputStream}s will not copy data unnecessarily.
*
* @param b the data.
* @param off the start offset in the data.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/BufferedReader.java
--- a/src/java.base/share/classes/java/io/BufferedReader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/BufferedReader.java Tue Sep 24 09:43:43 2019 +0100
@@ -235,22 +235,22 @@
* {@link Reader#read(char[], int, int) read}
method of the
* {@link Reader}
class. As an additional convenience, it
* attempts to read as many characters as possible by repeatedly invoking
- * the read
method of the underlying stream. This iterated
- * read
continues until one of the following conditions becomes
+ * the {@code read} method of the underlying stream. This iterated
+ * {@code read} continues until one of the following conditions becomes
* true:
read
method of the underlying stream returns
- * -1
, indicating end-of-file, or
+ * ready
method of the underlying stream
- * returns false
, indicating that further input requests
+ * read
on the underlying stream returns
- * -1
to indicate end-of-file then this method returns
- * -1
. Otherwise this method returns the number of characters
+ * If the first {@code read} on the underlying stream returns
+ * {@code -1} to indicate end-of-file then this method returns
+ * {@code -1}. Otherwise this method returns the number of characters
* actually read.
*
* Subclasses of this class are encouraged, but not required, to
@@ -261,7 +261,7 @@
* however, the buffer is empty, the mark is not valid, and the requested
* length is at least as large as the buffer, then this method will read
* characters directly from the underlying stream into the given array.
- * Thus redundant BufferedReader
s will not copy data
+ * Thus redundant {@code BufferedReader}s will not copy data
* unnecessarily.
*
* @param cbuf Destination buffer
@@ -403,7 +403,7 @@
*
* @return The number of characters actually skipped
*
- * @throws IllegalArgumentException If n
is negative.
+ * @throws IllegalArgumentException If {@code n} is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/CharArrayReader.java
--- a/src/java.base/share/classes/java/io/CharArrayReader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/CharArrayReader.java Tue Sep 24 09:43:43 2019 +0100
@@ -148,10 +148,10 @@
/**
* Skips characters. Returns the number of characters that were skipped.
*
- *
The n
parameter may be negative, even though the
- * skip
method of the {@link Reader} superclass throws
- * an exception in this case. If n
is negative, then
- * this method does nothing and returns 0
.
+ *
The {@code n} parameter may be negative, even though the
+ * {@code skip} method of the {@link Reader} superclass throws
+ * an exception in this case. If {@code n} is negative, then
+ * this method does nothing and returns {@code 0}.
*
* @param n The number of characters to skip
* @return The number of characters actually skipped
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/DataInputStream.java
--- a/src/java.base/share/classes/java/io/DataInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/DataInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -60,34 +60,34 @@
/**
* Reads some number of bytes from the contained input stream and
- * stores them into the buffer array b
. The number of
+ * stores them into the buffer array {@code b}. The number of
* bytes actually read is returned as an integer. This method blocks
* until input data is available, end of file is detected, or an
* exception is thrown.
*
- *
If b
is null, a NullPointerException
is
- * thrown. If the length of b
is zero, then no bytes are
- * read and 0
is returned; otherwise, there is an attempt
+ *
If {@code b} is null, a {@code NullPointerException} is
+ * thrown. If the length of {@code b} is zero, then no bytes are
+ * read and {@code 0} is returned; otherwise, there is an attempt
* to read at least one byte. If no byte is available because the
- * stream is at end of file, the value -1
is returned;
- * otherwise, at least one byte is read and stored into b
.
+ * stream is at end of file, the value {@code -1} is returned;
+ * otherwise, at least one byte is read and stored into {@code b}.
*
- *
The first byte read is stored into element b[0]
, the
- * next one into b[1]
, and so on. The number of bytes read
- * is, at most, equal to the length of b
. Let k
+ *
The first byte read is stored into element {@code b[0]}, the
+ * next one into {@code b[1]}, and so on. The number of bytes read
+ * is, at most, equal to the length of {@code b}. Let {@code k}
* be the number of bytes actually read; these bytes will be stored in
- * elements b[0]
through b[k-1]
, leaving
- * elements b[k]
through b[b.length-1]
+ * elements {@code b[0]} through {@code b[k-1]}, leaving
+ * elements {@code b[k]} through {@code b[b.length-1]}
* unaffected.
*
- *
The read(b)
method has the same effect as:
+ *
The {@code read(b)} method has the same effect as: *
* * @param b the buffer into which the data is read. * @return the total number of bytes read into the buffer, or - ** read(b, 0, b.length) *
-1
if there is no more data because the end
+ * {@code -1} if there is no more data because the end
* of the stream has been reached.
* @throws IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
@@ -101,43 +101,43 @@
}
/**
- * Reads up to len
bytes of data from the contained
+ * Reads up to {@code len} bytes of data from the contained
* input stream into an array of bytes. An attempt is made to read
- * as many as len
bytes, but a smaller number may be read,
+ * as many as {@code len} bytes, but a smaller number may be read,
* possibly zero. The number of bytes actually read is returned as an
* integer.
*
* This method blocks until input data is available, end of file is * detected, or an exception is thrown. * - *
If len
is zero, then no bytes are read and
- * 0
is returned; otherwise, there is an attempt to read at
+ *
If {@code len} is zero, then no bytes are read and
+ * {@code 0} is returned; otherwise, there is an attempt to read at
* least one byte. If no byte is available because the stream is at end of
- * file, the value -1
is returned; otherwise, at least one
- * byte is read and stored into b
.
+ * file, the value {@code -1} is returned; otherwise, at least one
+ * byte is read and stored into {@code b}.
*
- *
The first byte read is stored into element b[off]
, the
- * next one into b[off+1]
, and so on. The number of bytes read
- * is, at most, equal to len
. Let k be the number of
+ *
The first byte read is stored into element {@code b[off]}, the
+ * next one into {@code b[off+1]}, and so on. The number of bytes read
+ * is, at most, equal to {@code len}. Let k be the number of
* bytes actually read; these bytes will be stored in elements
- * b[off]
through b[off+
k-1]
,
- * leaving elements b[off+
k]
through
- * b[off+len-1]
unaffected.
+ * {@code b[off]} through {@code b[off+}k{@code -1]},
+ * leaving elements {@code b[off+}k{@code ]} through
+ * {@code b[off+len-1]} unaffected.
*
- *
In every case, elements b[0]
through
- * b[off]
and elements b[off+len]
through
- * b[b.length-1]
are unaffected.
+ *
In every case, elements {@code b[0]} through
+ * {@code b[off]} and elements {@code b[off+len]} through
+ * {@code b[b.length-1]} are unaffected.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in the destination array b
+ * @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end
+ * {@code -1} if there is no more data because the end
* of the stream has been reached.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is greater than
- * b.length - off
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
* @throws IOException if the first byte cannot be read for any reason
* other than end of file, the stream has been closed and the underlying
* input stream does not support reading after close, or another I/O
@@ -205,8 +205,8 @@
}
/**
- * See the general contract of the skipBytes
- * method of DataInput
.
+ * See the general contract of the {@code skipBytes}
+ * method of {@code DataInput}.
*
* Bytes for this operation are read from the contained
* input stream.
@@ -230,13 +230,13 @@
}
/**
- * See the general contract of the readBoolean
- * method of DataInput
.
+ * See the general contract of the {@code readBoolean}
+ * method of {@code DataInput}.
*
* Bytes for this operation are read from the contained
* input stream.
*
- * @return the boolean
value read.
+ * @return the {@code boolean} value read.
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
@@ -251,15 +251,15 @@
}
/**
- * See the general contract of the readByte
- * method of DataInput
.
+ * See the general contract of the {@code readByte}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next byte of this input stream as a signed 8-bit
- * byte
.
+ * {@code byte}.
* @throws EOFException if this input stream has reached the end.
* @throws IOException the stream has been closed and the contained
* input stream does not support reading after close, or
@@ -274,8 +274,8 @@
}
/**
- * See the general contract of the readUnsignedByte
- * method of DataInput
.
+ * See the general contract of the {@code readUnsignedByte}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
@@ -297,8 +297,8 @@
}
/**
- * See the general contract of the readShort
- * method of DataInput
.
+ * See the general contract of the {@code readShort}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
@@ -322,8 +322,8 @@
}
/**
- * See the general contract of the readUnsignedShort
- * method of DataInput
.
+ * See the general contract of the {@code readUnsignedShort}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
@@ -347,15 +347,15 @@
}
/**
- * See the general contract of the readChar
- * method of DataInput
.
+ * See the general contract of the {@code readChar}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next two bytes of this input stream, interpreted as a
- * char
.
+ * {@code char}.
* @throws EOFException if this input stream reaches the end before
* reading two bytes.
* @throws IOException the stream has been closed and the contained
@@ -372,15 +372,15 @@
}
/**
- * See the general contract of the readInt
- * method of DataInput
.
+ * See the general contract of the {@code readInt}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next four bytes of this input stream, interpreted as an
- * int
.
+ * {@code int}.
* @throws EOFException if this input stream reaches the end before
* reading four bytes.
* @throws IOException the stream has been closed and the contained
@@ -401,15 +401,15 @@
private byte readBuffer[] = new byte[8];
/**
- * See the general contract of the readLong
- * method of DataInput
.
+ * See the general contract of the {@code readLong}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next eight bytes of this input stream, interpreted as a
- * long
.
+ * {@code long}.
* @throws EOFException if this input stream reaches the end before
* reading eight bytes.
* @throws IOException the stream has been closed and the contained
@@ -430,15 +430,15 @@
}
/**
- * See the general contract of the readFloat
- * method of DataInput
.
+ * See the general contract of the {@code readFloat}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next four bytes of this input stream, interpreted as a
- * float
.
+ * {@code float}.
* @throws EOFException if this input stream reaches the end before
* reading four bytes.
* @throws IOException the stream has been closed and the contained
@@ -452,15 +452,15 @@
}
/**
- * See the general contract of the readDouble
- * method of DataInput
.
+ * See the general contract of the {@code readDouble}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
* input stream.
*
* @return the next eight bytes of this input stream, interpreted as a
- * double
.
+ * {@code double}.
* @throws EOFException if this input stream reaches the end before
* reading eight bytes.
* @throws IOException the stream has been closed and the contained
@@ -476,8 +476,8 @@
private char lineBuffer[];
/**
- * See the general contract of the readLine
- * method of DataInput
.
+ * See the general contract of the {@code readLine}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
@@ -485,9 +485,9 @@
*
* @deprecated This method does not properly convert bytes to characters.
* As of JDK 1.1, the preferred way to read lines of text is via the
- * BufferedReader.readLine()
method. Programs that use the
- * DataInputStream
class to read lines can be converted to use
- * the BufferedReader
class by replacing code of the form:
+ * {@code BufferedReader.readLine()} method. Programs that use the
+ * {@code DataInputStream} class to read lines can be converted to use
+ * the {@code BufferedReader} class by replacing code of the form:
*
@@ -548,8 +548,8 @@ } /** - * See the general contract of the* DataInputStream d = new DataInputStream(in); *
readUTF
- * method of DataInput
.
+ * See the general contract of the {@code readUTF}
+ * method of {@code DataInput}.
*
* Bytes
* for this operation are read from the contained
@@ -571,13 +571,13 @@
/**
* Reads from the
- * stream in
a representation
+ * stream {@code in} a representation
* of a Unicode character string encoded in
* modified UTF-8 format;
- * this string of characters is then returned as a String
.
+ * this string of characters is then returned as a {@code String}.
* The details of the modified UTF-8 representation
- * are exactly the same as for the readUTF
- * method of DataInput
.
+ * are exactly the same as for the {@code readUTF}
+ * method of {@code DataInput}.
*
* @param in a data input stream.
* @return a Unicode string.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/DataOutput.java
--- a/src/java.base/share/classes/java/io/DataOutput.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/DataOutput.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,12 +26,12 @@
package java.io;
/**
- * The DataOutput
interface provides
+ * The {@code DataOutput} interface provides
* for converting data from any of the Java
* primitive types to a series of bytes and
* writing these bytes to a binary stream.
* There is also a facility for converting
- * a String
into
+ * a {@code String} into
* modified UTF-8
* format and writing the resulting series
* of bytes.
@@ -39,7 +39,7 @@
* For all the methods in this interface that
* write bytes, it is generally true that if
* a byte cannot be written for any reason,
- * an IOException
is thrown.
+ * an {@code IOException} is thrown.
*
* @author Frank Yellin
* @see java.io.DataInput
@@ -50,8 +50,8 @@
interface DataOutput {
/**
* Writes to the output stream the eight
- * low-order bits of the argument b
.
- * The 24 high-order bits of b
+ * low-order bits of the argument {@code b}.
+ * The 24 high-order bits of {@code b}
* are ignored.
*
* @param b the byte to be written.
@@ -60,14 +60,14 @@
void write(int b) throws IOException;
/**
- * Writes to the output stream all the bytes in array b
.
- * If b
is null
,
- * a NullPointerException
is thrown.
- * If b.length
is zero, then
+ * Writes to the output stream all the bytes in array {@code b}.
+ * If {@code b} is {@code null},
+ * a {@code NullPointerException} is thrown.
+ * If {@code b.length} is zero, then
* no bytes are written. Otherwise, the byte
- * b[0]
is written first, then
- * b[1]
, and so on; the last byte
- * written is b[b.length-1]
.
+ * {@code b[0]} is written first, then
+ * {@code b[1]}, and so on; the last byte
+ * written is {@code b[b.length-1]}.
*
* @param b the data.
* @throws IOException if an I/O error occurs.
@@ -75,19 +75,19 @@
void write(byte b[]) throws IOException;
/**
- * Writes len
bytes from array
- * b
, in order, to
- * the output stream. If b
- * is null
, a NullPointerException
- * is thrown. If off
is negative,
- * or len
is negative, or off+len
+ * Writes {@code len} bytes from array
+ * {@code b}, in order, to
+ * the output stream. If {@code b}
+ * is {@code null}, a {@code NullPointerException}
+ * is thrown. If {@code off} is negative,
+ * or {@code len} is negative, or {@code off+len}
* is greater than the length of the array
- * b
, then an IndexOutOfBoundsException
- * is thrown. If len
is zero,
+ * {@code b}, then an {@code IndexOutOfBoundsException}
+ * is thrown. If {@code len} is zero,
* then no bytes are written. Otherwise, the
- * byte b[off]
is written first,
- * then b[off+1]
, and so on; the
- * last byte written is b[off+len-1]
.
+ * byte {@code b[off]} is written first,
+ * then {@code b[off+1]}, and so on; the
+ * last byte written is {@code b[off+len-1]}.
*
* @param b the data.
* @param off the start offset in the data.
@@ -97,16 +97,16 @@
void write(byte b[], int off, int len) throws IOException;
/**
- * Writes a boolean
value to this output stream.
- * If the argument v
- * is true
, the value (byte)1
- * is written; if v
is false
,
- * the value (byte)0
is written.
+ * Writes a {@code boolean} value to this output stream.
+ * If the argument {@code v}
+ * is {@code true}, the value {@code (byte)1}
+ * is written; if {@code v} is {@code false},
+ * the value {@code (byte)0} is written.
* The byte written by this method may
- * be read by the readBoolean
- * method of interface DataInput
,
- * which will then return a boolean
- * equal to v
.
+ * be read by the {@code readBoolean}
+ * method of interface {@code DataInput},
+ * which will then return a {@code boolean}
+ * equal to {@code v}.
*
* @param v the boolean to be written.
* @throws IOException if an I/O error occurs.
@@ -115,15 +115,15 @@
/**
* Writes to the output stream the eight low-
- * order bits of the argument v
.
- * The 24 high-order bits of v
- * are ignored. (This means that writeByte
- * does exactly the same thing as write
+ * order bits of the argument {@code v}.
+ * The 24 high-order bits of {@code v}
+ * are ignored. (This means that {@code writeByte}
+ * does exactly the same thing as {@code write}
* for an integer argument.) The byte written
- * by this method may be read by the readByte
- * method of interface DataInput
,
- * which will then return a byte
- * equal to (byte)v
.
+ * by this method may be read by the {@code readByte}
+ * method of interface {@code DataInput},
+ * which will then return a {@code byte}
+ * equal to {@code (byte)v}.
*
* @param v the byte value to be written.
* @throws IOException if an I/O error occurs.
@@ -140,18 +140,18 @@
* (byte)(0xff & v)
* }
* The bytes written by this method may be
- * read by the readShort
method
- * of interface DataInput
, which
- * will then return a short
equal
- * to (short)v
.
+ * read by the {@code readShort} method
+ * of interface {@code DataInput} , which
+ * will then return a {@code short} equal
+ * to {@code (short)v}.
*
- * @param v the short
value to be written.
+ * @param v the {@code short} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeShort(int v) throws IOException;
/**
- * Writes a char
value, which
+ * Writes a {@code char} value, which
* is comprised of two bytes, to the
* output stream.
* The byte values to be written, in the order
@@ -161,18 +161,18 @@
* (byte)(0xff & v)
* }
* The bytes written by this method may be
- * read by the readChar
method
- * of interface DataInput
, which
- * will then return a char
equal
- * to (char)v
.
+ * read by the {@code readChar} method
+ * of interface {@code DataInput} , which
+ * will then return a {@code char} equal
+ * to {@code (char)v}.
*
- * @param v the char
value to be written.
+ * @param v the {@code char} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeChar(int v) throws IOException;
/**
- * Writes an int
value, which is
+ * Writes an {@code int} value, which is
* comprised of four bytes, to the output stream.
* The byte values to be written, in the order
* shown, are:
@@ -183,17 +183,17 @@
* (byte)(0xff & v)
* }
* The bytes written by this method may be read
- * by the readInt
method of interface
- * DataInput
, which will then
- * return an int
equal to v
.
+ * by the {@code readInt} method of interface
+ * {@code DataInput} , which will then
+ * return an {@code int} equal to {@code v}.
*
- * @param v the int
value to be written.
+ * @param v the {@code int} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeInt(int v) throws IOException;
/**
- * Writes a long
value, which is
+ * Writes a {@code long} value, which is
* comprised of eight bytes, to the output stream.
* The byte values to be written, in the order
* shown, are:
@@ -208,50 +208,50 @@
* (byte)(0xff & v)
* }
* The bytes written by this method may be
- * read by the readLong
method
- * of interface DataInput
, which
- * will then return a long
equal
- * to v
.
+ * read by the {@code readLong} method
+ * of interface {@code DataInput} , which
+ * will then return a {@code long} equal
+ * to {@code v}.
*
- * @param v the long
value to be written.
+ * @param v the {@code long} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeLong(long v) throws IOException;
/**
- * Writes a float
value,
+ * Writes a {@code float} value,
* which is comprised of four bytes, to the output stream.
* It does this as if it first converts this
- * float
value to an int
- * in exactly the manner of the Float.floatToIntBits
- * method and then writes the int
- * value in exactly the manner of the writeInt
+ * {@code float} value to an {@code int}
+ * in exactly the manner of the {@code Float.floatToIntBits}
+ * method and then writes the {@code int}
+ * value in exactly the manner of the {@code writeInt}
* method. The bytes written by this method
- * may be read by the readFloat
- * method of interface DataInput
,
- * which will then return a float
- * equal to v
.
+ * may be read by the {@code readFloat}
+ * method of interface {@code DataInput},
+ * which will then return a {@code float}
+ * equal to {@code v}.
*
- * @param v the float
value to be written.
+ * @param v the {@code float} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeFloat(float v) throws IOException;
/**
- * Writes a double
value,
+ * Writes a {@code double} value,
* which is comprised of eight bytes, to the output stream.
* It does this as if it first converts this
- * double
value to a long
- * in exactly the manner of the Double.doubleToLongBits
- * method and then writes the long
- * value in exactly the manner of the writeLong
+ * {@code double} value to a {@code long}
+ * in exactly the manner of the {@code Double.doubleToLongBits}
+ * method and then writes the {@code long}
+ * value in exactly the manner of the {@code writeLong}
* method. The bytes written by this method
- * may be read by the readDouble
- * method of interface DataInput
,
- * which will then return a double
- * equal to v
.
+ * may be read by the {@code readDouble}
+ * method of interface {@code DataInput},
+ * which will then return a {@code double}
+ * equal to {@code v}.
*
- * @param v the double
value to be written.
+ * @param v the {@code double} value to be written.
* @throws IOException if an I/O error occurs.
*/
void writeDouble(double v) throws IOException;
@@ -259,17 +259,17 @@
/**
* Writes a string to the output stream.
* For every character in the string
- * s
, taken in order, one byte
+ * {@code s}, taken in order, one byte
* is written to the output stream. If
- * s
is null
, a NullPointerException
- * is thrown.
If s.length
+ * {@code s} is {@code null}, a {@code NullPointerException}
+ * is thrown.
If {@code s.length}
* is zero, then no bytes are written. Otherwise,
- * the character s[0]
is written
- * first, then s[1]
, and so on;
- * the last character written is s[s.length-1]
.
+ * the character {@code s[0]} is written
+ * first, then {@code s[1]}, and so on;
+ * the last character written is {@code s[s.length-1]}.
* For each character, one byte is written,
* the low-order byte, in exactly the manner
- * of the writeByte
method . The
+ * of the {@code writeByte} method . The
* high-order eight bits of each character
* in the string are ignored.
*
@@ -279,19 +279,19 @@
void writeBytes(String s) throws IOException;
/**
- * Writes every character in the string s
,
+ * Writes every character in the string {@code s},
* to the output stream, in order,
- * two bytes per character. If s
- * is null
, a NullPointerException
- * is thrown. If s.length
+ * two bytes per character. If {@code s}
+ * is {@code null}, a {@code NullPointerException}
+ * is thrown. If {@code s.length}
* is zero, then no characters are written.
- * Otherwise, the character s[0]
- * is written first, then s[1]
,
+ * Otherwise, the character {@code s[0]}
+ * is written first, then {@code s[1]},
* and so on; the last character written is
- * s[s.length-1]
. For each character,
+ * {@code s[s.length-1]}. For each character,
* two bytes are actually written, high-order
* byte first, in exactly the manner of the
- * writeChar
method.
+ * {@code writeChar} method.
*
* @param s the string value to be written.
* @throws IOException if an I/O error occurs.
@@ -304,19 +304,19 @@
* by the
* modified UTF-8
* representation
- * of every character in the string s
.
- * If s
is null
,
- * a NullPointerException
is thrown.
- * Each character in the string s
+ * of every character in the string {@code s}.
+ * If {@code s} is {@code null},
+ * a {@code NullPointerException} is thrown.
+ * Each character in the string {@code s}
* is converted to a group of one, two, or
* three bytes, depending on the value of the
* character.
- * If a character c
+ * If a character {@code c}
* is in the range \u0001
through
* \u007f
, it is represented
* by one byte:
*
(byte)c
- * If a character c
is \u0000
+ * If a character {@code c} is \u0000
* or is in the range \u0080
* through \u07ff
, then it is
* represented by two bytes, to be written
@@ -324,8 +324,8 @@
* (byte)(0xc0 | (0x1f & (c >> 6)))
* (byte)(0x80 | (0x3f & c))
* }
If a character
- * c
is in the range \u0800
- * through uffff
, then it is
+ * {@code c} is in the range \u0800
+ * through {@code uffff}, then it is
* represented by three bytes, to be written
* in the order shown:
{@code * (byte)(0xe0 | (0x0f & (c >> 12))) @@ -333,19 +333,19 @@ * (byte)(0x80 | (0x3f & c)) * }
First,
* the total number of bytes needed to represent
- * all the characters of s
is
+ * all the characters of {@code s} is
* calculated. If this number is larger than
- * 65535
, then a UTFDataFormatException
+ * {@code 65535}, then a {@code UTFDataFormatException}
* is thrown. Otherwise, this length is written
* to the output stream in exactly the manner
- * of the writeShort
method;
+ * of the {@code writeShort} method;
* after this, the one-, two-, or three-byte
* representation of each character in the
- * string s
is written.
The + * string {@code s} is written.
The
* bytes written by this method may be read
- * by the readUTF
method of interface
- * DataInput
, which will then
- * return a String
equal to s
.
+ * by the {@code readUTF} method of interface
+ * {@code DataInput} , which will then
+ * return a {@code String} equal to {@code s}.
*
* @param s the string value to be written.
* @throws IOException if an I/O error occurs.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/DataOutputStream.java
--- a/src/java.base/share/classes/java/io/DataOutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/DataOutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -49,7 +49,7 @@
/**
* Creates a new data output stream to write data to the specified
- * underlying output stream. The counter written
is
+ * underlying output stream. The counter {@code written} is
* set to zero.
*
* @param out the underlying output stream, to be saved for later
@@ -74,13 +74,13 @@
/**
* Writes the specified byte (the low eight bits of the argument
- * b
) to the underlying output stream. If no exception
- * is thrown, the counter written
is incremented by
- * 1
.
+ * {@code b}) to the underlying output stream. If no exception
+ * is thrown, the counter {@code written} is incremented by
+ * {@code 1}.
*
- * Implements the write
method of OutputStream
.
+ * Implements the {@code write} method of {@code OutputStream}.
*
- * @param b the byte
to be written.
+ * @param b the {@code byte} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -90,10 +90,10 @@
}
/**
- * Writes len
bytes from the specified byte array
- * starting at offset off
to the underlying output stream.
- * If no exception is thrown, the counter written
is
- * incremented by len
.
+ * Writes {@code len} bytes from the specified byte array
+ * starting at offset {@code off} to the underlying output stream.
+ * If no exception is thrown, the counter {@code written} is
+ * incremented by {@code len}.
*
* @param b the data.
* @param off the start offset in the data.
@@ -112,8 +112,8 @@
* Flushes this data output stream. This forces any buffered output
* bytes to be written out to the stream.
*
- * The flush
method of DataOutputStream
- * calls the flush
method of its underlying output stream.
+ * The {@code flush} method of {@code DataOutputStream}
+ * calls the {@code flush} method of its underlying output stream.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
@@ -124,14 +124,14 @@
}
/**
- * Writes a boolean
to the underlying output stream as
- * a 1-byte value. The value true
is written out as the
- * value (byte)1
; the value false
is
- * written out as the value (byte)0
. If no exception is
- * thrown, the counter written
is incremented by
- * 1
.
+ * Writes a {@code boolean} to the underlying output stream as
+ * a 1-byte value. The value {@code true} is written out as the
+ * value {@code (byte)1}; the value {@code false} is
+ * written out as the value {@code (byte)0}. If no exception is
+ * thrown, the counter {@code written} is incremented by
+ * {@code 1}.
*
- * @param v a boolean
value to be written.
+ * @param v a {@code boolean} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -141,11 +141,11 @@
}
/**
- * Writes out a byte
to the underlying output stream as
+ * Writes out a {@code byte} to the underlying output stream as
* a 1-byte value. If no exception is thrown, the counter
- * written
is incremented by 1
.
+ * {@code written} is incremented by {@code 1}.
*
- * @param v a byte
value to be written.
+ * @param v a {@code byte} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -155,11 +155,11 @@
}
/**
- * Writes a short
to the underlying output stream as two
+ * Writes a {@code short} to the underlying output stream as two
* bytes, high byte first. If no exception is thrown, the counter
- * written
is incremented by 2
.
+ * {@code written} is incremented by {@code 2}.
*
- * @param v a short
to be written.
+ * @param v a {@code short} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -170,11 +170,11 @@
}
/**
- * Writes a char
to the underlying output stream as a
+ * Writes a {@code char} to the underlying output stream as a
* 2-byte value, high byte first. If no exception is thrown, the
- * counter written
is incremented by 2
.
+ * counter {@code written} is incremented by {@code 2}.
*
- * @param v a char
value to be written.
+ * @param v a {@code char} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -185,11 +185,11 @@
}
/**
- * Writes an int
to the underlying output stream as four
+ * Writes an {@code int} to the underlying output stream as four
* bytes, high byte first. If no exception is thrown, the counter
- * written
is incremented by 4
.
+ * {@code written} is incremented by {@code 4}.
*
- * @param v an int
to be written.
+ * @param v an {@code int} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -204,11 +204,11 @@
private byte writeBuffer[] = new byte[8];
/**
- * Writes a long
to the underlying output stream as eight
+ * Writes a {@code long} to the underlying output stream as eight
* bytes, high byte first. In no exception is thrown, the counter
- * written
is incremented by 8
.
+ * {@code written} is incremented by {@code 8}.
*
- * @param v a long
to be written.
+ * @param v a {@code long} to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
*/
@@ -226,14 +226,14 @@
}
/**
- * Converts the float argument to an int
using the
- * floatToIntBits
method in class Float
,
- * and then writes that int
value to the underlying
+ * Converts the float argument to an {@code int} using the
+ * {@code floatToIntBits} method in class {@code Float},
+ * and then writes that {@code int} value to the underlying
* output stream as a 4-byte quantity, high byte first. If no
- * exception is thrown, the counter written
is
- * incremented by 4
.
+ * exception is thrown, the counter {@code written} is
+ * incremented by {@code 4}.
*
- * @param v a float
value to be written.
+ * @param v a {@code float} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.lang.Float#floatToIntBits(float)
@@ -243,14 +243,14 @@
}
/**
- * Converts the double argument to a long
using the
- * doubleToLongBits
method in class Double
,
- * and then writes that long
value to the underlying
+ * Converts the double argument to a {@code long} using the
+ * {@code doubleToLongBits} method in class {@code Double},
+ * and then writes that {@code long} value to the underlying
* output stream as an 8-byte quantity, high byte first. If no
- * exception is thrown, the counter written
is
- * incremented by 8
.
+ * exception is thrown, the counter {@code written} is
+ * incremented by {@code 8}.
*
- * @param v a double
value to be written.
+ * @param v a {@code double} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
* @see java.lang.Double#doubleToLongBits(double)
@@ -263,8 +263,8 @@
* Writes out the string to the underlying output stream as a
* sequence of bytes. Each character in the string is written out, in
* sequence, by discarding its high eight bits. If no exception is
- * thrown, the counter written
is incremented by the
- * length of s
.
+ * thrown, the counter {@code written} is incremented by the
+ * length of {@code s}.
*
* @param s a string of bytes to be written.
* @throws IOException if an I/O error occurs.
@@ -281,11 +281,11 @@
/**
* Writes a string to the underlying output stream as a sequence of
* characters. Each character is written to the data output stream as
- * if by the writeChar
method. If no exception is
- * thrown, the counter written
is incremented by twice
- * the length of s
.
+ * if by the {@code writeChar} method. If no exception is
+ * thrown, the counter {@code written} is incremented by twice
+ * the length of {@code s}.
*
- * @param s a String
value to be written.
+ * @param s a {@code String} value to be written.
* @throws IOException if an I/O error occurs.
* @see java.io.DataOutputStream#writeChar(int)
* @see java.io.FilterOutputStream#out
@@ -306,15 +306,15 @@
* encoding in a machine-independent manner.
*
* First, two bytes are written to the output stream as if by the
- * writeShort
method giving the number of bytes to
+ * {@code writeShort} method giving the number of bytes to
* follow. This value is the number of bytes actually written out,
* not the length of the string. Following the length, each character
* of the string is output, in sequence, using the modified UTF-8 encoding
* for the character. If no exception is thrown, the counter
- * written
is incremented by the total number of
+ * {@code written} is incremented by the total number of
* bytes written to the output stream. This will be at least two
- * plus the length of str
, and at most two plus
- * thrice the length of str
.
+ * plus the length of {@code str}, and at most two plus
+ * thrice the length of {@code str}.
*
* @param str a string to be written.
* @throws UTFDataFormatException if the modified UTF-8 encoding of
@@ -331,15 +331,15 @@
* modified UTF-8
* encoding in a machine-independent manner.
*
- * First, two bytes are written to out as if by the writeShort
+ * First, two bytes are written to out as if by the {@code writeShort}
* method giving the number of bytes to follow. This value is the number of
* bytes actually written out, not the length of the string. Following the
* length, each character of the string is output, in sequence, using the
* modified UTF-8 encoding for the character. If no exception is thrown, the
- * counter written
is incremented by the total number of
+ * counter {@code written} is incremented by the total number of
* bytes written to the output stream. This will be at least two
- * plus the length of str
, and at most two plus
- * thrice the length of str
.
+ * plus the length of {@code str}, and at most two plus
+ * thrice the length of {@code str}.
*
* @param str a string to be written.
* @param out destination to write to
@@ -410,11 +410,11 @@
}
/**
- * Returns the current value of the counter written
,
+ * Returns the current value of the counter {@code written},
* the number of bytes written to this data output stream so far.
* If the counter overflows, it will be wrapped to Integer.MAX_VALUE.
*
- * @return the value of the written
field.
+ * @return the value of the {@code written} field.
* @see java.io.DataOutputStream#written
*/
public final int size() {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/EOFException.java
--- a/src/java.base/share/classes/java/io/EOFException.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/EOFException.java Tue Sep 24 09:43:43 2019 +0100
@@ -44,7 +44,7 @@
private static final long serialVersionUID = 6433858223774886977L;
/**
- * Constructs an EOFException
with null
+ * Constructs an {@code EOFException} with {@code null}
* as its error detail message.
*/
public EOFException() {
@@ -52,10 +52,10 @@
}
/**
- * Constructs an EOFException
with the specified detail
- * message. The string s
may later be retrieved by the
+ * Constructs an {@code EOFException} with the specified detail
+ * message. The string {@code s} may later be retrieved by the
* {@link java.lang.Throwable#getMessage}
method of class
- * java.lang.Throwable
.
+ * {@code java.lang.Throwable}.
*
* @param s the detail message.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/File.java
--- a/src/java.base/share/classes/java/io/File.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/File.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,8 +46,8 @@
*
*
"/"
for the UNIX root
- * directory, or "\\\\"
for a Microsoft Windows UNC pathname, and
+ * such as a disk-drive specifier, {@code "/"} for the UNIX root
+ * directory, or {@code "\\\\"} for a Microsoft Windows UNC pathname, and
* file.separator
, and
+ * character is defined by the system property {@code file.separator}, and
* 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
@@ -73,9 +73,9 @@
* that no other information is required in order to locate the file that it
* denotes. A relative pathname, in contrast, must be interpreted in terms of
* information taken from some other pathname. By default the classes in the
- * java.io
package always resolve relative pathnames against the
+ * {@code java.io} package always resolve relative pathnames against the
* current user directory. This directory is named by the system property
- * user.dir
, and is typically the directory in which the Java
+ * {@code user.dir}, and is typically the directory in which the Java
* virtual machine was invoked.
*
* The parent of an abstract pathname may be obtained by invoking @@ -94,14 +94,14 @@ *
"/"
. Relative pathnames have no prefix. The abstract pathname
- * denoting the root directory has the prefix "/"
and an empty
+ * {@code "/"}. Relative pathnames have no prefix. The abstract pathname
+ * denoting the root directory has the prefix {@code "/"} and an empty
* name sequence.
*
* ":"
and
- * possibly followed by "\\"
if the pathname is absolute. The
- * prefix of a UNC pathname is "\\\\"
; the hostname and the share
+ * specifier consists of the drive letter followed by {@code ":"} and
+ * possibly followed by {@code "\\"} if the pathname is absolute. The
+ * prefix of a UNC pathname is {@code "\\\\"}; the hostname and the share
* name are the first two names in the name sequence. A relative pathname that
* does not specify a drive has no prefix.
*
@@ -124,8 +124,8 @@
* may apply to all other users. The access permissions on an object may
* cause some methods in this class to fail.
*
- * Instances of the File
class are immutable; that is, once
- * created, the abstract pathname represented by a File
object
+ *
Instances of the {@code File} class are immutable; that is, once + * created, the abstract pathname represented by a {@code File} object * will never change. * *
file.separator
. On UNIX systems the value of this
- * field is '/'
; on Microsoft Windows systems it is '\\'
.
+ * property {@code file.separator}. On UNIX systems the value of this
+ * field is {@code '/'}; on Microsoft Windows systems it is {@code '\\'}.
*
* @see java.lang.System#getProperty(java.lang.String)
*/
@@ -225,10 +225,10 @@
/**
* The system-dependent path-separator character. This field is
* initialized to contain the first character of the value of the system
- * property path.separator
. This character is used to
+ * property {@code path.separator}. This character is used to
* separate filenames in a sequence of files given as a path list.
- * On UNIX systems, this character is ':'
; on Microsoft Windows systems it
- * is ';'
.
+ * On UNIX systems, this character is {@code ':'}; on Microsoft Windows systems it
+ * is {@code ';'}.
*
* @see java.lang.System#getProperty(java.lang.String)
*/
@@ -265,13 +265,13 @@
}
/**
- * Creates a new File
instance by converting the given
+ * Creates a new {@code File} instance by converting the given
* pathname string into an abstract pathname. If the given string is
* the empty string, then the result is the empty abstract pathname.
*
* @param pathname A pathname string
* @throws NullPointerException
- * If the pathname
argument is null
+ * If the {@code pathname} argument is {@code null}
*/
public File(String pathname) {
if (pathname == null) {
@@ -289,21 +289,21 @@
compatibility with the original behavior of this class. */
/**
- * Creates a new File
instance from a parent pathname string
+ * Creates a new {@code File} instance from a parent pathname string
* and a child pathname string.
*
- * If parent
is null
then the new
- * File
instance is created as if by invoking the
- * single-argument File
constructor on the given
- * child
pathname string.
+ *
If {@code parent} is {@code null} then the new + * {@code File} instance is created as if by invoking the + * single-argument {@code File} constructor on the given + * {@code child} pathname string. * - *
Otherwise the parent
pathname string is taken to denote
- * a directory, and the child
pathname string is taken to
- * denote either a directory or a file. If the child
pathname
+ *
Otherwise the {@code parent} pathname string is taken to denote
+ * a directory, and the {@code child} pathname string is taken to
+ * denote either a directory or a file. If the {@code child} pathname
* string is absolute then it is converted into a relative pathname in a
- * system-dependent way. If parent
is the empty string then
- * the new File
instance is created by converting
- * child
into an abstract pathname and resolving the result
+ * system-dependent way. If {@code parent} is the empty string then
+ * the new {@code File} instance is created by converting
+ * {@code child} into an abstract pathname and resolving the result
* against a system-dependent default directory. Otherwise each pathname
* string is converted into an abstract pathname and the child abstract
* pathname is resolved against the parent.
@@ -311,7 +311,7 @@
* @param parent The parent pathname string
* @param child The child pathname string
* @throws NullPointerException
- * If child
is null
+ * If {@code child} is {@code null}
*/
public File(String parent, String child) {
if (child == null) {
@@ -332,21 +332,21 @@
}
/**
- * Creates a new File
instance from a parent abstract
+ * Creates a new {@code File} instance from a parent abstract
* pathname and a child pathname string.
*
- *
If parent
is null
then the new
- * File
instance is created as if by invoking the
- * single-argument File
constructor on the given
- * child
pathname string.
+ *
If {@code parent} is {@code null} then the new + * {@code File} instance is created as if by invoking the + * single-argument {@code File} constructor on the given + * {@code child} pathname string. * - *
Otherwise the parent
abstract pathname is taken to
- * denote a directory, and the child
pathname string is taken
- * to denote either a directory or a file. If the child
+ *
Otherwise the {@code parent} abstract pathname is taken to
+ * denote a directory, and the {@code child} pathname string is taken
+ * to denote either a directory or a file. If the {@code child}
* pathname string is absolute then it is converted into a relative
- * pathname in a system-dependent way. If parent
is the empty
- * abstract pathname then the new File
instance is created by
- * converting child
into an abstract pathname and resolving
+ * pathname in a system-dependent way. If {@code parent} is the empty
+ * abstract pathname then the new {@code File} instance is created by
+ * converting {@code child} into an abstract pathname and resolving
* the result against a system-dependent default directory. Otherwise each
* pathname string is converted into an abstract pathname and the child
* abstract pathname is resolved against the parent.
@@ -354,7 +354,7 @@
* @param parent The parent abstract pathname
* @param child The child pathname string
* @throws NullPointerException
- * If child
is null
+ * If {@code child} is {@code null}
*/
public File(File parent, String child) {
if (child == null) {
@@ -460,7 +460,7 @@
/**
* Returns the pathname string of this abstract pathname's parent, or
- * null
if this pathname does not name a parent directory.
+ * {@code null} if this pathname does not name a parent directory.
*
*
The parent of an abstract pathname consists of the
* pathname's prefix, if any, and each name in the pathname's name
@@ -468,7 +468,7 @@
* the pathname does not name a parent directory.
*
* @return The pathname string of the parent directory named by this
- * abstract pathname, or null
if this pathname
+ * abstract pathname, or {@code null} if this pathname
* does not name a parent
*/
public String getParent() {
@@ -483,7 +483,7 @@
/**
* Returns the abstract pathname of this abstract pathname's parent,
- * or null
if this pathname does not name a parent
+ * or {@code null} if this pathname does not name a parent
* directory.
*
*
The parent of an abstract pathname consists of the
@@ -492,7 +492,7 @@
* the pathname does not name a parent directory.
*
* @return The abstract pathname of the parent directory named by this
- * abstract pathname, or null
if this pathname
+ * abstract pathname, or {@code null} if this pathname
* does not name a parent
*
* @since 1.2
@@ -520,12 +520,12 @@
/**
* Tests whether this abstract pathname is absolute. The definition of
* absolute pathname is system dependent. On UNIX systems, a pathname is
- * absolute if its prefix is "/"
. On Microsoft Windows systems, a
+ * absolute if its prefix is {@code "/"}. On Microsoft Windows systems, a
* pathname is absolute if its prefix is a drive specifier followed by
- * "\\"
, or if its prefix is "\\\\"
.
+ * {@code "\\"}, or if its prefix is {@code "\\\\"}.
*
- * @return true
if this abstract pathname is absolute,
- * false
otherwise
+ * @return {@code true} if this abstract pathname is absolute,
+ * {@code false} otherwise
*/
public boolean isAbsolute() {
return fs.isAbsolute(this);
@@ -538,7 +538,7 @@
* 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
+ * system property {@code user.dir}, is returned. Otherwise this
* pathname is resolved in a system-dependent way. On UNIX systems, a
* relative pathname is made absolute by resolving it against the current
* user directory. On Microsoft Windows systems, a relative pathname is made absolute
@@ -658,7 +658,7 @@
}
/**
- * Converts this abstract pathname into a file:
URL. The
+ * Converts this abstract pathname into a {@code file:} URL. The
* exact form of the URL is system-dependent. If it can be determined that
* the file denoted by this abstract pathname is a directory, then the
* resulting URL will end with a slash.
@@ -751,9 +751,9 @@
* files that are marked as unreadable. Consequently this method may return
* {@code true} even though the file does not have read permissions.
*
- * @return true
if and only if the file specified by this
+ * @return {@code true} if and only if the file specified by this
* abstract pathname exists and can be read by the
- * application; false
otherwise
+ * application; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -778,10 +778,10 @@
* files that are marked read-only. Consequently this method may return
* {@code true} even though the file is marked read-only.
*
- * @return true
if and only if the file system actually
+ * @return {@code true} if and only if the file system actually
* contains a file denoted by this abstract pathname and
* the application is allowed to write to the file;
- * false
otherwise.
+ * {@code false} otherwise.
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -803,8 +803,8 @@
* Tests whether the file or directory denoted by this abstract pathname
* exists.
*
- * @return true
if and only if the file or directory denoted
- * by this abstract pathname exists; false
otherwise
+ * @return {@code true} if and only if the file or directory denoted
+ * by this abstract pathname exists; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -832,9 +832,9 @@
* java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
* Files.readAttributes} method may be used.
*
- * @return true
if and only if the file denoted by this
+ * @return {@code true} if and only if the file denoted by this
* abstract pathname exists and is a directory;
- * false
otherwise
+ * {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -865,9 +865,9 @@
* java.nio.file.Files#readAttributes(Path,Class,LinkOption[])
* Files.readAttributes} method may be used.
*
- * @return true
if and only if the file denoted by this
+ * @return {@code true} if and only if the file denoted by this
* abstract pathname exists and is a normal file;
- * false
otherwise
+ * {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -889,10 +889,10 @@
* Tests whether the file named by this abstract pathname is a hidden
* file. The exact definition of hidden is system-dependent. On
* UNIX systems, a file is considered to be hidden if its name begins with
- * a period character ('.'
). On Microsoft Windows systems, a file is
+ * a period character ({@code '.'}). On Microsoft Windows systems, a file is
* considered to be hidden if it has been marked as such in the filesystem.
*
- * @return true
if and only if the file denoted by this
+ * @return {@code true} if and only if the file denoted by this
* abstract pathname is hidden according to the conventions of the
* underlying platform
*
@@ -934,9 +934,9 @@
* {@link java.nio.file.Files#getLastModifiedTime(Path,LinkOption[])
* Files.getLastModifiedTime} method may be used instead.
*
- * @return A long
value representing the time the file was
+ * @return A {@code long} value representing the time the file was
* last modified, measured in milliseconds since the epoch
- * (00:00:00 GMT, January 1, 1970), or 0L
if the
+ * (00:00:00 GMT, January 1, 1970), or {@code 0L} if the
* file does not exist or if an I/O error occurs. The value may
* be negative indicating the number of milliseconds before the
* epoch
@@ -968,8 +968,8 @@
* Files.readAttributes} method may be used.
*
* @return The length, in bytes, of the file denoted by this abstract
- * pathname, or 0L
if the file does not exist. Some
- * operating systems may return 0L
for pathnames
+ * pathname, or {@code 0L} if the file does not exist. Some
+ * operating systems may return {@code 0L} for pathnames
* denoting system-dependent entities such as devices or pipes.
*
* @throws SecurityException
@@ -1003,8 +1003,8 @@
* {@link java.nio.channels.FileLock FileLock}
* facility should be used instead.
*
- * @return true
if the named file does not exist and was
- * successfully created; false
if the named file
+ * @return {@code true} if the named file does not exist and was
+ * successfully created; {@code false} if the named file
* already exists
*
* @throws IOException
@@ -1036,8 +1036,8 @@
* when a file cannot be deleted. This is useful for error reporting and to
* diagnose why a file cannot be deleted.
*
- * @return true
if and only if the file or directory is
- * successfully deleted; false
otherwise
+ * @return {@code true} if and only if the file or directory is
+ * successfully deleted; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -1311,8 +1311,8 @@
/**
* Creates the directory named by this abstract pathname.
*
- * @return true
if and only if the directory was
- * created; false
otherwise
+ * @return {@code true} if and only if the directory was
+ * created; {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -1336,8 +1336,8 @@
* operation fails it may have succeeded in creating some of the necessary
* parent directories.
*
- * @return true
if and only if the directory was created,
- * along with all necessary parent directories; false
+ * @return {@code true} if and only if the directory was created,
+ * along with all necessary parent directories; {@code false}
* otherwise
*
* @throws SecurityException
@@ -1385,8 +1385,8 @@
*
* @param dest The new abstract pathname for the named file
*
- * @return true
if and only if the renaming succeeded;
- * false
otherwise
+ * @return {@code true} if and only if the renaming succeeded;
+ * {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -1394,7 +1394,7 @@
* method denies write access to either the old or new pathnames
*
* @throws NullPointerException
- * If parameter dest
is null
+ * If parameter {@code dest} is {@code null}
*/
public boolean renameTo(File dest) {
if (dest == null) {
@@ -1420,13 +1420,13 @@
* 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
- * truncated) time
argument that was passed to this method.
+ * truncated) {@code time} argument that was passed to this method.
*
* @param time The new last-modified time, measured in milliseconds since
* the epoch (00:00:00 GMT, January 1, 1970)
*
- * @return true
if and only if the operation succeeded;
- * false
otherwise
+ * @return {@code true} if and only if the operation succeeded;
+ * {@code false} otherwise
*
* @throws IllegalArgumentException If the argument is negative
*
@@ -1458,8 +1458,8 @@
* files that are marked read-only. Whether or not a read-only file or
* directory may be deleted depends upon the underlying system.
*
- * @return true
if and only if the operation succeeded;
- * false
otherwise
+ * @return {@code true} if and only if the operation succeeded;
+ * {@code false} otherwise
*
* @throws SecurityException
* If a security manager exists and its {@link
@@ -1490,17 +1490,17 @@
* manipulation of file permissions is required.
*
* @param writable
- * If true
, sets the access permission to allow write
- * operations; if false
to disallow write operations
+ * If {@code true}, sets the access permission to allow write
+ * operations; if {@code false} to disallow write operations
*
* @param ownerOnly
- * If true
, the write permission applies only to the
+ * If {@code true}, the write permission applies only to the
* owner's write permission; otherwise, it applies to everybody. If
* the underlying file system can not distinguish the owner's write
* permission from that of others, then the permission will apply to
* everybody, regardless of this value.
*
- * @return true
if and only if the operation succeeded. The
+ * @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to change
* the access permissions of this abstract pathname.
*
@@ -1536,10 +1536,10 @@
* }
*
* @param writable
- * If true
, sets the access permission to allow write
- * operations; if false
to disallow write operations
+ * If {@code true}, sets the access permission to allow write
+ * operations; if {@code false} to disallow write operations
*
- * @return true
if and only if the operation succeeded. The
+ * @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname.
*
@@ -1565,20 +1565,20 @@
* manipulation of file permissions is required.
*
* @param readable
- * If true
, sets the access permission to allow read
- * operations; if false
to disallow read operations
+ * If {@code true}, sets the access permission to allow read
+ * operations; if {@code false} to disallow read operations
*
* @param ownerOnly
- * If true
, the read permission applies only to the
+ * If {@code true}, the read permission applies only to the
* owner's read permission; otherwise, it applies to everybody. If
* the underlying file system can not distinguish the owner's read
* permission from that of others, then the permission will apply to
* everybody, regardless of this value.
*
- * @return true
if and only if the operation succeeded. The
+ * @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
- * readable
is false
and the underlying
+ * {@code readable} is {@code false} and the underlying
* file system does not implement a read permission, then the
* operation will fail.
*
@@ -1614,13 +1614,13 @@
* }
*
* @param readable
- * If true
, sets the access permission to allow read
- * operations; if false
to disallow read operations
+ * If {@code true}, sets the access permission to allow read
+ * operations; if {@code false} to disallow read operations
*
- * @return true
if and only if the operation succeeded. The
+ * @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
- * readable
is false
and the underlying
+ * {@code readable} is {@code false} and the underlying
* file system does not implement a read permission, then the
* operation will fail.
*
@@ -1646,20 +1646,20 @@
* manipulation of file permissions is required.
*
* @param executable
- * If true
, sets the access permission to allow execute
- * operations; if false
to disallow execute operations
+ * If {@code true}, sets the access permission to allow execute
+ * operations; if {@code false} to disallow execute operations
*
* @param ownerOnly
- * If true
, the execute permission applies only to the
+ * If {@code true}, the execute permission applies only to the
* owner's execute permission; otherwise, it applies to everybody.
* If the underlying file system can not distinguish the owner's
* execute permission from that of others, then the permission will
* apply to everybody, regardless of this value.
*
- * @return true
if and only if the operation succeeded. The
+ * @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
- * executable
is false
and the underlying
+ * {@code executable} is {@code false} and the underlying
* file system does not implement an execute permission, then the
* operation will fail.
*
@@ -1695,13 +1695,13 @@
* }
*
* @param executable
- * If true
, sets the access permission to allow execute
- * operations; if false
to disallow execute operations
+ * If {@code true}, sets the access permission to allow execute
+ * operations; if {@code false} to disallow execute operations
*
- * @return true
if and only if the operation succeeded. The
+ * @return {@code true} if and only if the operation succeeded. The
* operation will fail if the user does not have permission to
* change the access permissions of this abstract pathname. If
- * executable
is false
and the underlying
+ * {@code executable} is {@code false} and the underlying
* file system does not implement an execute permission, then the
* operation will fail.
*
@@ -1723,7 +1723,7 @@
* files that are not marked executable. Consequently this method may return
* {@code true} even though the file does not have execute permissions.
*
- * @return true
if and only if the abstract pathname exists
+ * @return {@code true} if and only if the abstract pathname exists
* and the application is allowed to execute the file
*
* @throws SecurityException
@@ -2007,28 +2007,28 @@
* for a file created by this method to be deleted automatically, use the
* {@link #deleteOnExit} method.
*
- *
The prefix
argument must be at least three characters
+ *
The {@code prefix} argument must be at least three characters
* long. It is recommended that the prefix be a short, meaningful string
- * such as "hjb"
or "mail"
. The
- * suffix
argument may be null
, in which case the
- * suffix ".tmp"
will be used.
+ * such as {@code "hjb"} or {@code "mail"}. The
+ * {@code suffix} argument may be {@code null}, in which case the
+ * suffix {@code ".tmp"} will be used.
*
*
To create the new file, the prefix and the suffix may first be
* adjusted to fit the limitations of the underlying platform. If the
* prefix is too long then it will be truncated, but its first three
* characters will always be preserved. If the suffix is too long then it
* too will be truncated, but if it begins with a period character
- * ('.'
) then the period and the first three characters
+ * ({@code '.'}) then the period and the first three characters
* following it will always be preserved. Once these adjustments have been
* made the name of the new file will be generated by concatenating the
* prefix, five or more internally-generated characters, and the suffix.
*
- *
If the directory
argument is null
then the
+ *
If the {@code directory} argument is {@code null} then the
* system-dependent default temporary-file directory will be used. The
* default temporary-file directory is specified by the system property
- * java.io.tmpdir
. On UNIX systems the default value of this
- * property is typically "/tmp"
or "/var/tmp"
; on
- * Microsoft Windows systems it is typically "C:\\WINNT\\TEMP"
. A different
+ * {@code java.io.tmpdir}. On UNIX systems the default value of this
+ * property is typically {@code "/tmp"} or {@code "/var/tmp"}; on
+ * Microsoft Windows systems it is typically {@code "C:\\WINNT\\TEMP"}. A different
* value may be given to this system property when the Java virtual machine
* is invoked, but programmatic changes to this property are not guaranteed
* to have any effect upon the temporary directory used by this method.
@@ -2037,17 +2037,17 @@
* name; must be at least three characters long
*
* @param suffix The suffix string to be used in generating the file's
- * name; may be null
, in which case the
- * suffix ".tmp"
will be used
+ * name; may be {@code null}, in which case the
+ * suffix {@code ".tmp"} will be used
*
* @param directory The directory in which the file is to be created, or
- * null
if the default temporary-file
+ * {@code null} if the default temporary-file
* directory is to be used
*
* @return An abstract pathname denoting a newly-created empty file
*
* @throws IllegalArgumentException
- * If the prefix
argument contains fewer than three
+ * If the {@code prefix} argument contains fewer than three
* characters
*
* @throws IOException If a file could not be created
@@ -2113,13 +2113,13 @@
* name; must be at least three characters long
*
* @param suffix The suffix string to be used in generating the file's
- * name; may be null
, in which case the
- * suffix ".tmp"
will be used
+ * name; may be {@code null}, in which case the
+ * suffix {@code ".tmp"} will be used
*
* @return An abstract pathname denoting a newly-created empty file
*
* @throws IllegalArgumentException
- * If the prefix
argument contains fewer than three
+ * If the {@code prefix} argument contains fewer than three
* characters
*
* @throws IOException If a file could not be created
@@ -2163,8 +2163,8 @@
/**
* Tests this abstract pathname for equality with the given object.
- * Returns true
if and only if the argument is not
- * null
and is an abstract pathname that denotes the same file
+ * Returns {@code true} if and only if the argument is not
+ * {@code null} and is an abstract pathname that denotes the same file
* or directory as this abstract pathname. Whether or not two abstract
* pathnames are equal depends upon the underlying system. On UNIX
* systems, alphabetic case is significant in comparing pathnames; on Microsoft Windows
@@ -2172,8 +2172,8 @@
*
* @param obj The object to be compared with this abstract pathname
*
- * @return true
if and only if the objects are the same;
- * false
otherwise
+ * @return {@code true} if and only if the objects are the same;
+ * {@code false} otherwise
*/
public boolean equals(Object obj) {
if ((obj != null) && (obj instanceof File)) {
@@ -2188,10 +2188,10 @@
* of their hash codes. On UNIX systems, the hash code of an abstract
* pathname is equal to the exclusive or of the hash code
* of its pathname string and the decimal value
- * 1234321
. On Microsoft Windows systems, the hash
+ * {@code 1234321}. On Microsoft Windows systems, the hash
* code is equal to the exclusive or of the hash code of
* its pathname string converted to lower case and the decimal
- * value 1234321
. Locale is not taken into account on
+ * value {@code 1234321}. Locale is not taken into account on
* lowercasing the pathname string.
*
* @return A hash code for this abstract pathname
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FileFilter.java
--- a/src/java.base/share/classes/java/io/FileFilter.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FileFilter.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
* included in a pathname list.
*
* @param pathname The abstract pathname to be tested
- * @return true
if and only if pathname
+ * @return {@code true} if and only if {@code pathname}
* should be included
*/
boolean accept(File pathname);
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FileInputStream.java
--- a/src/java.base/share/classes/java/io/FileInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FileInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -30,13 +30,13 @@
/**
- * A FileInputStream
obtains input bytes
+ * A {@code FileInputStream} obtains input bytes
* from a file in a file system. What files
* are available depends on the host environment.
*
- *
FileInputStream
is meant for reading streams of raw bytes
+ *
{@code FileInputStream} is meant for reading streams of raw bytes
* such as image data. For reading streams of characters, consider using
- * FileReader
.
+ * {@code FileReader}.
*
* @apiNote
* To release resources used by this stream {@link #close} should be called
@@ -80,21 +80,21 @@
private volatile boolean closed;
/**
- * Creates a FileInputStream
by
+ * Creates a {@code FileInputStream} by
* opening a connection to an actual file,
- * the file named by the path name name
- * in the file system. A new FileDescriptor
+ * the file named by the path name {@code name}
+ * in the file system. A new {@code FileDescriptor}
* object is created to represent this file
* connection.
*
* First, if there is a security
- * manager, its checkRead
method
- * is called with the name
argument
+ * manager, its {@code checkRead} method
+ * is called with the {@code name} argument
* as its argument.
*
* If the named file does not exist, is a directory rather than a regular
* file, or for some other reason cannot be opened for reading then a
- * FileNotFoundException
is thrown.
+ * {@code FileNotFoundException} is thrown.
*
* @param name the system-dependent file name.
* @throws FileNotFoundException if the file does not exist,
@@ -102,7 +102,7 @@
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
- * checkRead
method denies read access
+ * {@code checkRead} method denies read access
* to the file.
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@@ -111,21 +111,21 @@
}
/**
- * Creates a FileInputStream
by
+ * Creates a {@code FileInputStream} by
* opening a connection to an actual file,
- * the file named by the File
- * object file
in the file system.
- * A new FileDescriptor
object
+ * the file named by the {@code File}
+ * object {@code file} in the file system.
+ * A new {@code FileDescriptor} object
* is created to represent this file connection.
*
* First, if there is a security manager,
- * its checkRead
method is called
- * with the path represented by the file
+ * its {@code checkRead} method is called
+ * with the path represented by the {@code file}
* argument as its argument.
*
* If the named file does not exist, is a directory rather than a regular
* file, or for some other reason cannot be opened for reading then a
- * FileNotFoundException
is thrown.
+ * {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for reading.
* @throws FileNotFoundException if the file does not exist,
@@ -133,7 +133,7 @@
* or for some other reason cannot be opened for
* reading.
* @throws SecurityException if a security manager exists and its
- * checkRead
method denies read access to the file.
+ * {@code checkRead} method denies read access to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityManager#checkRead(java.lang.String)
*/
@@ -157,26 +157,26 @@
}
/**
- * Creates a FileInputStream
by using the file descriptor
- * fdObj
, which represents an existing connection to an
+ * Creates a {@code FileInputStream} by using the file descriptor
+ * {@code fdObj}, which represents an existing connection to an
* actual file in the file system.
*
- * If there is a security manager, its checkRead
method is
- * called with the file descriptor fdObj
as its argument to
+ * If there is a security manager, its {@code checkRead} method is
+ * called with the file descriptor {@code fdObj} as its argument to
* see if it's ok to read the file descriptor. If read access is denied
- * to the file descriptor a SecurityException
is thrown.
+ * to the file descriptor a {@code SecurityException} is thrown.
*
- * If fdObj
is null then a NullPointerException
+ * If {@code fdObj} is null then a {@code NullPointerException}
* is thrown.
*
- * This constructor does not throw an exception if fdObj
+ * This constructor does not throw an exception if {@code fdObj}
* is {@link java.io.FileDescriptor#valid() invalid}.
* However, if the methods are invoked on the resulting stream to attempt
- * I/O on the stream, an IOException
is thrown.
+ * I/O on the stream, an {@code IOException} is thrown.
*
* @param fdObj the file descriptor to be opened for reading.
* @throws SecurityException if a security manager exists and its
- * checkRead
method denies read access to the
+ * {@code checkRead} method denies read access to the
* file descriptor.
* @see SecurityManager#checkRead(java.io.FileDescriptor)
*/
@@ -217,7 +217,7 @@
* Reads a byte of data from this input stream. This method blocks
* if no input is yet available.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* file is reached.
* @throws IOException if an I/O error occurs.
*/
@@ -237,13 +237,13 @@
private native int readBytes(byte b[], int off, int len) throws IOException;
/**
- * Reads up to b.length
bytes of data from this input
+ * Reads up to {@code b.length} bytes of data from this input
* stream into an array of bytes. This method blocks until some input
* is available.
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the file has been reached.
* @throws IOException if an I/O error occurs.
*/
@@ -252,21 +252,21 @@
}
/**
- * Reads up to len
bytes of data from this input stream
- * into an array of bytes. If len
is not zero, the method
+ * Reads up to {@code len} bytes of data from this input stream
+ * into an array of bytes. If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
- * bytes are read and 0
is returned.
+ * bytes are read and {@code 0} is returned.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in the destination array b
+ * @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the file has been reached.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is greater than
- * b.length - off
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
@@ -274,14 +274,14 @@
}
/**
- * Skips over and discards n
bytes of data from the
+ * Skips over and discards {@code n} bytes of data from the
* input stream.
*
- *
The skip
method may, for a variety of
+ *
The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
- * possibly 0
. If n
is negative, the method
+ * possibly {@code 0}. If {@code n} is negative, the method
* will try to skip backwards. In case the backing file does not support
- * backward skip at its current position, an IOException
is
+ * backward skip at its current position, an {@code IOException} is
* thrown. The actual number of bytes skipped is returned. If it skips
* forwards, it returns a positive value. If it skips backwards, it
* returns a negative value.
@@ -372,10 +372,10 @@
}
/**
- * Returns the FileDescriptor
+ * Returns the {@code FileDescriptor}
* object that represents the connection to
* the actual file in the file system being
- * used by this FileInputStream
.
+ * used by this {@code FileInputStream}.
*
* @return the file descriptor object associated with this stream.
* @throws IOException if an I/O error occurs.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FileNotFoundException.java
--- a/src/java.base/share/classes/java/io/FileNotFoundException.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FileNotFoundException.java Tue Sep 24 09:43:43 2019 +0100
@@ -45,19 +45,19 @@
private static final long serialVersionUID = -897856973823710492L;
/**
- * Constructs a FileNotFoundException
with
- * null
as its error detail message.
+ * Constructs a {@code FileNotFoundException} with
+ * {@code null} as its error detail message.
*/
public FileNotFoundException() {
super();
}
/**
- * Constructs a FileNotFoundException
with the
- * specified detail message. The string s
can be
+ * Constructs a {@code FileNotFoundException} with the
+ * specified detail message. The string {@code s} can be
* retrieved later by the
* {@link java.lang.Throwable#getMessage}
- * method of class java.lang.Throwable
.
+ * method of class {@code java.lang.Throwable}.
*
* @param s the detail message.
*/
@@ -66,9 +66,9 @@
}
/**
- * Constructs a FileNotFoundException
with a detail message
+ * Constructs a {@code FileNotFoundException} with a detail message
* consisting of the given pathname string followed by the given reason
- * string. If the reason
argument is null
then
+ * string. If the {@code reason} argument is {@code null} then
* it will be omitted. This private constructor is invoked only by native
* I/O methods.
*
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FileOutputStream.java
--- a/src/java.base/share/classes/java/io/FileOutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FileOutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -33,16 +33,16 @@
/**
* A file output stream is an output stream for writing data to a
- * File
or to a FileDescriptor
. Whether or not
+ * {@code File} or to a {@code 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 {@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.
*
- *
FileOutputStream
is meant for writing streams of raw bytes
+ *
{@code FileOutputStream} is meant for writing streams of raw bytes
* such as image data. For writing streams of characters, consider using
- * FileWriter
.
+ * {@code FileWriter}.
*
* @apiNote
* To release resources used by this stream {@link #close} should be called
@@ -97,15 +97,15 @@
/**
* Creates a file output stream to write to the file with the
- * specified name. A new FileDescriptor
object is
+ * specified name. A new {@code FileDescriptor} object is
* created to represent this file connection.
*
- * First, if there is a security manager, its checkWrite
- * method is called with name
as its argument.
+ * First, if there is a security manager, its {@code checkWrite}
+ * method is called with {@code name} as its argument.
*
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
- * reason then a FileNotFoundException
is thrown.
+ * reason then a {@code FileNotFoundException} is thrown.
*
* @implSpec Invoking this constructor with the parameter {@code name} is
* equivalent to invoking {@link #FileOutputStream(String,boolean)
@@ -116,7 +116,7 @@
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @throws SecurityException if a security manager exists and its
- * checkWrite
method denies write access
+ * {@code checkWrite} method denies write access
* to the file.
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
*/
@@ -126,26 +126,26 @@
/**
* Creates a file output stream to write to the file with the specified
- * name. If the second argument is true
, then
+ * name. If the second argument is {@code true}, then
* bytes will be written to the end of the file rather than the beginning.
- * A new FileDescriptor
object is created to represent this
+ * A new {@code FileDescriptor} object is created to represent this
* file connection.
*
- * First, if there is a security manager, its checkWrite
- * method is called with name
as its argument.
+ * First, if there is a security manager, its {@code checkWrite}
+ * method is called with {@code name} as its argument.
*
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
- * reason then a FileNotFoundException
is thrown.
+ * reason then a {@code FileNotFoundException} is thrown.
*
* @param name the system-dependent file name
- * @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 FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason.
* @throws SecurityException if a security manager exists and its
- * checkWrite
method denies write access
+ * {@code checkWrite} method denies write access
* to the file.
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
* @since 1.1
@@ -158,24 +158,24 @@
/**
* Creates a file output stream to write to the file represented by
- * the specified File
object. A new
- * FileDescriptor
object is created to represent this
+ * the specified {@code File} object. A new
+ * {@code FileDescriptor} object is created to represent this
* file connection.
*
- * First, if there is a security manager, its checkWrite
- * method is called with the path represented by the file
+ * First, if there is a security manager, its {@code checkWrite}
+ * method is called with the path represented by the {@code file}
* argument as its argument.
*
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
- * reason then a FileNotFoundException
is thrown.
+ * reason then a {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for writing.
* @throws FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @throws SecurityException if a security manager exists and its
- * checkWrite
method denies write access
+ * {@code checkWrite} method denies write access
* to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityException
@@ -187,27 +187,27 @@
/**
* Creates a file output stream to write to the file represented by
- * the specified File
object. If the second argument is
- * true
, then bytes will be written to the end of the file
- * rather than the beginning. A new FileDescriptor
object is
+ * the specified {@code File} object. If the second argument is
+ * {@code true}, then bytes will be written to the end of the file
+ * rather than the beginning. A new {@code FileDescriptor} object is
* created to represent this file connection.
*
- * First, if there is a security manager, its checkWrite
- * method is called with the path represented by the file
+ * First, if there is a security manager, its {@code checkWrite}
+ * method is called with the path represented by the {@code file}
* argument as its argument.
*
* If the file exists but is a directory rather than a regular file, does
* not exist but cannot be created, or cannot be opened for any other
- * reason then a FileNotFoundException
is thrown.
+ * reason then a {@code FileNotFoundException} is thrown.
*
* @param file the file to be opened for writing.
- * @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 FileNotFoundException if the file exists but is a directory
* rather than a regular file, does not exist but cannot
* be created, or cannot be opened for any other reason
* @throws SecurityException if a security manager exists and its
- * checkWrite
method denies write access
+ * {@code checkWrite} method denies write access
* to the file.
* @see java.io.File#getPath()
* @see java.lang.SecurityException
@@ -241,21 +241,21 @@
* descriptor, which represents an existing connection to an actual
* file in the file system.
*
- * First, if there is a security manager, its checkWrite
- * method is called with the file descriptor fdObj
+ * First, if there is a security manager, its {@code checkWrite}
+ * method is called with the file descriptor {@code fdObj}
* argument as its argument.
*
- * If fdObj
is null then a NullPointerException
+ * If {@code fdObj} is null then a {@code NullPointerException}
* is thrown.
*
- * This constructor does not throw an exception if fdObj
+ * This constructor does not throw an exception if {@code fdObj}
* is {@link java.io.FileDescriptor#valid() invalid}.
* However, if the methods are invoked on the resulting stream to attempt
- * I/O on the stream, an IOException
is thrown.
+ * I/O on the stream, an {@code IOException} is thrown.
*
* @param fdObj the file descriptor to be opened for writing
* @throws SecurityException if a security manager exists and its
- * checkWrite
method denies
+ * {@code checkWrite} method denies
* write access to the file descriptor
* @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
*/
@@ -303,7 +303,7 @@
/**
* Writes the specified byte to this file output stream. Implements
- * the write
method of OutputStream
.
+ * the {@code write} method of {@code OutputStream}.
*
* @param b the byte to be written.
* @throws IOException if an I/O error occurs.
@@ -325,7 +325,7 @@
throws IOException;
/**
- * Writes b.length
bytes from the specified byte array
+ * Writes {@code b.length} bytes from the specified byte array
* to this file output stream.
*
* @param b the data.
@@ -336,8 +336,8 @@
}
/**
- * Writes len
bytes from the specified byte array
- * starting at offset off
to this file output stream.
+ * Writes {@code len} bytes from the specified byte array
+ * starting at offset {@code off} to this file output stream.
*
* @param b the data.
* @param off the start offset in the data.
@@ -397,9 +397,9 @@
/**
* Returns the file descriptor associated with this stream.
*
- * @return the FileDescriptor
object that represents
+ * @return the {@code FileDescriptor} object that represents
* the connection to the file in the file system being used
- * by this FileOutputStream
object.
+ * by this {@code FileOutputStream} object.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FileDescriptor
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FilePermission.java
--- a/src/java.base/share/classes/java/io/FilePermission.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FilePermission.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,7 +46,7 @@
*
* Pathname is the pathname of the file or directory granted the specified
* actions. A pathname that ends in "/*" (where "/" is
- * the file separator character, File.separatorChar
) indicates
+ * the file separator character, {@code File.separatorChar}) indicates
* all the files and directories contained in that directory. A pathname
* that ends with "/-" indicates (recursively) all files
* and subdirectories contained in that directory. Such a pathname is called
@@ -70,11 +70,11 @@
*
Runtime.exec
to
- * be called. Corresponds to SecurityManager.checkExec
.
+ * File.delete
to
- * be called. Corresponds to SecurityManager.checkDelete
.
+ * A pathname that ends in "/*" (where "/" is
- * the file separator character, File.separatorChar
)
+ * the file separator character, {@code File.separatorChar})
* indicates all the files and directories contained in that directory.
* A pathname that ends with "/-" indicates (recursively) all files and
* subdirectories contained in that directory. The special pathname
@@ -468,7 +468,7 @@
* @param actions the action string.
*
* @throws IllegalArgumentException
- * If actions is null
, empty or contains an action
+ * If actions is {@code null}, empty or contains an action
* other than the specified possible actions.
*/
public FilePermission(String path, String actions) {
@@ -481,7 +481,7 @@
* More efficient than the FilePermission(String, String) constructor.
* Can be used from within
* code that needs to create a FilePermission object to pass into the
- * implies
method.
+ * {@code implies} method.
*
* @param path the pathname of the file/directory.
* @param mask the action mask to use.
@@ -547,9 +547,9 @@
*
* @param p the permission to check against.
*
- * @return true
if the specified permission is not
- * null
and is implied by this object,
- * false
otherwise.
+ * @return {@code true} if the specified permission is not
+ * {@code null} and is implied by this object,
+ * {@code false} otherwise.
*/
@Override
public boolean implies(Permission p) {
@@ -769,9 +769,9 @@
* for itself, even if they are created using the same invalid path.
*
* @param obj the object we are testing for equality with this object.
- * @return true
if obj is a FilePermission, and has the same
+ * @return {@code true} if obj is a FilePermission, and has the same
* pathname and actions as this FilePermission object,
- * false
otherwise.
+ * {@code false} otherwise.
*/
@Override
public boolean equals(Object obj) {
@@ -987,7 +987,7 @@
* Returns the "canonical string representation" of the actions.
* That is, this method always returns present actions in the following order:
* read, write, execute, delete, readlink. For example, if this FilePermission
- * object allows both write and read actions, a call to getActions
+ * object allows both write and read actions, a call to {@code getActions}
* will return the string "read,write".
*
* @return the canonical string representation of the actions.
@@ -1006,27 +1006,27 @@
*
* FilePermission objects must be stored in a manner that allows them
* to be inserted into the collection in any order, but that also enables the
- * PermissionCollection implies
+ * PermissionCollection {@code implies}
* method to be implemented in an efficient (and consistent) manner.
*
*
For example, if you have two FilePermissions: *
"/tmp/-", "read"
- * "/tmp/scratch/foo", "write"
+ * and you are calling the implies
method with the FilePermission:
+ *
and you are calling the {@code implies} method with the FilePermission: * *
* "/tmp/scratch/foo", "read,write", ** - * then the
implies
function must
+ * then the {@code implies} function must
* take into account both the "/tmp/-" and "/tmp/scratch/foo"
* permissions, so the effective permission is "read,write",
- * and implies
returns true. The "implies" semantics for
+ * and {@code implies} returns true. The "implies" semantics for
* FilePermissions are handled properly by the PermissionCollection object
- * returned by this newPermissionCollection
method.
+ * returned by this {@code newPermissionCollection} method.
*
* @return a new PermissionCollection object suitable for storing
* FilePermissions.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FileSystem.java
--- a/src/java.base/share/classes/java/io/FileSystem.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FileSystem.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -148,7 +148,7 @@
/**
* Create a new empty file with the given pathname. Return
- * true
if the file was created and false
if a
+ * {@code true} if the file was created and {@code false} if a
* file or directory with the given pathname already exists. Throw an
* IOException if an I/O error occurs.
*/
@@ -157,40 +157,40 @@
/**
* Delete the file or directory denoted by the given abstract pathname,
- * returning true
if and only if the operation succeeds.
+ * returning {@code true} if and only if the operation succeeds.
*/
public abstract boolean delete(File f);
/**
* List the elements of the directory denoted by the given abstract
* pathname. Return an array of strings naming the elements of the
- * directory if successful; otherwise, return null
.
+ * directory if successful; otherwise, return {@code null}.
*/
public abstract String[] list(File f);
/**
* Create a new directory denoted by the given abstract pathname,
- * returning true
if and only if the operation succeeds.
+ * returning {@code true} if and only if the operation succeeds.
*/
public abstract boolean createDirectory(File f);
/**
* Rename the file or directory denoted by the first abstract pathname to
- * the second abstract pathname, returning true
if and only if
+ * the second abstract pathname, returning {@code true} if and only if
* the operation succeeds.
*/
public abstract boolean rename(File f1, File f2);
/**
* Set the last-modified time of the file or directory denoted by the
- * given abstract pathname, returning true
if and only if the
+ * given abstract pathname, returning {@code true} if and only if the
* operation succeeds.
*/
public abstract boolean setLastModifiedTime(File f, long time);
/**
* Mark the file or directory denoted by the given abstract pathname as
- * read-only, returning true
if and only if the operation
+ * read-only, returning {@code true} if and only if the operation
* succeeds.
*/
public abstract boolean setReadOnly(File f);
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FilenameFilter.java
--- a/src/java.base/share/classes/java/io/FilenameFilter.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FilenameFilter.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,8 @@
/**
* Instances of classes that implement this interface are used to
* filter filenames. These instances are used to filter directory
- * listings in the list
method of class
- * File
, and by the Abstract Window Toolkit's file
+ * listings in the {@code list} method of class
+ * {@code File}, and by the Abstract Window Toolkit's file
* dialog component.
*
* @author Arthur van Hoff
@@ -46,8 +46,8 @@
*
* @param dir the directory in which the file was found.
* @param name the name of the file.
- * @return true
if and only if the name should be
- * included in the file list; false
otherwise.
+ * @return {@code true} if and only if the name should be
+ * included in the file list; {@code false} otherwise.
*/
boolean accept(File dir, String name);
}
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FilterInputStream.java
--- a/src/java.base/share/classes/java/io/FilterInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FilterInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -26,15 +26,15 @@
package java.io;
/**
- * A FilterInputStream
contains
+ * A {@code FilterInputStream} contains
* some other input stream, which it uses as
* its basic source of data, possibly transforming
* the data along the way or providing additional
- * functionality. The class FilterInputStream
+ * functionality. The class {@code FilterInputStream}
* itself simply overrides all methods of
- * InputStream
with versions that
+ * {@code InputStream} with versions that
* pass all requests to the contained input
- * stream. Subclasses of FilterInputStream
+ * stream. Subclasses of {@code FilterInputStream}
* may further override some of these methods
* and may also provide additional methods
* and fields.
@@ -50,12 +50,12 @@
protected volatile InputStream in;
/**
- * Creates a FilterInputStream
- * by assigning the argument in
- * to the field this.in
so as
+ * Creates a {@code FilterInputStream}
+ * by assigning the argument {@code in}
+ * to the field {@code this.in} so as
* to remember it for later use.
*
- * @param in the underlying input stream, or null
if
+ * @param in the underlying input stream, or {@code null} if
* this instance is to be created without an underlying stream.
*/
protected FilterInputStream(InputStream in) {
@@ -64,17 +64,17 @@
/**
* Reads the next byte of data from this input stream. The value
- * byte is returned as an int
in the range
- * 0
to 255
. If no byte is available
+ * byte is returned as an {@code int} in the range
+ * {@code 0} to {@code 255}. If no byte is available
* because the end of the stream has been reached, the value
- * -1
is returned. This method blocks until input data
+ * {@code -1} is returned. This method blocks until input data
* is available, the end of the stream is detected, or an exception
* is thrown.
*
* This method
- * simply performs in.read()
and returns the result.
+ * simply performs {@code in.read()} and returns the result.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
@@ -84,21 +84,21 @@
}
/**
- * Reads up to b.length
bytes of data from this
+ * Reads up to {@code b.length} bytes of data from this
* input stream into an array of bytes. This method blocks until some
* input is available.
*
* This method simply performs the call
- * read(b, 0, b.length)
and returns
+ * {@code read(b, 0, b.length)} and returns
* the result. It is important that it does
- * not do in.read(b)
instead;
- * certain subclasses of FilterInputStream
+ * not do {@code in.read(b)} instead;
+ * certain subclasses of {@code FilterInputStream}
* depend on the implementation strategy actually
* used.
*
* @param b the buffer into which the data is read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#read(byte[], int, int)
@@ -108,24 +108,24 @@
}
/**
- * Reads up to len
bytes of data from this input stream
- * into an array of bytes. If len
is not zero, the method
+ * Reads up to {@code len} bytes of data from this input stream
+ * into an array of bytes. If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
- * bytes are read and 0
is returned.
+ * bytes are read and {@code 0} is returned.
*
- * This method simply performs in.read(b, off, len)
+ * This method simply performs {@code in.read(b, off, len)}
* and returns the result.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in the destination array b
+ * @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is greater than
- * b.length - off
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/
@@ -134,13 +134,13 @@
}
/**
- * Skips over and discards n
bytes of data from the
- * input stream. The skip
method may, for a variety of
+ * Skips over and discards {@code n} bytes of data from the
+ * input stream. The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
- * possibly 0
. The actual number of bytes skipped is
+ * possibly {@code 0}. The actual number of bytes skipped is
* returned.
*
- * This method simply performs in.skip(n)
.
+ * This method simply performs {@code in.skip(n)}.
*
* @param n the number of bytes to be skipped.
* @return the actual number of bytes skipped.
@@ -171,7 +171,7 @@
* Closes this input stream and releases any system resources
* associated with the stream.
* This
- * method simply performs in.close()
.
+ * method simply performs {@code in.close()}.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
@@ -182,14 +182,14 @@
/**
* Marks the current position in this input stream. A subsequent
- * call to the reset
method repositions this stream at
+ * call to the {@code reset} method repositions this stream at
* the last marked position so that subsequent reads re-read the same bytes.
*
- * The readlimit
argument tells this input stream to
+ * The {@code readlimit} argument tells this input stream to
* allow that many bytes to be read before the mark position gets
* invalidated.
*
- * This method simply performs in.mark(readlimit)
.
+ * This method simply performs {@code in.mark(readlimit)}.
*
* @param readlimit the maximum limit of bytes that can be read before
* the mark position becomes invalid.
@@ -202,10 +202,10 @@
/**
* Repositions this stream to the position at the time the
- * mark
method was last called on this input stream.
+ * {@code mark} method was last called on this input stream.
*
* This method
- * simply performs in.reset()
.
+ * simply performs {@code in.reset()}.
*
* Stream marks are intended to be used in
* situations where you need to read ahead a little to see what's in
@@ -226,14 +226,14 @@
}
/**
- * Tests if this input stream supports the mark
- * and reset
methods.
+ * Tests if this input stream supports the {@code mark}
+ * and {@code reset} methods.
* This method
- * simply performs in.markSupported()
.
+ * simply performs {@code in.markSupported()}.
*
- * @return true
if this stream type supports the
- * mark
and reset
method;
- * false
otherwise.
+ * @return {@code true} if this stream type supports the
+ * {@code mark} and {@code reset} method;
+ * {@code false} otherwise.
* @see java.io.FilterInputStream#in
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FilterOutputStream.java
--- a/src/java.base/share/classes/java/io/FilterOutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FilterOutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -32,10 +32,10 @@
* basic sink of data, but possibly transforming the data along the
* way or providing additional functionality.
*
- * The class FilterOutputStream
itself simply overrides
- * all methods of OutputStream
with versions that pass
+ * The class {@code FilterOutputStream} itself simply overrides
+ * all methods of {@code OutputStream} with versions that pass
* all requests to the underlying output stream. Subclasses of
- * FilterOutputStream
may further override some of these
+ * {@code FilterOutputStream} may further override some of these
* methods as well as provide additional methods and fields.
*
* @author Jonathan Payne
@@ -63,7 +63,7 @@
*
* @param out the underlying output stream to be assigned to
* the field {@code this.out} for later use, or
- * null
if this instance is to be
+ * {@code null} if this instance is to be
* created without an underlying stream.
*/
public FilterOutputStream(OutputStream out) {
@@ -71,15 +71,15 @@
}
/**
- * Writes the specified byte
to this output stream.
+ * Writes the specified {@code byte} to this output stream.
*
- * The write
method of FilterOutputStream
- * calls the write
method of its underlying output stream,
+ * The {@code write} method of {@code FilterOutputStream}
+ * calls the {@code write} method of its underlying output stream,
* that is, it performs {@code out.write(b)}.
*
* Implements the abstract {@code write} method of {@code OutputStream}.
*
- * @param b the byte
.
+ * @param b the {@code byte}.
* @throws IOException if an I/O error occurs.
*/
@Override
@@ -88,16 +88,16 @@
}
/**
- * Writes b.length
bytes to this output stream.
+ * Writes {@code b.length} bytes to this output stream.
*
- * The write
method of FilterOutputStream
- * calls its write
method of three arguments with the
- * arguments b
, 0
, and
- * b.length
.
+ * The {@code write} method of {@code FilterOutputStream}
+ * calls its {@code write} method of three arguments with the
+ * arguments {@code b}, {@code 0}, and
+ * {@code b.length}.
*
* Note that this method does not call the one-argument
- * write
method of its underlying output stream with
- * the single argument b
.
+ * {@code write} method of its underlying output stream with
+ * the single argument {@code b}.
*
* @param b the data to be written.
* @throws IOException if an I/O error occurs.
@@ -109,17 +109,17 @@
}
/**
- * Writes len
bytes from the specified
- * byte
array starting at offset off
to
+ * Writes {@code len} bytes from the specified
+ * {@code byte} array starting at offset {@code off} to
* this output stream.
*
- * The write
method of FilterOutputStream
- * calls the write
method of one argument on each
- * byte
to output.
+ * The {@code write} method of {@code FilterOutputStream}
+ * calls the {@code write} method of one argument on each
+ * {@code byte} to output.
*
- * Note that this method does not call the write
method
+ * Note that this method does not call the {@code write} method
* of its underlying output stream with the same arguments. Subclasses
- * of FilterOutputStream
should provide a more efficient
+ * of {@code FilterOutputStream} should provide a more efficient
* implementation of this method.
*
* @param b the data.
@@ -142,8 +142,8 @@
* Flushes this output stream and forces any buffered output bytes
* to be written out to the stream.
*
- * The flush
method of FilterOutputStream
- * calls the flush
method of its underlying output stream.
+ * The {@code flush} method of {@code FilterOutputStream}
+ * calls the {@code flush} method of its underlying output stream.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterOutputStream#out
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FilterReader.java
--- a/src/java.base/share/classes/java/io/FilterReader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FilterReader.java Tue Sep 24 09:43:43 2019 +0100
@@ -28,9 +28,9 @@
/**
* Abstract class for reading filtered character streams.
- * The abstract class FilterReader
itself
+ * The abstract class {@code FilterReader} itself
* provides default methods that pass all requests to
- * the contained stream. Subclasses of FilterReader
+ * the contained stream. Subclasses of {@code FilterReader}
* should override some of these methods and may also provide
* additional methods and fields.
*
@@ -49,7 +49,7 @@
* Creates a new filtered reader.
*
* @param in a Reader object providing the underlying stream.
- * @throws NullPointerException if in
is null
+ * @throws NullPointerException if {@code in} is {@code null}
*/
protected FilterReader(Reader in) {
super(in);
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/FilterWriter.java
--- a/src/java.base/share/classes/java/io/FilterWriter.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/FilterWriter.java Tue Sep 24 09:43:43 2019 +0100
@@ -28,9 +28,9 @@
/**
* Abstract class for writing filtered character streams.
- * The abstract class FilterWriter
itself
+ * The abstract class {@code FilterWriter} itself
* provides default methods that pass all requests to the
- * contained stream. Subclasses of FilterWriter
+ * contained stream. Subclasses of {@code FilterWriter}
* should override some of these methods and may also
* provide additional methods and fields.
*
@@ -49,7 +49,7 @@
* Create a new filtered writer.
*
* @param out a Writer object to provide the underlying stream.
- * @throws NullPointerException if out
is null
+ * @throws NullPointerException if {@code out} is {@code null}
*/
protected FilterWriter(Writer out) {
super(out);
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/InputStream.java
--- a/src/java.base/share/classes/java/io/InputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/InputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -34,7 +34,7 @@
* This abstract class is the superclass of all classes representing
* an input stream of bytes.
*
- *
Applications that need to define a subclass of InputStream
+ *
Applications that need to define a subclass of {@code InputStream}
* must always provide a method that returns the next byte of input.
*
* @author Arthur van Hoff
@@ -167,15 +167,15 @@
/**
* Reads the next byte of data from the input stream. The value byte is
- * returned as an int
in the range 0
to
- * 255
. If no byte is available because the end of the stream
- * has been reached, the value -1
is returned. This method
+ * returned as an {@code int} in the range {@code 0} to
+ * {@code 255}. If no byte is available because the end of the stream
+ * has been reached, the value {@code -1} is returned. This method
* blocks until input data is available, the end of the stream is detected,
* or an exception is thrown.
*
*
A subclass must provide an implementation of this method.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
*/
@@ -183,35 +183,35 @@
/**
* Reads some number of bytes from the input stream and stores them into
- * the buffer array b
. The number of bytes actually read is
+ * the buffer array {@code b}. The number of bytes actually read is
* returned as an integer. This method blocks until input data is
* available, end of file is detected, or an exception is thrown.
*
- *
If the length of b
is zero, then no bytes are read and
- * 0
is returned; otherwise, there is an attempt to read at
+ *
If the length of {@code b} is zero, then no bytes are read and
+ * {@code 0} is returned; otherwise, there is an attempt to read at
* least one byte. If no byte is available because the stream is at the
- * end of the file, the value -1
is returned; otherwise, at
- * least one byte is read and stored into b
.
+ * end of the file, the value {@code -1} is returned; otherwise, at
+ * least one byte is read and stored into {@code b}.
*
- *
The first byte read is stored into element b[0]
, the
- * next one into b[1]
, and so on. The number of bytes read is,
- * at most, equal to the length of b
. Let k be the
+ *
The first byte read is stored into element {@code b[0]}, the
+ * next one into {@code b[1]}, and so on. The number of bytes read is,
+ * at most, equal to the length of {@code b}. Let k be the
* number of bytes actually read; these bytes will be stored in elements
- * b[0]
through b[
k-1]
,
- * leaving elements b[
k]
through
- * b[b.length-1]
unaffected.
+ * {@code b[0]} through {@code b[}k{@code -1]},
+ * leaving elements {@code b[}k{@code ]} through
+ * {@code b[b.length-1]} unaffected.
*
- *
The read(b)
method for class InputStream
- * has the same effect as:
read(b, 0, b.length)
+ * The {@code read(b)} method for class {@code InputStream} + * has the same effect as:
{@code read(b, 0, b.length) }* * @param b the buffer into which the data is read. * @return the total number of bytes read into the buffer, or - *
-1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException If the first byte cannot be read for any reason
* other than the end of the file, if the input stream has been
* closed, or if some other I/O error occurs.
- * @throws NullPointerException if b
is null
.
+ * @throws NullPointerException if {@code b} is {@code null}.
* @see java.io.InputStream#read(byte[], int, int)
*/
public int read(byte b[]) throws IOException {
@@ -219,60 +219,60 @@
}
/**
- * Reads up to len
bytes of data from the input stream into
+ * Reads up to {@code len} bytes of data from the input stream into
* an array of bytes. An attempt is made to read as many as
- * len
bytes, but a smaller number may be read.
+ * {@code len} bytes, but a smaller number may be read.
* The number of bytes actually read is returned as an integer.
*
* This method blocks until input data is available, end of file is * detected, or an exception is thrown. * - *
If len
is zero, then no bytes are read and
- * 0
is returned; otherwise, there is an attempt to read at
+ *
If {@code len} is zero, then no bytes are read and
+ * {@code 0} is returned; otherwise, there is an attempt to read at
* least one byte. If no byte is available because the stream is at end of
- * file, the value -1
is returned; otherwise, at least one
- * byte is read and stored into b
.
+ * file, the value {@code -1} is returned; otherwise, at least one
+ * byte is read and stored into {@code b}.
*
- *
The first byte read is stored into element b[off]
, the
- * next one into b[off+1]
, and so on. The number of bytes read
- * is, at most, equal to len
. Let k be the number of
+ *
The first byte read is stored into element {@code b[off]}, the
+ * next one into {@code b[off+1]}, and so on. The number of bytes read
+ * is, at most, equal to {@code len}. Let k be the number of
* bytes actually read; these bytes will be stored in elements
- * b[off]
through b[off+
k-1]
,
- * leaving elements b[off+
k]
through
- * b[off+len-1]
unaffected.
+ * {@code b[off]} through {@code b[off+}k{@code -1]},
+ * leaving elements {@code b[off+}k{@code ]} through
+ * {@code b[off+len-1]} unaffected.
*
- *
In every case, elements b[0]
through
- * b[off-1]
and elements b[off+len]
through
- * b[b.length-1]
are unaffected.
+ *
In every case, elements {@code b[0]} through + * {@code b[off-1]} and elements {@code b[off+len]} through + * {@code b[b.length-1]} are unaffected. * - *
The read(b,
off,
len)
method
- * for class InputStream
simply calls the method
- * read()
repeatedly. If the first such call results in an
- * IOException
, that exception is returned from the call to
- * the read(b,
off,
len)
method. If
- * any subsequent call to read()
results in a
- * IOException
, the exception is caught and treated as if it
+ *
The {@code read(b, off, len)} method
+ * for class {@code InputStream} simply calls the method
+ * {@code read()} repeatedly. If the first such call results in an
+ * {@code IOException}, that exception is returned from the call to
+ * the {@code read(b,} {@code off,} {@code len)} method. If
+ * any subsequent call to {@code read()} results in a
+ * {@code IOException}, the exception is caught and treated as if it
* were end of file; the bytes read up to that point are stored into
- * b
and the number of bytes read before the exception
+ * {@code b} and the number of bytes read before the exception
* occurred is returned. The default implementation of this method blocks
- * until the requested amount of input data len
has been read,
+ * until the requested amount of input data {@code len} has been read,
* end of file is detected, or an exception is thrown. Subclasses are
* encouraged to provide a more efficient implementation of this method.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in array b
+ * @param off the start offset in array {@code b}
* at which the data is written.
* @param len the maximum number of bytes to read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException If the first byte cannot be read for any reason
* other than end of file, or if the input stream has been closed,
* or if some other I/O error occurs.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is greater than
- * b.length - off
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
* @see java.io.InputStream#read()
*/
public int read(byte b[], int off, int len) throws IOException {
@@ -509,18 +509,18 @@
}
/**
- * Skips over and discards n
bytes of data from this input
- * stream. The skip
method may, for a variety of reasons, end
- * up skipping over some smaller number of bytes, possibly 0
.
+ * Skips over and discards {@code n} bytes of data from this input
+ * stream. The {@code skip} method may, for a variety of reasons, end
+ * up skipping over some smaller number of bytes, possibly {@code 0}.
* This may result from any of a number of conditions; reaching end of file
- * before n
bytes have been skipped is only one possibility.
+ * before {@code n} bytes have been skipped is only one possibility.
* The actual number of bytes skipped is returned. If {@code n} is
* negative, the {@code skip} method for class {@code InputStream} always
* returns 0, and no bytes are skipped. Subclasses may handle the negative
* value differently.
*
- *
The skip
method implementation of this class creates a
- * byte array and then repeatedly reads into it until n
bytes
+ *
The {@code skip} method implementation of this class creates a + * byte array and then repeatedly reads into it until {@code n} bytes * have been read or the end of the stream has been reached. Subclasses are * encouraged to provide a more efficient implementation of this method. * For instance, the implementation may depend on the ability to seek. @@ -644,7 +644,7 @@ * Closes this input stream and releases any system resources associated * with the stream. * - *
The close
method of InputStream
does
+ *
The {@code close} method of {@code InputStream} does
* nothing.
*
* @throws IOException if an I/O error occurs.
@@ -653,24 +653,24 @@
/**
* Marks the current position in this input stream. A subsequent call to
- * the reset
method repositions this stream at the last marked
+ * the {@code reset} method repositions this stream at the last marked
* position so that subsequent reads re-read the same bytes.
*
- *
The readlimit
arguments tells this input stream to
+ *
The {@code readlimit} arguments tells this input stream to * allow that many bytes to be read before the mark position gets * invalidated. * - *
The general contract of mark
is that, if the method
- * markSupported
returns true
, the stream somehow
- * remembers all the bytes read after the call to mark
and
+ *
The general contract of {@code mark} is that, if the method
+ * {@code markSupported} returns {@code true}, the stream somehow
+ * remembers all the bytes read after the call to {@code mark} and
* stands ready to supply those same bytes again if and whenever the method
- * reset
is called. However, the stream is not required to
- * remember any data at all if more than readlimit
bytes are
- * read from the stream before reset
is called.
+ * {@code reset} is called. However, the stream is not required to
+ * remember any data at all if more than {@code readlimit} bytes are
+ * read from the stream before {@code reset} is called.
*
*
Marking a closed stream should not have any effect on the stream. * - *
The mark
method of InputStream
does
+ *
The {@code mark} method of {@code InputStream} does
* nothing.
*
* @param readlimit the maximum limit of bytes that can be read before
@@ -681,42 +681,42 @@
/**
* Repositions this stream to the position at the time the
- * mark
method was last called on this input stream.
+ * {@code mark} method was last called on this input stream.
*
- *
The general contract of reset
is:
+ *
The general contract of {@code reset} is: * *
markSupported
returns
- * true
, then:
+ * mark
has not been called since
+ * mark
was last called is larger than the argument
- * to mark
at that last call, then an
- * IOException
might be thrown.
+ * since {@code mark} was last called is larger than the argument
+ * to {@code mark} at that last call, then an
+ * {@code IOException} might be thrown.
*
- * IOException
is not thrown, then the
+ * mark
(or since the start of the
- * file, if mark
has not been called) will be resupplied
- * to subsequent callers of the read
method, followed by
+ * most recent call to {@code mark} (or since the start of the
+ * file, if {@code mark} has not been called) will be resupplied
+ * to subsequent callers of the {@code read} method, followed by
* any bytes that otherwise would have been the next input data as of
- * the time of the call to reset
. markSupported
returns
- * false
, then:
+ * reset
may throw an
- * IOException
.
+ * IOException
is not thrown, then the stream
+ * read
method depend on the
+ * to subsequent callers of the {@code read} method depend on the
* particular type of the input stream. The method reset
for class InputStream
- * does nothing except throw an IOException
.
+ *
The method {@code reset} for class {@code InputStream}
+ * does nothing except throw an {@code IOException}.
*
* @throws IOException if this stream has not been marked or if the
* mark has been invalidated.
@@ -728,14 +728,14 @@
}
/**
- * Tests if this input stream supports the mark
and
- * reset
methods. Whether or not mark
and
- * reset
are supported is an invariant property of a
- * particular input stream instance. The markSupported
method
- * of InputStream
returns false
.
+ * Tests if this input stream supports the {@code mark} and
+ * {@code reset} methods. Whether or not {@code mark} and
+ * {@code reset} are supported is an invariant property of a
+ * particular input stream instance. The {@code markSupported} method
+ * of {@code InputStream} returns {@code false}.
*
- * @return true
if this stream instance supports the mark
- * and reset methods; false
otherwise.
+ * @return {@code true} if this stream instance supports the mark
+ * and reset methods; {@code false} otherwise.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/InputStreamReader.java
--- a/src/java.base/share/classes/java/io/InputStreamReader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/InputStreamReader.java Tue Sep 24 09:43:43 2019 +0100
@@ -141,11 +141,11 @@
*
If this instance was created with the {@link
* #InputStreamReader(InputStream, String)} constructor then the returned
* name, being unique for the encoding, may differ from the name passed to
- * the constructor. This method will return null
if the
+ * the constructor. This method will return {@code null} if the
* stream has been closed.
*
null
if the stream has been closed
+ * {@code null} if the stream has been closed
*
* @see java.nio.charset.Charset
*
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/InterruptedIOException.java
--- a/src/java.base/share/classes/java/io/InterruptedIOException.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/InterruptedIOException.java Tue Sep 24 09:43:43 2019 +0100
@@ -27,7 +27,7 @@
/**
* Signals that an I/O operation has been interrupted. An
- * InterruptedIOException
is thrown to indicate that an
+ * {@code InterruptedIOException} is thrown to indicate that an
* input or output transfer has been terminated because the thread
* performing it was interrupted. The field {@link #bytesTransferred}
* indicates how many bytes were successfully transferred before
@@ -45,19 +45,19 @@
private static final long serialVersionUID = 4020568460727500567L;
/**
- * Constructs an InterruptedIOException
with
- * null
as its error detail message.
+ * Constructs an {@code InterruptedIOException} with
+ * {@code null} as its error detail message.
*/
public InterruptedIOException() {
super();
}
/**
- * Constructs an InterruptedIOException
with the
- * specified detail message. The string s
can be
+ * Constructs an {@code InterruptedIOException} with the
+ * specified detail message. The string {@code s} can be
* retrieved later by the
* {@link java.lang.Throwable#getMessage}
- * method of class java.lang.Throwable
.
+ * method of class {@code java.lang.Throwable}.
*
* @param s the detail message.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/InvalidObjectException.java
--- a/src/java.base/share/classes/java/io/InvalidObjectException.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/InvalidObjectException.java Tue Sep 24 09:43:43 2019 +0100
@@ -41,7 +41,7 @@
private static final long serialVersionUID = 3233174318281839583L;
/**
- * Constructs an InvalidObjectException
.
+ * Constructs an {@code InvalidObjectException}.
* @param reason Detailed message explaining the reason for the failure.
*
* @see ObjectInputValidation
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/ObjectInputStream.java
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -74,7 +74,7 @@
* Only objects that support the java.io.Serializable or * java.io.Externalizable interface can be read from streams. * - *
The method readObject
is used to read an object from the
+ *
The method {@code readObject} is used to read an object from the
* stream. Java's safe casting should be used to get the desired type. In
* Java, strings and arrays are objects and are treated as objects during
* serialization. When read they need to be cast to the expected type.
@@ -157,7 +157,7 @@
* throw OptionalDataExceptions with eof set to true, bytewise reads will
* return -1, and primitive reads will throw EOFExceptions. Note that this
* behavior does not hold for streams written with the old
- * ObjectStreamConstants.PROTOCOL_VERSION_1
protocol, in which the
+ * {@code ObjectStreamConstants.PROTOCOL_VERSION_1} protocol, in which the
* end of data written by writeExternal methods is not demarcated, and hence
* cannot be detected.
*
@@ -208,7 +208,7 @@
* solely of its name; field values of the constant are not transmitted. To
* deserialize an enum constant, ObjectInputStream reads the constant name from
* the stream; the deserialized constant is then obtained by calling the static
- * method Enum.valueOf(Class, String)
with the enum constant's
+ * method {@code Enum.valueOf(Class, String)} with the enum constant's
* base type and the received constant name as arguments. Like other
* serializable or externalizable objects, enum constants can function as the
* targets of back references appearing subsequently in the serialization
@@ -335,7 +335,7 @@
* @throws IOException if an I/O error occurs while reading stream header
* @throws SecurityException if untrusted subclass illegally overrides
* security-sensitive methods
- * @throws NullPointerException if in
is null
+ * @throws NullPointerException if {@code in} is {@code null}
* @see ObjectInputStream#ObjectInputStream()
* @see ObjectInputStream#readFields()
* @see ObjectOutputStream#ObjectOutputStream(OutputStream)
@@ -360,12 +360,12 @@
* {@linkplain ObjectInputFilter.Config#getSerialFilter() the system-wide filter}.
*
*
If there is a security manager installed, this method first calls the
- * security manager's checkPermission
method with the
- * SerializablePermission("enableSubclassImplementation")
+ * security manager's {@code checkPermission} method with the
+ * {@code SerializablePermission("enableSubclassImplementation")}
* permission to ensure it's ok to enable subclassing.
*
* @throws SecurityException if a security manager exists and its
- * checkPermission
method denies enabling
+ * {@code checkPermission} method denies enabling
* subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission
@@ -587,7 +587,7 @@
* Reads the persistent fields from the stream and makes them available by
* name.
*
- * @return the GetField
object representing the persistent
+ * @return the {@code GetField} object representing the persistent
* fields of the object being deserialized
* @throws ClassNotFoundException if the class of a serialized object
* could not be found.
@@ -651,36 +651,36 @@
* description. Subclasses may implement this method to allow classes to
* be fetched from an alternate source.
*
- *
The corresponding method in ObjectOutputStream
is
- * annotateClass
. This method will be invoked only once for
+ *
The corresponding method in {@code ObjectOutputStream} is
+ * {@code annotateClass}. This method will be invoked only once for
* each unique class in the stream. This method can be implemented by
* subclasses to use an alternate loading mechanism but must return a
- * Class
object. Once returned, if the class is not an array
+ * {@code Class} object. Once returned, if the class is not an array
* class, its serialVersionUID is compared to the serialVersionUID of the
* serialized class, and if there is a mismatch, the deserialization fails
* and an {@link InvalidClassException} is thrown.
*
*
The default implementation of this method in
- * ObjectInputStream
returns the result of calling
+ * {@code ObjectInputStream} returns the result of calling
*
* Class.forName(desc.getName(), false, loader) *- * where
loader
is the first class loader on the current
+ * where {@code loader} is the first class loader on the current
* thread's stack (starting from the currently executing method) that is
* neither the {@linkplain ClassLoader#getPlatformClassLoader() platform
- * class loader} nor its ancestor; otherwise, loader
is the
+ * class loader} nor its ancestor; otherwise, {@code loader} is the
* platform class loader. If this call results in a
- * ClassNotFoundException
and the name of the passed
- * ObjectStreamClass
instance is the Java language keyword
- * for a primitive type or void, then the Class
object
+ * {@code ClassNotFoundException} and the name of the passed
+ * {@code ObjectStreamClass} instance is the Java language keyword
+ * for a primitive type or void, then the {@code Class} object
* representing that primitive type or void will be returned
- * (e.g., an ObjectStreamClass
with the name
- * "int"
will be resolved to Integer.TYPE
).
- * Otherwise, the ClassNotFoundException
will be thrown to
+ * (e.g., an {@code ObjectStreamClass} with the name
+ * {@code "int"} will be resolved to {@code Integer.TYPE}).
+ * Otherwise, the {@code ClassNotFoundException} will be thrown to
* the caller of this method.
*
- * @param desc an instance of class ObjectStreamClass
- * @return a Class
object corresponding to desc
+ * @param desc an instance of class {@code ObjectStreamClass}
+ * @return a {@code Class} object corresponding to {@code desc}
* @throws IOException any of the usual Input/Output exceptions.
* @throws ClassNotFoundException if class of a serialized object cannot
* be found.
@@ -711,43 +711,43 @@
* This method is called exactly once for each unique proxy class * descriptor in the stream. * - *
The corresponding method in ObjectOutputStream
is
- * annotateProxyClass
. For a given subclass of
- * ObjectInputStream
that overrides this method, the
- * annotateProxyClass
method in the corresponding subclass of
- * ObjectOutputStream
must write any data or objects read by
+ *
The corresponding method in {@code ObjectOutputStream} is + * {@code annotateProxyClass}. For a given subclass of + * {@code ObjectInputStream} that overrides this method, the + * {@code annotateProxyClass} method in the corresponding subclass of + * {@code ObjectOutputStream} must write any data or objects read by * this method. * *
The default implementation of this method in
- * ObjectInputStream
returns the result of calling
- * Proxy.getProxyClass
with the list of Class
- * objects for the interfaces that are named in the interfaces
- * parameter. The Class
object for each interface name
- * i
is the value returned by calling
+ * {@code ObjectInputStream} returns the result of calling
+ * {@code Proxy.getProxyClass} with the list of {@code Class}
+ * objects for the interfaces that are named in the {@code interfaces}
+ * parameter. The {@code Class} object for each interface name
+ * {@code i} is the value returned by calling
*
* Class.forName(i, false, loader) *- * where
loader
is the first class loader on the current
+ * where {@code loader} is the first class loader on the current
* thread's stack (starting from the currently executing method) that is
* neither the {@linkplain ClassLoader#getPlatformClassLoader() platform
- * class loader} nor its ancestor; otherwise, loader
is the
+ * class loader} nor its ancestor; otherwise, {@code loader} is the
* platform class loader.
* Unless any of the resolved interfaces are non-public, this same value
- * of loader
is also the class loader passed to
- * Proxy.getProxyClass
; if non-public interfaces are present,
+ * of {@code loader} is also the class loader passed to
+ * {@code Proxy.getProxyClass}; if non-public interfaces are present,
* their class loader is passed instead (if more than one non-public
* interface class loader is encountered, an
- * IllegalAccessError
is thrown).
- * If Proxy.getProxyClass
throws an
- * IllegalArgumentException
, resolveProxyClass
- * will throw a ClassNotFoundException
containing the
- * IllegalArgumentException
.
+ * {@code IllegalAccessError} is thrown).
+ * If {@code Proxy.getProxyClass} throws an
+ * {@code IllegalArgumentException}, {@code resolveProxyClass}
+ * will throw a {@code ClassNotFoundException} containing the
+ * {@code IllegalArgumentException}.
*
* @param interfaces the list of interface names that were
* deserialized in the proxy class descriptor
* @return a proxy class for the specified interfaces
* @throws IOException any exception thrown by the underlying
- * InputStream
+ * {@code InputStream}
* @throws ClassNotFoundException if the proxy class or any of the
* named interfaces could not be found
* @see ObjectOutputStream#annotateProxyClass(Class)
@@ -863,7 +863,7 @@
* and version number.
*
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
+ * underlying {@code InputStream}
* @throws StreamCorruptedException if control information in the stream
* is inconsistent
*/
@@ -884,7 +884,7 @@
* item in the serialization stream. Subclasses of ObjectInputStream may
* override this method to read in class descriptors that have been written
* in non-standard formats (by subclasses of ObjectOutputStream which have
- * overridden the writeClassDescriptor
method). By default,
+ * overridden the {@code writeClassDescriptor} method). By default,
* this method reads class descriptors according to the format defined in
* the Object Serialization specification.
*
@@ -946,7 +946,7 @@
*
* @return the number of available bytes.
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
+ * underlying {@code InputStream}
*/
public int available() throws IOException {
return bin.available();
@@ -1129,7 +1129,7 @@
*
* @return a String copy of the line.
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
+ * underlying {@code InputStream}
* @deprecated This method does not properly convert bytes to characters.
* see DataInputStream for the details and alternatives.
*/
@@ -1145,7 +1145,7 @@
*
* @return the String.
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
+ * underlying {@code InputStream}
* @throws UTFDataFormatException if read bytes do not represent a valid
* modified UTF-8 encoding of a string
*/
@@ -1340,8 +1340,8 @@
* @param name the name of the field
* @return true, if and only if the named field is defaulted
* @throws IOException if there are I/O errors while reading from
- * the underlying InputStream
- * @throws IllegalArgumentException if name
does not
+ * the underlying {@code InputStream}
+ * @throws IllegalArgumentException if {@code name} does not
* correspond to a serializable field
*/
public abstract boolean defaulted(String name) throws IOException;
@@ -1350,12 +1350,12 @@
* Get the value of the named boolean field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named boolean
field
+ * @return the value of the named {@code boolean} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract boolean get(String name, boolean val)
@@ -1365,12 +1365,12 @@
* Get the value of the named byte field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named byte
field
+ * @return the value of the named {@code byte} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract byte get(String name, byte val) throws IOException;
@@ -1379,12 +1379,12 @@
* Get the value of the named char field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named char
field
+ * @return the value of the named {@code char} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract char get(String name, char val) throws IOException;
@@ -1393,12 +1393,12 @@
* Get the value of the named short field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named short
field
+ * @return the value of the named {@code short} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract short get(String name, short val) throws IOException;
@@ -1407,12 +1407,12 @@
* Get the value of the named int field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named int
field
+ * @return the value of the named {@code int} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract int get(String name, int val) throws IOException;
@@ -1421,12 +1421,12 @@
* Get the value of the named long field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named long
field
+ * @return the value of the named {@code long} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract long get(String name, long val) throws IOException;
@@ -1435,12 +1435,12 @@
* Get the value of the named float field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named float
field
+ * @return the value of the named {@code float} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract float get(String name, float val) throws IOException;
@@ -1449,12 +1449,12 @@
* Get the value of the named double field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named double
field
+ * @return the value of the named {@code double} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract double get(String name, double val) throws IOException;
@@ -1463,12 +1463,12 @@
* Get the value of the named Object field from the persistent field.
*
* @param name the name of the field
- * @param val the default value to use if name
does not
+ * @param val the default value to use if {@code name} does not
* have a value
- * @return the value of the named Object
field
+ * @return the value of the named {@code Object} field
* @throws IOException if there are I/O errors while reading from the
- * underlying InputStream
- * @throws IllegalArgumentException if type of name
is
+ * underlying {@code InputStream}
+ * @throws IllegalArgumentException if type of {@code name} is
* not serializable or if the field type is incorrect
*/
public abstract Object get(String name, Object val) throws IOException;
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/ObjectOutputStream.java
--- a/src/java.base/share/classes/java/io/ObjectOutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -232,7 +232,7 @@
* @throws IOException if an I/O error occurs while writing stream header
* @throws SecurityException if untrusted subclass illegally overrides
* security-sensitive methods
- * @throws NullPointerException if out
is null
+ * @throws NullPointerException if {@code out} is {@code null}
* @since 1.4
* @see ObjectOutputStream#ObjectOutputStream()
* @see ObjectOutputStream#putFields()
@@ -259,12 +259,12 @@
* this implementation of ObjectOutputStream.
*
* If there is a security manager installed, this method first calls the
- * security manager's checkPermission
method with a
- * SerializablePermission("enableSubclassImplementation")
+ * security manager's {@code checkPermission} method with a
+ * {@code SerializablePermission("enableSubclassImplementation")}
* permission to ensure it's ok to enable subclassing.
*
* @throws SecurityException if a security manager exists and its
- * checkPermission
method denies enabling
+ * {@code checkPermission} method denies enabling
* subclassing.
* @throws IOException if an I/O error occurs while creating this stream
* @see SecurityManager#checkPermission
@@ -429,7 +429,7 @@
* called otherwise.
*
* @throws IOException if I/O errors occur while writing to the underlying
- * OutputStream
+ * {@code OutputStream}
*/
public void defaultWriteObject() throws IOException {
SerialCallbackContext ctx = curContext;
@@ -529,18 +529,18 @@
*
*
This method is called exactly once for each unique proxy class
* descriptor in the stream. The default implementation of this method in
- * ObjectOutputStream
does nothing.
+ * {@code ObjectOutputStream} does nothing.
*
- *
The corresponding method in ObjectInputStream
is
- * resolveProxyClass
. For a given subclass of
- * ObjectOutputStream
that overrides this method, the
- * resolveProxyClass
method in the corresponding subclass of
- * ObjectInputStream
must read any data or objects written by
- * annotateProxyClass
.
+ *
The corresponding method in {@code ObjectInputStream} is
+ * {@code resolveProxyClass}. For a given subclass of
+ * {@code ObjectOutputStream} that overrides this method, the
+ * {@code resolveProxyClass} method in the corresponding subclass of
+ * {@code ObjectInputStream} must read any data or objects written by
+ * {@code annotateProxyClass}.
*
* @param cl the proxy class to annotate custom data for
* @throws IOException any exception thrown by the underlying
- * OutputStream
+ * {@code OutputStream}
* @see ObjectInputStream#resolveProxyClass(String[])
* @since 1.3
*/
@@ -646,16 +646,16 @@
* stream. Subclasses of ObjectOutputStream may override this method to
* customize the way in which class descriptors are written to the
* serialization stream. The corresponding method in ObjectInputStream,
- * readClassDescriptor
, should then be overridden to
+ * {@code readClassDescriptor}, should then be overridden to
* reconstitute the class descriptor from its custom stream representation.
* By default, this method writes class descriptors according to the format
* defined in the Object Serialization specification.
*
*
Note that this method will only be called if the ObjectOutputStream
* is not using the old serialization stream format (set by calling
- * ObjectOutputStream's useProtocolVersion
method). If this
+ * ObjectOutputStream's {@code useProtocolVersion} method). If this
* serialization stream is using the old format
- * (PROTOCOL_VERSION_1
), the class descriptor will be written
+ * ({@code PROTOCOL_VERSION_1}), the class descriptor will be written
* internally in a manner that cannot be overridden or customized.
*
* @param desc class descriptor to write to the stream
@@ -889,10 +889,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * boolean
+ * {@code boolean}
*/
public abstract void put(String name, boolean val);
@@ -901,10 +901,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * byte
+ * {@code byte}
*/
public abstract void put(String name, byte val);
@@ -913,10 +913,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * char
+ * {@code char}
*/
public abstract void put(String name, char val);
@@ -925,10 +925,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * short
+ * {@code short}
*/
public abstract void put(String name, short val);
@@ -937,10 +937,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * int
+ * {@code int}
*/
public abstract void put(String name, int val);
@@ -949,10 +949,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * long
+ * {@code long}
*/
public abstract void put(String name, long val);
@@ -961,10 +961,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * float
+ * {@code float}
*/
public abstract void put(String name, float val);
@@ -973,10 +973,10 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * @throws IllegalArgumentException if name
does not
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not
- * double
+ * {@code double}
*/
public abstract void put(String name, double val);
@@ -985,8 +985,8 @@
*
* @param name the name of the serializable field
* @param val the value to assign to the field
- * (which may be null
)
- * @throws IllegalArgumentException if name
does not
+ * (which may be {@code null})
+ * @throws IllegalArgumentException if {@code name} does not
* match the name of a serializable field for the class whose fields
* are being written, or if the type of the named field is not a
* reference type
@@ -996,18 +996,18 @@
/**
* Write the data and fields to the specified ObjectOutput stream,
* which must be the same stream that produced this
- * PutField
object.
+ * {@code PutField} object.
*
* @param out the stream to write the data and fields to
* @throws IOException if I/O errors occur while writing to the
* underlying stream
* @throws IllegalArgumentException if the specified stream is not
- * the same stream that produced this PutField
+ * the same stream that produced this {@code PutField}
* object
* @deprecated This method does not write the values contained by this
- * PutField
object in a proper format, and may
+ * {@code PutField} object in a proper format, and may
* result in corruption of the serialization stream. The
- * correct way to write PutField
data is by
+ * correct way to write {@code PutField} data is by
* calling the {@link java.io.ObjectOutputStream#writeFields()}
* method.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/ObjectStreamClass.java
--- a/src/java.base/share/classes/java/io/ObjectStreamClass.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/ObjectStreamClass.java Tue Sep 24 09:43:43 2019 +0100
@@ -276,7 +276,7 @@
* Return the class in the local VM that this version is mapped to. Null
* is returned if there is no corresponding local class.
*
- * @return the Class
instance that this descriptor represents
+ * @return the {@code Class} instance that this descriptor represents
*/
@CallerSensitive
public Class> forClass() {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/ObjectStreamField.java
--- a/src/java.base/share/classes/java/io/ObjectStreamField.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/ObjectStreamField.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -60,10 +60,10 @@
/**
* Create a Serializable field with the specified type. This field should
- * be documented with a serialField
tag.
+ * be documented with a {@code serialField} tag.
*
* @param name the name of the serializable field
- * @param type the Class
object of the serializable field
+ * @param type the {@code Class} object of the serializable field
*/
public ObjectStreamField(String name, Class> type) {
this(name, type, false);
@@ -197,7 +197,7 @@
/**
* Get the name of this field.
*
- * @return a String
representing the name of the serializable
+ * @return a {@code String} representing the name of the serializable
* field
*/
public String getName() {
@@ -206,12 +206,12 @@
/**
* Get the type of the field. If the type is non-primitive and this
- * ObjectStreamField
was obtained from a deserialized {@link
- * ObjectStreamClass} instance, then Object.class
is returned.
- * Otherwise, the Class
object for the type of the field is
+ * {@code ObjectStreamField} was obtained from a deserialized {@link
+ * ObjectStreamClass} instance, then {@code Object.class} is returned.
+ * Otherwise, the {@code Class} object for the type of the field is
* returned.
*
- * @return a Class
object representing the type of the
+ * @return a {@code Class} object representing the type of the
* serializable field
*/
@CallerSensitive
@@ -303,7 +303,7 @@
}
/**
- * Compare this field with another ObjectStreamField
. Return
+ * Compare this field with another {@code ObjectStreamField}. Return
* -1 if this is smaller, 0 if equal, 1 if greater. Types that are
* primitives are "smaller" than object types. If equal, the field names
* are compared.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/OptionalDataException.java
--- a/src/java.base/share/classes/java/io/OptionalDataException.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/OptionalDataException.java Tue Sep 24 09:43:43 2019 +0100
@@ -51,7 +51,7 @@
private static final long serialVersionUID = -8011121865681257820L;
/*
- * Create an OptionalDataException
with a length.
+ * Create an {@code OptionalDataException} with a length.
*/
OptionalDataException(int len) {
eof = false;
@@ -59,7 +59,7 @@
}
/*
- * Create an OptionalDataException
signifying no
+ * Create an {@code OptionalDataException} signifying no
* more primitive data is available.
*/
OptionalDataException(boolean end) {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/OutputStream.java
--- a/src/java.base/share/classes/java/io/OutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/OutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -33,7 +33,7 @@
* and sends them to some sink.
*
* Applications that need to define a subclass of
- * OutputStream
must always provide at least a method
+ * {@code OutputStream} must always provide at least a method
* that writes one byte of output.
*
* @author Arthur van Hoff
@@ -98,26 +98,26 @@
/**
* Writes the specified byte to this output stream. The general
- * contract for write
is that one byte is written
+ * contract for {@code write} is that one byte is written
* to the output stream. The byte to be written is the eight
- * low-order bits of the argument b
. The 24
- * high-order bits of b
are ignored.
+ * low-order bits of the argument {@code b}. The 24
+ * high-order bits of {@code b} are ignored.
*
- * Subclasses of OutputStream
must provide an
+ * Subclasses of {@code OutputStream} must provide an
* implementation for this method.
*
- * @param b the byte
.
+ * @param b the {@code byte}.
* @throws IOException if an I/O error occurs. In particular,
- * an IOException
may be thrown if the
+ * an {@code IOException} may be thrown if the
* output stream has been closed.
*/
public abstract void write(int b) throws IOException;
/**
- * Writes b.length
bytes from the specified byte array
- * to this output stream. The general contract for write(b)
+ * Writes {@code b.length} bytes from the specified byte array
+ * to this output stream. The general contract for {@code write(b)}
* is that it should have exactly the same effect as the call
- * write(b, 0, b.length)
.
+ * {@code write(b, 0, b.length)}.
*
* @param b the data.
* @throws IOException if an I/O error occurs.
@@ -128,31 +128,31 @@
}
/**
- * Writes len
bytes from the specified byte array
- * starting at offset off
to this output stream.
- * The general contract for write(b, off, len)
is that
- * some of the bytes in the array b
are written to the
- * output stream in order; element b[off]
is the first
- * byte written and b[off+len-1]
is the last byte written
+ * Writes {@code len} bytes from the specified byte array
+ * starting at offset {@code off} to this output stream.
+ * The general contract for {@code write(b, off, len)} is that
+ * some of the bytes in the array {@code b} are written to the
+ * output stream in order; element {@code b[off]} is the first
+ * byte written and {@code b[off+len-1]} is the last byte written
* by this operation.
*
- * The write
method of OutputStream
calls
+ * The {@code write} method of {@code OutputStream} calls
* the write method of one argument on each of the bytes to be
* written out. Subclasses are encouraged to override this method and
* provide a more efficient implementation.
*
- * If b
is null
, a
- * NullPointerException
is thrown.
+ * If {@code b} is {@code null}, a
+ * {@code NullPointerException} is thrown.
*
- * If off
is negative, or len
is negative, or
- * off+len
is greater than the length of the array
+ * If {@code off} is negative, or {@code len} is negative, or
+ * {@code off+len} is greater than the length of the array
* {@code b}, then an {@code IndexOutOfBoundsException} is thrown.
*
* @param b the data.
* @param off the start offset in the data.
* @param len the number of bytes to write.
* @throws IOException if an I/O error occurs. In particular,
- * an IOException
is thrown if the output
+ * an {@code IOException} is thrown if the output
* stream is closed.
*/
public void write(byte b[], int off, int len) throws IOException {
@@ -165,7 +165,7 @@
/**
* Flushes this output stream and forces any buffered output bytes
- * to be written out. The general contract of flush
is
+ * to be written out. The general contract of {@code flush} is
* that calling it is an indication that, if any bytes previously
* written have been buffered by the implementation of the output
* stream, such bytes should immediately be written to their
@@ -177,7 +177,7 @@
* passed to the operating system for writing; it does not guarantee that
* they are actually written to a physical device such as a disk drive.
*
- * The flush
method of OutputStream
does nothing.
+ * The {@code flush} method of {@code OutputStream} does nothing.
*
* @throws IOException if an I/O error occurs.
*/
@@ -186,11 +186,11 @@
/**
* Closes this output stream and releases any system resources
- * associated with this stream. The general contract of close
+ * associated with this stream. The general contract of {@code close}
* is that it closes the output stream. A closed stream cannot perform
* output operations and cannot be reopened.
*
- * The close
method of OutputStream
does nothing.
+ * The {@code close} method of {@code OutputStream} does nothing.
*
* @throws IOException if an I/O error occurs.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/OutputStreamWriter.java
--- a/src/java.base/share/classes/java/io/OutputStreamWriter.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/OutputStreamWriter.java Tue Sep 24 09:43:43 2019 +0100
@@ -164,7 +164,7 @@
* been closed.
null
if the stream has been closed
+ * {@code null} if the stream has been closed
*
* @see java.nio.charset.Charset
*
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/PipedInputStream.java
--- a/src/java.base/share/classes/java/io/PipedInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/PipedInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -30,9 +30,9 @@
* to a piped output stream; the piped input
* stream then provides whatever data bytes
* are written to the piped output stream.
- * Typically, data is read from a PipedInputStream
+ * Typically, data is read from a {@code PipedInputStream}
* object by one thread and data is written
- * to the corresponding PipedOutputStream
+ * to the corresponding {@code PipedOutputStream}
* by some other thread. Attempting to use
* both objects from a single thread is not
* recommended, as it may deadlock the thread.
@@ -80,7 +80,7 @@
* The index of the position in the circular buffer at which the
* next byte of data will be stored when received from the connected
* piped output stream. in<0
implies the buffer is empty,
- * in==out
implies the buffer is full
+ * {@code in==out} implies the buffer is full
* @since 1.1
*/
protected int in = -1;
@@ -93,10 +93,10 @@
protected int out = 0;
/**
- * Creates a PipedInputStream
so
+ * Creates a {@code PipedInputStream} so
* that it is connected to the piped output
- * stream src
. Data bytes written
- * to src
will then be available
+ * stream {@code src}. Data bytes written
+ * to {@code src} will then be available
* as input from this stream.
*
* @param src the stream to connect to.
@@ -107,11 +107,11 @@
}
/**
- * Creates a PipedInputStream
so that it is
+ * Creates a {@code PipedInputStream} so that it is
* connected to the piped output stream
- * src
and uses the specified pipe size for
+ * {@code src} and uses the specified pipe size for
* the pipe's buffer.
- * Data bytes written to src
will then
+ * Data bytes written to {@code src} will then
* be available as input from this stream.
*
* @param src the stream to connect to.
@@ -127,24 +127,24 @@
}
/**
- * Creates a PipedInputStream
so
+ * Creates a {@code PipedInputStream} so
* that it is not yet {@linkplain #connect(java.io.PipedOutputStream)
* connected}.
* It must be {@linkplain java.io.PipedOutputStream#connect(
* java.io.PipedInputStream) connected} to a
- * PipedOutputStream
before being used.
+ * {@code PipedOutputStream} before being used.
*/
public PipedInputStream() {
initPipe(DEFAULT_PIPE_SIZE);
}
/**
- * Creates a PipedInputStream
so that it is not yet
+ * Creates a {@code PipedInputStream} so that it is not yet
* {@linkplain #connect(java.io.PipedOutputStream) connected} and
* uses the specified pipe size for the pipe's buffer.
* It must be {@linkplain java.io.PipedOutputStream#connect(
* java.io.PipedInputStream)
- * connected} to a PipedOutputStream
before being used.
+ * connected} to a {@code PipedOutputStream} before being used.
*
* @param pipeSize the size of the pipe's buffer.
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
@@ -163,21 +163,21 @@
/**
* Causes this piped input stream to be connected
- * to the piped output stream src
.
+ * to the piped output stream {@code src}.
* If this object is already connected to some
- * other piped output stream, an IOException
+ * other piped output stream, an {@code IOException}
* is thrown.
*
- * If src
is an
- * unconnected piped output stream and snk
+ * If {@code src} is an
+ * unconnected piped output stream and {@code snk}
* is an unconnected piped input stream, they
* may be connected by either the call:
*
- *
snk.connect(src)
+ * {@code snk.connect(src)}*
* or the call: * - *
src.connect(snk)
+ * {@code src.connect(snk)}*
* The two calls have the same effect.
*
@@ -192,7 +192,7 @@
* Receives a byte of data. This method will block if no input is
* available.
* @param b the byte being received
- * @throws IOException If the pipe is broken
,
+ * @throws IOException If the pipe is {@code broken},
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
* @since 1.1
@@ -288,16 +288,16 @@
/**
* Reads the next byte of data from this piped input stream. The
- * value byte is returned as an int
in the range
- * 0
to 255
.
+ * value byte is returned as an {@code int} in the range
+ * {@code 0} to {@code 255}.
* This method blocks until input data is available, the end of the
* stream is detected, or an exception is thrown.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if the pipe is
* {@link #connect(java.io.PipedOutputStream) unconnected},
- * broken
, closed,
+ * {@code broken}, closed,
* or if an I/O error occurs.
*/
public synchronized int read() throws IOException {
@@ -341,26 +341,26 @@
}
/**
- * Reads up to len
bytes of data from this piped input
- * stream into an array of bytes. Less than len
bytes
+ * Reads up to {@code len} bytes of data from this piped input
+ * stream into an array of bytes. Less than {@code len} bytes
* will be read if the end of the data stream is reached or if
- * len
exceeds the pipe's buffer size.
- * If len
is zero, then no bytes are read and 0 is returned;
+ * {@code len} exceeds the pipe's buffer size.
+ * If {@code len } is zero, then no bytes are read and 0 is returned;
* otherwise, the method blocks until at least 1 byte of input is
* available, end of the stream has been detected, or an exception is
* thrown.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in the destination array b
+ * @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is greater than
- * b.length - off
- * @throws IOException if the pipe is broken
,
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
+ * @throws IOException if the pipe is {@code broken},
* {@link #connect(java.io.PipedOutputStream) unconnected},
* closed, or if an I/O error occurs.
*/
@@ -418,7 +418,7 @@
* without blocking, or {@code 0} if this input stream has been
* closed by invoking its {@link #close()} method, or if the pipe
* is {@link #connect(java.io.PipedOutputStream) unconnected}, or
- * broken
.
+ * {@code broken}.
*
* @throws IOException if an I/O error occurs.
* @since 1.0.2
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/PipedOutputStream.java
--- a/src/java.base/share/classes/java/io/PipedOutputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/PipedOutputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -31,8 +31,8 @@
* A piped output stream can be connected to a piped input stream
* to create a communications pipe. The piped output stream is the
* sending end of the pipe. Typically, data is written to a
- * PipedOutputStream
object by one thread and data is
- * read from the connected PipedInputStream
by some
+ * {@code PipedOutputStream} object by one thread and data is
+ * read from the connected {@code PipedInputStream} by some
* other thread. Attempting to use both objects from a single thread
* is not recommended as it may deadlock the thread.
* The pipe is said to be broken if a
@@ -55,7 +55,7 @@
/**
* Creates a piped output stream connected to the specified piped
* input stream. Data bytes written to this stream will then be
- * available as input from snk
.
+ * available as input from {@code snk}.
*
* @param snk The piped input stream to connect to.
* @throws IOException if an I/O error occurs.
@@ -78,10 +78,10 @@
/**
* Connects this piped output stream to a receiver. If this object
* is already connected to some other piped input stream, an
- * IOException
is thrown.
+ * {@code IOException} is thrown.
*
- * If snk
is an unconnected piped input stream and
- * src
is an unconnected piped output stream, they may
+ * If {@code snk} is an unconnected piped input stream and
+ * {@code src} is an unconnected piped output stream, they may
* be connected by either the call:
*
@@ -106,11 +106,11 @@ } /** - * Writes the specified* src.connect(snk)
byte
to the piped output stream.
+ * Writes the specified {@code byte} to the piped output stream.
*
- * Implements the write
method of OutputStream
.
+ * Implements the {@code write} method of {@code OutputStream}.
*
- * @param b the byte
to be written.
+ * @param b the {@code byte} to be written.
* @throws IOException if the pipe is broken,
* {@link #connect(java.io.PipedInputStream) unconnected},
* closed, or if an I/O error occurs.
@@ -123,8 +123,8 @@
}
/**
- * Writes len
bytes from the specified byte array
- * starting at offset off
to this piped output stream.
+ * Writes {@code len} bytes from the specified byte array
+ * starting at offset {@code off} to this piped output stream.
* This method blocks until all the bytes are written to the output
* stream.
*
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/PipedReader.java
--- a/src/java.base/share/classes/java/io/PipedReader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/PipedReader.java Tue Sep 24 09:43:43 2019 +0100
@@ -59,7 +59,7 @@
* The index of the position in the circular buffer at which the
* next character of data will be stored when received from the connected
* piped writer. in<0
implies the buffer is empty,
- * in==out
implies the buffer is full
+ * {@code in==out} implies the buffer is full
*/
int in = -1;
@@ -70,9 +70,9 @@
int out = 0;
/**
- * Creates a PipedReader
so
+ * Creates a {@code PipedReader} so
* that it is connected to the piped writer
- * src
. Data written to src
+ * {@code src}. Data written to {@code src}
* will then be available as input from this stream.
*
* @param src the stream to connect to.
@@ -83,9 +83,9 @@
}
/**
- * Creates a PipedReader
so that it is connected
- * to the piped writer src
and uses the specified
- * pipe size for the pipe's buffer. Data written to src
+ * Creates a {@code PipedReader} so that it is connected
+ * to the piped writer {@code src} and uses the specified
+ * pipe size for the pipe's buffer. Data written to {@code src}
* will then be available as input from this stream.
* @param src the stream to connect to.
@@ -101,10 +101,10 @@
/**
- * Creates a PipedReader
so
+ * Creates a {@code PipedReader} so
* that it is not yet {@linkplain #connect(java.io.PipedWriter)
* connected}. It must be {@linkplain java.io.PipedWriter#connect(
- * java.io.PipedReader) connected} to a PipedWriter
+ * java.io.PipedReader) connected} to a {@code PipedWriter}
* before being used.
*/
public PipedReader() {
@@ -112,11 +112,11 @@
}
/**
- * Creates a PipedReader
so that it is not yet
+ * Creates a {@code PipedReader} so that it is not yet
* {@link #connect(java.io.PipedWriter) connected} and uses
* the specified pipe size for the pipe's buffer.
* It must be {@linkplain java.io.PipedWriter#connect(
- * java.io.PipedReader) connected} to a PipedWriter
+ * java.io.PipedReader) connected} to a {@code PipedWriter}
* before being used.
*
* @param pipeSize the size of the pipe's buffer.
@@ -136,21 +136,21 @@
/**
* Causes this piped reader to be connected
- * to the piped writer src
.
+ * to the piped writer {@code src}.
* If this object is already connected to some
- * other piped writer, an IOException
+ * other piped writer, an {@code IOException}
* is thrown.
*
- * If src
is an
- * unconnected piped writer and snk
+ * If {@code src} is an
+ * unconnected piped writer and {@code snk}
* is an unconnected piped reader, they
* may be connected by either the call:
*
- *
snk.connect(src)
+ * {@code snk.connect(src)}*
* or the call: * - *
src.connect(snk)
+ * {@code src.connect(snk)}*
* The two calls have the same effect.
*
@@ -219,14 +219,14 @@
/**
* Reads the next character of data from this piped stream.
* If no character is available because the end of the stream
- * has been reached, the value -1
is returned.
+ * has been reached, the value {@code -1} is returned.
* This method blocks until input data is available, the end of
* the stream is detected, or an exception is thrown.
*
- * @return the next character of data, or -1
if the end of the
+ * @return the next character of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if the pipe is
- * broken
,
+ * {@code broken},
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
*/
@@ -270,20 +270,20 @@
}
/**
- * Reads up to len
characters of data from this piped
- * stream into an array of characters. Less than len
characters
+ * Reads up to {@code len} characters of data from this piped
+ * stream into an array of characters. Less than {@code len} characters
* will be read if the end of the data stream is reached or if
- * len
exceeds the pipe's buffer size. This method
+ * {@code len} exceeds the pipe's buffer size. This method
* blocks until at least one character of input is available.
*
* @param cbuf the buffer into which the data is read.
* @param off the start offset of the data.
* @param len the maximum number of characters read.
* @return the total number of characters read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
* @throws IOException if the pipe is
- * broken
,
+ * {@code broken},
* {@link #connect(java.io.PipedWriter) unconnected}, closed,
* or an I/O error occurs.
* @throws IndexOutOfBoundsException {@inheritDoc}
@@ -331,7 +331,7 @@
* stream is ready if the circular buffer is not empty.
*
* @throws IOException if the pipe is
- * broken
,
+ * {@code broken},
* {@link #connect(java.io.PipedWriter) unconnected}, or closed.
*/
public synchronized boolean ready() throws IOException {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/PipedWriter.java
--- a/src/java.base/share/classes/java/io/PipedWriter.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/PipedWriter.java Tue Sep 24 09:43:43 2019 +0100
@@ -50,7 +50,7 @@
/**
* Creates a piped writer connected to the specified piped
* reader. Data characters written to this stream will then be
- * available as input from snk
.
+ * available as input from {@code snk}.
*
* @param snk The piped reader to connect to.
* @throws IOException if an I/O error occurs.
@@ -73,10 +73,10 @@
/**
* Connects this piped writer to a receiver. If this object
* is already connected to some other piped reader, an
- * IOException
is thrown.
+ * {@code IOException} is thrown.
*
- * If snk
is an unconnected piped reader and
- * src
is an unconnected piped writer, they may
+ * If {@code snk} is an unconnected piped reader and
+ * {@code src} is an unconnected piped writer, they may
* be connected by either the call:
*
@@ -104,16 +104,16 @@ } /** - * Writes the specified* src.connect(snk)
char
to the piped output stream.
+ * Writes the specified {@code char} to the piped output stream.
* If a thread was reading data characters from the connected piped input
* stream, but the thread is no longer alive, then an
- * IOException
is thrown.
+ * {@code IOException} is thrown.
*
- * Implements the write
method of Writer
.
+ * Implements the {@code write} method of {@code Writer}.
*
- * @param c the char
to be written.
+ * @param c the {@code char} to be written.
* @throw IOException if the pipe is
- * broken
,
+ * {@code broken},
* {@link #connect(java.io.PipedReader) unconnected}, closed
* or an I/O error occurs.
*/
@@ -143,7 +143,7 @@
* of the given array
*
* @throws IOException if the pipe is
- * broken
,
+ * {@code broken},
* {@link #connect(java.io.PipedReader) unconnected}, closed
* or an I/O error occurs.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/PushbackInputStream.java
--- a/src/java.base/share/classes/java/io/PushbackInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/PushbackInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -26,7 +26,7 @@
package java.io;
/**
- * A PushbackInputStream
adds
+ * A {@code PushbackInputStream} adds
* functionality to another input stream, namely
* the ability to "push back" or "unread" bytes,
* by storing pushed-back bytes in an internal buffer.
@@ -59,8 +59,8 @@
/**
* The position within the pushback buffer from which the next byte will
- * be read. When the buffer is empty, pos
is equal to
- * buf.length
; when the buffer is full, pos
is
+ * be read. When the buffer is empty, {@code pos} is equal to
+ * {@code buf.length}; when the buffer is full, {@code pos} is
* equal to zero.
*
* @since 1.1
@@ -76,10 +76,10 @@
}
/**
- * Creates a PushbackInputStream
- * with a pushback buffer of the specified size
,
+ * Creates a {@code PushbackInputStream}
+ * with a pushback buffer of the specified {@code size},
* and saves its argument, the input stream
- * in
, for later use. Initially,
+ * {@code in}, for later use. Initially,
* the pushback buffer is empty.
*
* @param in the input stream from which bytes will be read.
@@ -97,9 +97,9 @@
}
/**
- * Creates a PushbackInputStream
+ * Creates a {@code PushbackInputStream}
* with a 1-byte pushback buffer, and saves its argument, the input stream
- * in
, for later use. Initially,
+ * {@code in}, for later use. Initially,
* the pushback buffer is empty.
*
* @param in the input stream from which bytes will be read.
@@ -110,18 +110,18 @@
/**
* Reads the next byte of data from this input stream. The value
- * byte is returned as an int
in the range
- * 0
to 255
. If no byte is available
+ * byte is returned as an {@code int} in the range
+ * {@code 0} to {@code 255}. If no byte is available
* because the end of the stream has been reached, the value
- * -1
is returned. This method blocks until input data
+ * {@code -1} is returned. This method blocks until input data
* is available, the end of the stream is detected, or an exception
* is thrown.
*
*
This method returns the most recently pushed-back byte, if there is
- * one, and otherwise calls the read
method of its underlying
+ * one, and otherwise calls the {@code read} method of its underlying
* input stream and returns whatever value that method returns.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* stream has been reached.
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
@@ -137,23 +137,23 @@
}
/**
- * Reads up to len
bytes of data from this input stream into
+ * Reads up to {@code len} bytes of data from this input stream into
* an array of bytes. This method first reads any pushed-back bytes; after
- * that, if fewer than len
bytes have been read then it
- * reads from the underlying input stream. If len
is not zero, the method
+ * that, if fewer than {@code len} bytes have been read then it
+ * reads from the underlying input stream. If {@code len} is not zero, the method
* blocks until at least 1 byte of input is available; otherwise, no
- * bytes are read and 0
is returned.
+ * bytes are read and {@code 0} is returned.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in the destination array b
+ * @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read.
* @return the total number of bytes read into the buffer, or
- * -1
if there is no more data because the end of
+ * {@code -1} if there is no more data because the end of
* the stream has been reached.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is greater than
- * b.length - off
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is greater than
+ * {@code b.length - off}
* @throws IOException if this input stream has been closed by
* invoking its {@link #close()} method,
* or an I/O error occurs.
@@ -192,9 +192,9 @@
/**
* Pushes back a byte by copying it to the front of the pushback buffer.
* After this method returns, the next byte to be read will have the value
- * (byte)b
.
+ * {@code (byte)b}.
*
- * @param b the int
value whose low-order
+ * @param b the {@code int} value whose low-order
* byte is to be pushed back.
* @throws IOException If there is not enough room in the pushback
* buffer for the byte, or this input stream has been closed by
@@ -211,13 +211,13 @@
/**
* Pushes back a portion of an array of bytes by copying it to the front
* of the pushback buffer. After this method returns, the next byte to be
- * read will have the value b[off]
, the byte after that will
- * have the value b[off+1]
, and so forth.
+ * read will have the value {@code b[off]}, the byte after that will
+ * have the value {@code b[off+1]}, and so forth.
*
* @param b the byte array to push back.
* @param off the start offset of the data.
* @param len the number of bytes to push back.
- * @throws NullPointerException If b
is null
.
+ * @throws NullPointerException If {@code b} is {@code null}.
* @throws IOException If there is not enough room in the pushback
* buffer for the specified number of bytes,
* or this input stream has been closed by
@@ -236,11 +236,11 @@
/**
* Pushes back an array of bytes by copying it to the front of the
* pushback buffer. After this method returns, the next byte to be read
- * will have the value b[0]
, the byte after that will have the
- * value b[1]
, and so forth.
+ * will have the value {@code b[0]}, the byte after that will have the
+ * value {@code b[1]}, and so forth.
*
* @param b the byte array to push back
- * @throws NullPointerException If b
is null
.
+ * @throws NullPointerException If {@code b} is {@code null}.
* @throws IOException If there is not enough room in the pushback
* buffer for the specified number of bytes,
* or this input stream has been closed by
@@ -280,14 +280,14 @@
}
/**
- * Skips over and discards n
bytes of data from this
- * input stream. The skip
method may, for a variety of
+ * Skips over and discards {@code n} bytes of data from this
+ * input stream. The {@code skip} method may, for a variety of
* reasons, end up skipping over some smaller number of bytes,
- * possibly zero. If n
is negative, no bytes are skipped.
+ * possibly zero. If {@code n} is negative, no bytes are skipped.
*
- *
The skip
method of PushbackInputStream
+ *
The {@code skip} method of {@code PushbackInputStream}
* first skips over the bytes in the pushback buffer, if any. It then
- * calls the skip
method of the underlying input stream if
+ * calls the {@code skip} method of the underlying input stream if
* more bytes need to be skipped. The actual number of bytes skipped
* is returned.
*
@@ -322,11 +322,11 @@
}
/**
- * Tests if this input stream supports the mark
and
- * reset
methods, which it does not.
+ * Tests if this input stream supports the {@code mark} and
+ * {@code reset} methods, which it does not.
*
- * @return false
, since this class does not support the
- * mark
and reset
methods.
+ * @return {@code false}, since this class does not support the
+ * {@code mark} and {@code reset} methods.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/
@@ -337,7 +337,7 @@
/**
* Marks the current position in this input stream.
*
- *
The mark
method of PushbackInputStream
+ *
The {@code mark} method of {@code PushbackInputStream}
* does nothing.
*
* @param readlimit the maximum limit of bytes that can be read before
@@ -349,11 +349,11 @@
/**
* Repositions this stream to the position at the time the
- * mark
method was last called on this input stream.
+ * {@code mark} method was last called on this input stream.
*
- *
The method reset
for class
- * PushbackInputStream
does nothing except throw an
- * IOException
.
+ *
The method {@code reset} for class
+ * {@code PushbackInputStream} does nothing except throw an
+ * {@code IOException}.
*
* @throws IOException if this method is invoked.
* @see java.io.InputStream#mark(int)
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/PushbackReader.java
--- a/src/java.base/share/classes/java/io/PushbackReader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/PushbackReader.java Tue Sep 24 09:43:43 2019 +0100
@@ -142,7 +142,7 @@
/**
* Pushes back a single character by copying it to the front of the
* pushback buffer. After this method returns, the next character to be read
- * will have the value (char)c
.
+ * will have the value {@code (char)c}.
*
* @param c The int value representing a character to be pushed back
*
@@ -161,8 +161,8 @@
/**
* Pushes back a portion of an array of characters by copying it to the
* front of the pushback buffer. After this method returns, the next
- * character to be read will have the value cbuf[off]
, the
- * character after that will have the value cbuf[off+1]
, and
+ * character to be read will have the value {@code cbuf[off]}, the
+ * character after that will have the value {@code cbuf[off+1]}, and
* so forth.
*
* @param cbuf Character array
@@ -185,8 +185,8 @@
/**
* Pushes back an array of characters by copying it to the front of the
* pushback buffer. After this method returns, the next character to be
- * read will have the value cbuf[0]
, the character after that
- * will have the value cbuf[1]
, and so forth.
+ * read will have the value {@code cbuf[0]}, the character after that
+ * will have the value {@code cbuf[1]}, and so forth.
*
* @param cbuf Character array to push back
*
@@ -210,8 +210,8 @@
}
/**
- * Marks the present position in the stream. The mark
- * for class PushbackReader
always throws an exception.
+ * Marks the present position in the stream. The {@code mark}
+ * for class {@code PushbackReader} always throws an exception.
*
* @throws IOException Always, since mark is not supported
*/
@@ -220,8 +220,8 @@
}
/**
- * Resets the stream. The reset
method of
- * PushbackReader
always throws an exception.
+ * Resets the stream. The {@code reset} method of
+ * {@code PushbackReader} always throws an exception.
*
* @throws IOException Always, since reset is not supported
*/
@@ -261,7 +261,7 @@
*
* @return The number of characters actually skipped
*
- * @throws IllegalArgumentException If n
is negative.
+ * @throws IllegalArgumentException If {@code n} is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/Reader.java
--- a/src/java.base/share/classes/java/io/Reader.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/Reader.java Tue Sep 24 09:43:43 2019 +0100
@@ -262,7 +262,7 @@
*
* @return The number of characters actually skipped
*
- * @throws IllegalArgumentException If n
is negative.
+ * @throws IllegalArgumentException If {@code n} is negative.
* @throws IOException If an I/O error occurs
*/
public long skip(long n) throws IOException {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/SequenceInputStream.java
--- a/src/java.base/share/classes/java/io/SequenceInputStream.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/SequenceInputStream.java Tue Sep 24 09:43:43 2019 +0100
@@ -30,7 +30,7 @@
import java.util.Vector;
/**
- * A SequenceInputStream
represents
+ * A {@code SequenceInputStream} represents
* the logical concatenation of other input
* streams. It starts out with an ordered
* collection of input streams and reads from
@@ -48,17 +48,17 @@
InputStream in;
/**
- * Initializes a newly created SequenceInputStream
+ * Initializes a newly created {@code SequenceInputStream}
* by remembering the argument, which must
- * be an Enumeration
that produces
- * objects whose run-time type is InputStream
.
+ * be an {@code Enumeration} that produces
+ * objects whose run-time type is {@code InputStream}.
* The input streams that are produced by
* the enumeration will be read, in order,
* to provide the bytes to be read from this
- * SequenceInputStream
. After
+ * {@code SequenceInputStream}. After
* each input stream from the enumeration
* is exhausted, it is closed by calling its
- * close
method.
+ * {@code close} method.
*
* @param e an enumeration of input streams.
* @see java.util.Enumeration
@@ -70,11 +70,11 @@
/**
* Initializes a newly
- * created SequenceInputStream
+ * created {@code SequenceInputStream}
* by remembering the two arguments, which
- * will be read in order, first s1
- * and then s2
, to provide the
- * bytes to be read from this SequenceInputStream
.
+ * will be read in order, first {@code s1}
+ * and then {@code s2}, to provide the
+ * bytes to be read from this {@code SequenceInputStream}.
*
* @param s1 the first input stream to read.
* @param s2 the second input stream to read.
@@ -135,19 +135,19 @@
/**
* Reads the next byte of data from this input stream. The byte is
- * returned as an int
in the range 0
to
- * 255
. If no byte is available because the end of the
- * stream has been reached, the value -1
is returned.
+ * returned as an {@code int} in the range {@code 0} to
+ * {@code 255}. If no byte is available because the end of the
+ * stream has been reached, the value {@code -1} is returned.
* This method blocks until input data is available, the end of the
* stream is detected, or an exception is thrown.
*
* This method
* tries to read one character from the current substream. If it
- * reaches the end of the stream, it calls the close
+ * reaches the end of the stream, it calls the {@code close}
* method of the current substream and begins reading from the next
* substream.
*
- * @return the next byte of data, or -1
if the end of the
+ * @return the next byte of data, or {@code -1} if the end of the
* stream is reached.
* @throws IOException if an I/O error occurs.
*/
@@ -163,26 +163,26 @@
}
/**
- * Reads up to len
bytes of data from this input stream
- * into an array of bytes. If len
is not zero, the method
+ * Reads up to {@code len} bytes of data from this input stream
+ * into an array of bytes. If {@code len} is not zero, the method
* blocks until at least 1 byte of input is available; otherwise, no
- * bytes are read and 0
is returned.
+ * bytes are read and {@code 0} is returned.
*
- * The read
method of SequenceInputStream
+ * The {@code read} method of {@code SequenceInputStream}
* tries to read the data from the current substream. If it fails to
* read any characters because the substream has reached the end of
- * the stream, it calls the close
method of the current
+ * the stream, it calls the {@code close} method of the current
* substream and begins reading from the next substream.
*
* @param b the buffer into which the data is read.
- * @param off the start offset in array b
+ * @param off the start offset in array {@code b}
* at which the data is written.
* @param len the maximum number of bytes read.
* @return int the number of bytes read.
- * @throws NullPointerException If b
is null
.
- * @throws IndexOutOfBoundsException If off
is negative,
- * len
is negative, or len
is
- * greater than b.length - off
+ * @throws NullPointerException If {@code b} is {@code null}.
+ * @throws IndexOutOfBoundsException If {@code off} is negative,
+ * {@code len} is negative, or {@code len} is
+ * greater than {@code b.length - off}
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[], int off, int len) throws IOException {
@@ -208,14 +208,14 @@
/**
* Closes this input stream and releases any system resources
* associated with the stream.
- * A closed SequenceInputStream
+ * A closed {@code SequenceInputStream}
* cannot perform input operations and cannot
* be reopened.
*
* If this stream was created
* from an enumeration, all remaining elements
* are requested from the enumeration and closed
- * before the close
method returns.
+ * before the {@code close} method returns.
*
* @throws IOException if an I/O error occurs.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/Serializable.java
--- a/src/java.base/share/classes/java/io/Serializable.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/io/Serializable.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -142,8 +142,8 @@
* serialVersionUID than that of the corresponding sender's class, then
* deserialization will result in an {@link InvalidClassException}. A
* serializable class can declare its own serialVersionUID explicitly by
- * declaring a field named "serialVersionUID"
that must be static,
- * final, and of type long
:
+ * declaring a field named {@code "serialVersionUID"} that must be static,
+ * final, and of type {@code long}:
*
*
* ANY-ACCESS-MODIFIER static final long serialVersionUID = 42L; @@ -157,11 +157,11 @@ * serialVersionUID values, since the default serialVersionUID computation is * highly sensitive to class details that may vary depending on compiler * implementations, and can thus result in unexpected - *InvalidClassException
s during deserialization. Therefore, to + * {@code InvalidClassException}s during deserialization. Therefore, to * guarantee a consistent serialVersionUID value across different java compiler * implementations, a serializable class must declare an explicit * serialVersionUID value. It is also strongly advised that explicit - * serialVersionUID declarations use theprivate
modifier where + * serialVersionUID declarations use the {@code private} modifier where * possible, since such declarations apply only to the immediately declaring * class--serialVersionUID fields are not useful as inherited members. Array * classes cannot declare an explicit serialVersionUID, so they always have diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/SerializablePermission.java --- a/src/java.base/share/classes/java/io/SerializablePermission.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/io/SerializablePermission.java Tue Sep 24 09:43:43 2019 +0100 @@ -116,8 +116,8 @@ * * @param name the name of the SerializablePermission. * - * @throws NullPointerException ifname
isnull
. - * @throws IllegalArgumentException ifname
is empty. + * @throws NullPointerException if {@code name} is {@code null}. + * @throws IllegalArgumentException if {@code name} is empty. */ public SerializablePermission(String name) { @@ -132,8 +132,8 @@ * @param name the name of the SerializablePermission. * @param actions currently unused and must be set to null * - * @throws NullPointerException ifname
isnull
. - * @throws IllegalArgumentException ifname
is empty. + * @throws NullPointerException if {@code name} is {@code null}. + * @throws IllegalArgumentException if {@code name} is empty. */ public SerializablePermission(String name, String actions) diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/StringBufferInputStream.java --- a/src/java.base/share/classes/java/io/StringBufferInputStream.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/io/StringBufferInputStream.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ * This class allows an application to create an input stream in * which the bytes read are supplied by the contents of a string. * Applications can also read bytes from a byte array by using a - *ByteArrayInputStream
. + * {@code ByteArrayInputStream}. ** Only the low eight bits of each character in the string are used by * this class. @@ -40,7 +40,7 @@ * @since 1.0 * @deprecated This class does not properly convert characters into bytes. As * of JDK 1.1, the preferred way to create a stream from a - * string is via the
StringReader
class. + * string is via the {@code StringReader} class. */ @Deprecated public @@ -76,16 +76,16 @@ /** * Reads the next byte of data from this input stream. The value - * byte is returned as anint
in the range - *0
to255
. If no byte is available + * byte is returned as an {@code int} in the range + * {@code 0} to {@code 255}. If no byte is available * because the end of the stream has been reached, the value - *-1
is returned. + * {@code -1} is returned. *- * The
read
method of - *StringBufferInputStream
cannot block. It returns the + * The {@code read} method of + * {@code StringBufferInputStream} cannot block. It returns the * low eight bits of the next character in this input stream's buffer. * - * @return the next byte of data, or-1
if the end of the + * @return the next byte of data, or {@code -1} if the end of the * stream is reached. */ public synchronized int read() { @@ -93,11 +93,11 @@ } /** - * Reads up tolen
bytes of data from this input stream + * Reads up to {@code len} bytes of data from this input stream * into an array of bytes. *- * The
read
method of - *StringBufferInputStream
cannot block. It copies the + * The {@code read} method of + * {@code StringBufferInputStream} cannot block. It copies the * low eight bits from the characters in this input stream's buffer into * the byte array argument. * @@ -105,7 +105,7 @@ * @param off the start offset of the data. * @param len the maximum number of bytes read. * @return the total number of bytes read into the buffer, or - *-1
if there is no more data because the end of + * {@code -1} if there is no more data because the end of * the stream has been reached. */ @SuppressWarnings("deprecation") @@ -133,7 +133,7 @@ } /** - * Skipsn
bytes of input from this input stream. Fewer + * Skips {@code n} bytes of input from this input stream. Fewer * bytes might be skipped if the end of the input stream is reached. * * @param n the number of bytes to be skipped. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/StringReader.java --- a/src/java.base/share/classes/java/io/StringReader.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/io/StringReader.java Tue Sep 24 09:43:43 2019 +0100 @@ -108,9 +108,9 @@ * Skips the specified number of characters in the stream. Returns * the number of characters that were skipped. * - *The
ns
parameter may be negative, even though the - *skip
method of the {@link Reader} superclass throws - * an exception in this case. Negative values ofns
cause the + *The {@code ns} parameter may be negative, even though the + * {@code skip} method of the {@link Reader} superclass throws + * an exception in this case. Negative values of {@code ns} cause the * stream to skip backwards. Negative return values indicate a skip * backwards. It is not possible to skip backwards past the beginning of * the string. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/io/UTFDataFormatException.java --- a/src/java.base/share/classes/java/io/UTFDataFormatException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/io/UTFDataFormatException.java Tue Sep 24 09:43:43 2019 +0100 @@ -32,7 +32,7 @@ * input stream or by any class that implements the data input * interface. * See the - *
DataInput
+ * {@code DataInput} * class description for the format in * which modified UTF-8 strings are read and written. * @@ -48,19 +48,19 @@ private static final long serialVersionUID = 420743449228280612L; /** - * Constructs aUTFDataFormatException
with - *null
as its error detail message. + * Constructs a {@code UTFDataFormatException} with + * {@code null} as its error detail message. */ public UTFDataFormatException() { super(); } /** - * Constructs aUTFDataFormatException
with the - * specified detail message. The strings
can be + * Constructs a {@code UTFDataFormatException} with the + * specified detail message. The string {@code s} can be * retrieved later by the *{@link java.lang.Throwable#getMessage}
- * method of classjava.lang.Throwable
. + * method of class {@code java.lang.Throwable}. * * @param s the detail message. */ diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/AbstractMethodError.java --- a/src/java.base/share/classes/java/lang/AbstractMethodError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/AbstractMethodError.java Tue Sep 24 09:43:43 2019 +0100 @@ -41,14 +41,14 @@ private static final long serialVersionUID = -1654391082989018462L; /** - * Constructs anAbstractMethodError
with no detail message. + * Constructs an {@code AbstractMethodError} with no detail message. */ public AbstractMethodError() { super(); } /** - * Constructs anAbstractMethodError
with the specified + * Constructs an {@code AbstractMethodError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ArrayStoreException.java --- a/src/java.base/share/classes/java/lang/ArrayStoreException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ArrayStoreException.java Tue Sep 24 09:43:43 2019 +0100 @@ -28,7 +28,7 @@ /** * Thrown to indicate that an attempt has been made to store the * wrong type of object into an array of objects. For example, the - * following code generates anArrayStoreException
: + * following code generates an {@code ArrayStoreException}: ** Object x[] = new String[3]; * x[0] = new Integer(0); @@ -43,14 +43,14 @@ private static final long serialVersionUID = -4522193890499838241L; /** - * Constructs anArrayStoreException
with no detail message. + * Constructs an {@code ArrayStoreException} with no detail message. */ public ArrayStoreException() { super(); } /** - * Constructs anArrayStoreException
with the specified + * Constructs an {@code ArrayStoreException} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/AssertionError.java --- a/src/java.base/share/classes/java/lang/AssertionError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/AssertionError.java Tue Sep 24 09:43:43 2019 +0100 @@ -79,7 +79,7 @@ /** * Constructs an AssertionError with its detail message derived - * from the specifiedboolean
, which is converted to + * from the specified {@code boolean}, which is converted to * a string as defined in section 15.18.1.1 of * The Java™ Language Specification. * @@ -91,7 +91,7 @@ /** * Constructs an AssertionError with its detail message derived - * from the specifiedchar
, which is converted to a + * from the specified {@code char}, which is converted to a * string as defined in section 15.18.1.1 of * The Java™ Language Specification. * @@ -103,7 +103,7 @@ /** * Constructs an AssertionError with its detail message derived - * from the specifiedint
, which is converted to a + * from the specified {@code int}, which is converted to a * string as defined in section 15.18.1.1 of * The Java™ Language Specification. * @@ -115,7 +115,7 @@ /** * Constructs an AssertionError with its detail message derived - * from the specifiedlong
, which is converted to a + * from the specified {@code long}, which is converted to a * string as defined in section 15.18.1.1 of * The Java™ Language Specification. * @@ -127,7 +127,7 @@ /** * Constructs an AssertionError with its detail message derived - * from the specifiedfloat
, which is converted to a + * from the specified {@code float}, which is converted to a * string as defined in section 15.18.1.1 of * The Java™ Language Specification. * @@ -139,7 +139,7 @@ /** * Constructs an AssertionError with its detail message derived - * from the specifieddouble
, which is converted to a + * from the specified {@code double}, which is converted to a * string as defined in section 15.18.1.1 of * The Java™ Language Specification. * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ClassCastException.java --- a/src/java.base/share/classes/java/lang/ClassCastException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ClassCastException.java Tue Sep 24 09:43:43 2019 +0100 @@ -28,7 +28,7 @@ /** * Thrown to indicate that the code has attempted to cast an object * to a subclass of which it is not an instance. For example, the - * following code generates aClassCastException
: + * following code generates a {@code ClassCastException}: ** Object x = new Integer(0); * System.out.println((String)x); @@ -43,14 +43,14 @@ private static final long serialVersionUID = -9223365651070458532L; /** - * Constructs aClassCastException
with no detail message. + * Constructs a {@code ClassCastException} with no detail message. */ public ClassCastException() { super(); } /** - * Constructs aClassCastException
with the specified + * Constructs a {@code ClassCastException} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ClassFormatError.java --- a/src/java.base/share/classes/java/lang/ClassFormatError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ClassFormatError.java Tue Sep 24 09:43:43 2019 +0100 @@ -39,14 +39,14 @@ private static final long serialVersionUID = -8420114879011949195L; /** - * Constructs aClassFormatError
with no detail message. + * Constructs a {@code ClassFormatError} with no detail message. */ public ClassFormatError() { super(); } /** - * Constructs aClassFormatError
with the specified + * Constructs a {@code ClassFormatError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ClassNotFoundException.java --- a/src/java.base/share/classes/java/lang/ClassNotFoundException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ClassNotFoundException.java Tue Sep 24 09:43:43 2019 +0100 @@ -34,10 +34,10 @@ * Thrown when an application tries to load in a class through its * string name using: *- *
*- The
forName
method in classClass
. - *- The
findSystemClass
method in class - *ClassLoader
. - *- The
loadClass
method in classClassLoader
. + *- The {@code forName} method in class {@code Class}. + *
- The {@code findSystemClass} method in class + * {@code ClassLoader} . + *
- The {@code loadClass} method in class {@code ClassLoader}. *
* but no definition for the class with the specified name could be found. @@ -63,14 +63,14 @@ private static final long serialVersionUID = 9176873029745254542L; /** - * Constructs a
ClassNotFoundException
with no detail message. + * Constructs a {@code ClassNotFoundException} with no detail message. */ public ClassNotFoundException() { super((Throwable)null); // Disallow initCause } /** - * Constructs aClassNotFoundException
with the + * Constructs a {@code ClassNotFoundException} with the * specified detail message. * * @param s the detail message. @@ -80,7 +80,7 @@ } /** - * Constructs aClassNotFoundException
with the + * Constructs a {@code ClassNotFoundException} with the * specified detail message and optional exception that was * raised while loading the class. * @@ -100,7 +100,7 @@ * The {@link Throwable#getCause()} method is now the preferred means of * obtaining this information. * - * @return theException
that was raised while loading a class + * @return the {@code Exception} that was raised while loading a class * @since 1.2 */ public Throwable getException() { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/CloneNotSupportedException.java --- a/src/java.base/share/classes/java/lang/CloneNotSupportedException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/CloneNotSupportedException.java Tue Sep 24 09:43:43 2019 +0100 @@ -26,12 +26,12 @@ package java.lang; /** - * Thrown to indicate that theclone
method in class - *Object
has been called to clone an object, but that - * the object's class does not implement theCloneable
+ * Thrown to indicate that the {@code clone} method in class + * {@code Object} has been called to clone an object, but that + * the object's class does not implement the {@code Cloneable} * interface. *- * Applications that override the
clone
method can also + * Applications that override the {@code clone} method can also * throw this exception to indicate that an object could not or * should not be cloned. * @@ -47,7 +47,7 @@ private static final long serialVersionUID = 5195511250079656443L; /** - * Constructs aCloneNotSupportedException
with no + * Constructs a {@code CloneNotSupportedException} with no * detail message. */ public CloneNotSupportedException() { @@ -55,7 +55,7 @@ } /** - * Constructs aCloneNotSupportedException
with the + * Constructs a {@code CloneNotSupportedException} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/Cloneable.java --- a/src/java.base/share/classes/java/lang/Cloneable.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/Cloneable.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,14 +26,14 @@ package java.lang; /** - * A class implements theCloneable
interface to + * A class implements the {@code Cloneable} interface to * indicate to the {@link java.lang.Object#clone()} method that it * is legal for that method to make a * field-for-field copy of instances of that class. ** Invoking Object's clone method on an instance that does not implement the - *
Cloneable
interface results in the exception - *CloneNotSupportedException
being thrown. + * {@code Cloneable} interface results in the exception + * {@code CloneNotSupportedException} being thrown. ** By convention, classes that implement this interface should override * {@code Object.clone} (which is protected) with a public method. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java --- a/src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ConditionalSpecialCasing.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,15 +34,15 @@ /** - * This is a utility class for
String.toLowerCase()
and - *String.toUpperCase()
, that handles special casing with + * This is a utility class for {@code String.toLowerCase()} and + * {@code String.toUpperCase()}, that handles special casing with * conditions. In other words, it handles the mappings with conditions * that are defined in * Special * Casing Properties file. ** Note that the unconditional case mappings (including 1:M mappings) - * are handled in
Character.toLower/UpperCase()
. + * are handled in {@code Character.toLower/UpperCase()}. */ final class ConditionalSpecialCasing { @@ -329,7 +329,7 @@ /** * Implements the "Before_Dot" condition * - * Specification: C is followed byU+0307 COMBINING DOT ABOVE
. + * Specification: C is followed by {@code U+0307 COMBINING DOT ABOVE}. * Any sequence of characters with a combining class that is * neither 0 nor 230 may intervene between the current character * and the combining dot above. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ExceptionInInitializerError.java --- a/src/java.base/share/classes/java/lang/ExceptionInInitializerError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ExceptionInInitializerError.java Tue Sep 24 09:43:43 2019 +0100 @@ -32,7 +32,7 @@ /** * Signals that an unexpected exception has occurred in a static initializer. - * AnExceptionInInitializerError
is thrown to indicate that an + * An {@code ExceptionInInitializerError} is thrown to indicate that an * exception occurred during evaluation of a static initializer or the * initializer for a static variable. * @@ -54,8 +54,8 @@ private static final long serialVersionUID = 1521711792217232256L; /** - * Constructs anExceptionInInitializerError
with - *null
as its detail message string and with no saved + * Constructs an {@code ExceptionInInitializerError} with + * {@code null} as its detail message string and with no saved * throwable object. * A detail message is a String that describes this particular exception. */ @@ -64,10 +64,10 @@ } /** - * Constructs a newExceptionInInitializerError
class by - * saving a reference to theThrowable
object thrown for + * Constructs a new {@code ExceptionInInitializerError} class by + * saving a reference to the {@code Throwable} object thrown for * later retrieval by the {@link #getException()} method. The detail - * message string is set tonull
. + * message string is set to {@code null}. * * @param thrown The exception thrown */ @@ -97,8 +97,8 @@ * obtaining this information. * * @return the saved throwable object of this - *ExceptionInInitializerError
, ornull
- * if thisExceptionInInitializerError
has no saved + * {@code ExceptionInInitializerError}, or {@code null} + * if this {@code ExceptionInInitializerError} has no saved * throwable object. */ public Throwable getException() { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IllegalAccessError.java --- a/src/java.base/share/classes/java/lang/IllegalAccessError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IllegalAccessError.java Tue Sep 24 09:43:43 2019 +0100 @@ -41,14 +41,14 @@ private static final long serialVersionUID = -8988904074992417891L; /** - * Constructs anIllegalAccessError
with no detail message. + * Constructs an {@code IllegalAccessError} with no detail message. */ public IllegalAccessError() { super(); } /** - * Constructs anIllegalAccessError
with the specified + * Constructs an {@code IllegalAccessError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IllegalAccessException.java --- a/src/java.base/share/classes/java/lang/IllegalAccessException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IllegalAccessException.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,7 +60,7 @@ private static final long serialVersionUID = 6616958222490762034L; /** - * Constructs anIllegalAccessException
without a + * Constructs an {@code IllegalAccessException} without a * detail message. */ public IllegalAccessException() { @@ -68,7 +68,7 @@ } /** - * Constructs anIllegalAccessException
with a detail message. + * Constructs an {@code IllegalAccessException} with a detail message. * * @param s the detail message. */ diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IllegalArgumentException.java --- a/src/java.base/share/classes/java/lang/IllegalArgumentException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IllegalArgumentException.java Tue Sep 24 09:43:43 2019 +0100 @@ -35,7 +35,7 @@ public class IllegalArgumentException extends RuntimeException { /** - * Constructs anIllegalArgumentException
with no + * Constructs an {@code IllegalArgumentException} with no * detail message. */ public IllegalArgumentException() { @@ -43,7 +43,7 @@ } /** - * Constructs anIllegalArgumentException
with the + * Constructs an {@code IllegalArgumentException} with the * specified detail message. * * @param s the detail message. @@ -56,7 +56,7 @@ * Constructs a new exception with the specified detail message and * cause. * - *Note that the detail message associated with
cause
is + *Note that the detail message associated with {@code cause} is * not automatically incorporated in this exception's detail * message. * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IllegalMonitorStateException.java --- a/src/java.base/share/classes/java/lang/IllegalMonitorStateException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IllegalMonitorStateException.java Tue Sep 24 09:43:43 2019 +0100 @@ -44,7 +44,7 @@ private static final long serialVersionUID = 3713306369498869069L; /** - * Constructs an
IllegalMonitorStateException
with no + * Constructs an {@code IllegalMonitorStateException} with no * detail message. */ public IllegalMonitorStateException() { @@ -52,7 +52,7 @@ } /** - * Constructs anIllegalMonitorStateException
with the + * Constructs an {@code IllegalMonitorStateException} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IllegalStateException.java --- a/src/java.base/share/classes/java/lang/IllegalStateException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IllegalStateException.java Tue Sep 24 09:43:43 2019 +0100 @@ -59,7 +59,7 @@ * Constructs a new exception with the specified detail message and * cause. * - *Note that the detail message associated with
cause
is + *Note that the detail message associated with {@code cause} is * not automatically incorporated in this exception's detail * message. * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IllegalThreadStateException.java --- a/src/java.base/share/classes/java/lang/IllegalThreadStateException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IllegalThreadStateException.java Tue Sep 24 09:43:43 2019 +0100 @@ -28,8 +28,8 @@ /** * Thrown to indicate that a thread is not in an appropriate state * for the requested operation. See, for example, the - *
suspend
andresume
methods in class - *Thread
. + * {@code suspend} and {@code resume} methods in class + * {@code Thread}. * * @author unascribed * @see java.lang.Thread#resume() @@ -41,7 +41,7 @@ private static final long serialVersionUID = -7626246362397460174L; /** - * Constructs anIllegalThreadStateException
with no + * Constructs an {@code IllegalThreadStateException} with no * detail message. */ public IllegalThreadStateException() { @@ -49,7 +49,7 @@ } /** - * Constructs anIllegalThreadStateException
with the + * Constructs an {@code IllegalThreadStateException} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/IncompatibleClassChangeError.java --- a/src/java.base/share/classes/java/lang/IncompatibleClassChangeError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/IncompatibleClassChangeError.java Tue Sep 24 09:43:43 2019 +0100 @@ -39,7 +39,7 @@ private static final long serialVersionUID = -4914975503642802119L; /** - * Constructs anIncompatibleClassChangeError
with no + * Constructs an {@code IncompatibleClassChangeError} with no * detail message. */ public IncompatibleClassChangeError () { @@ -47,7 +47,7 @@ } /** - * Constructs anIncompatibleClassChangeError
with the + * Constructs an {@code IncompatibleClassChangeError} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/InstantiationError.java --- a/src/java.base/share/classes/java/lang/InstantiationError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/InstantiationError.java Tue Sep 24 09:43:43 2019 +0100 @@ -26,7 +26,7 @@ package java.lang; /** - * Thrown when an application tries to use the Javanew
+ * Thrown when an application tries to use the Java {@code new} * construct to instantiate an abstract class or an interface. ** Normally, this error is caught by the compiler; this error can @@ -44,14 +44,14 @@ private static final long serialVersionUID = -4885810657349421204L; /** - * Constructs an
InstantiationError
with no detail message. + * Constructs an {@code InstantiationError} with no detail message. */ public InstantiationError() { super(); } /** - * Constructs anInstantiationError
with the specified + * Constructs an {@code InstantiationError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/InternalError.java --- a/src/java.base/share/classes/java/lang/InternalError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/InternalError.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,14 +36,14 @@ private static final long serialVersionUID = -9062593416125562365L; /** - * Constructs anInternalError
with no detail message. + * Constructs an {@code InternalError} with no detail message. */ public InternalError() { super(); } /** - * Constructs anInternalError
with the specified + * Constructs an {@code InternalError} with the specified * detail message. * * @param message the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/InterruptedException.java --- a/src/java.base/share/classes/java/lang/InterruptedException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/InterruptedException.java Tue Sep 24 09:43:43 2019 +0100 @@ -52,14 +52,14 @@ private static final long serialVersionUID = 6700697376100628473L; /** - * Constructs anInterruptedException
with no detail message. + * Constructs an {@code InterruptedException} with no detail message. */ public InterruptedException() { super(); } /** - * Constructs anInterruptedException
with the + * Constructs an {@code InterruptedException} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/NegativeArraySizeException.java --- a/src/java.base/share/classes/java/lang/NegativeArraySizeException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/NegativeArraySizeException.java Tue Sep 24 09:43:43 2019 +0100 @@ -37,7 +37,7 @@ private static final long serialVersionUID = -8960118058596991861L; /** - * Constructs aNegativeArraySizeException
with no + * Constructs a {@code NegativeArraySizeException} with no * detail message. */ public NegativeArraySizeException() { @@ -45,7 +45,7 @@ } /** - * Constructs aNegativeArraySizeException
with the + * Constructs a {@code NegativeArraySizeException} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/NoClassDefFoundError.java --- a/src/java.base/share/classes/java/lang/NoClassDefFoundError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/NoClassDefFoundError.java Tue Sep 24 09:43:43 2019 +0100 @@ -26,9 +26,9 @@ package java.lang; /** - * Thrown if the Java Virtual Machine or aClassLoader
instance + * Thrown if the Java Virtual Machine or a {@code ClassLoader} instance * tries to load in the definition of a class (as part of a normal method call - * or as part of creating a new instance using thenew
expression) + * or as part of creating a new instance using the {@code new} expression) * and no definition of the class could be found. ** The searched-for class definition existed when the currently @@ -44,14 +44,14 @@ private static final long serialVersionUID = 9095859863287012458L; /** - * Constructs a
NoClassDefFoundError
with no detail message. + * Constructs a {@code NoClassDefFoundError} with no detail message. */ public NoClassDefFoundError() { super(); } /** - * Constructs aNoClassDefFoundError
with the specified + * Constructs a {@code NoClassDefFoundError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/NoSuchFieldError.java --- a/src/java.base/share/classes/java/lang/NoSuchFieldError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/NoSuchFieldError.java Tue Sep 24 09:43:43 2019 +0100 @@ -42,14 +42,14 @@ private static final long serialVersionUID = -3456430195886129035L; /** - * Constructs aNoSuchFieldError
with no detail message. + * Constructs a {@code NoSuchFieldError} with no detail message. */ public NoSuchFieldError() { super(); } /** - * Constructs aNoSuchFieldError
with the specified + * Constructs a {@code NoSuchFieldError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/NoSuchMethodError.java --- a/src/java.base/share/classes/java/lang/NoSuchMethodError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/NoSuchMethodError.java Tue Sep 24 09:43:43 2019 +0100 @@ -43,14 +43,14 @@ private static final long serialVersionUID = -3765521442372831335L; /** - * Constructs aNoSuchMethodError
with no detail message. + * Constructs a {@code NoSuchMethodError} with no detail message. */ public NoSuchMethodError() { super(); } /** - * Constructs aNoSuchMethodError
with the + * Constructs a {@code NoSuchMethodError} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/NoSuchMethodException.java --- a/src/java.base/share/classes/java/lang/NoSuchMethodException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/NoSuchMethodException.java Tue Sep 24 09:43:43 2019 +0100 @@ -37,14 +37,14 @@ private static final long serialVersionUID = 5034388446362600923L; /** - * Constructs aNoSuchMethodException
without a detail message. + * Constructs a {@code NoSuchMethodException} without a detail message. */ public NoSuchMethodException() { super(); } /** - * Constructs aNoSuchMethodException
with a detail message. + * Constructs a {@code NoSuchMethodException} with a detail message. * * @param s the detail message. */ diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/NumberFormatException.java --- a/src/java.base/share/classes/java/lang/NumberFormatException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/NumberFormatException.java Tue Sep 24 09:43:43 2019 +0100 @@ -40,14 +40,14 @@ static final long serialVersionUID = -2848938806368998894L; /** - * Constructs aNumberFormatException
with no detail message. + * Constructs a {@code NumberFormatException} with no detail message. */ public NumberFormatException () { super(); } /** - * Constructs aNumberFormatException
with the + * Constructs a {@code NumberFormatException} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/Runnable.java --- a/src/java.base/share/classes/java/lang/Runnable.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/Runnable.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,23 +26,23 @@ package java.lang; /** - * TheRunnable
interface should be implemented by any + * The {@code Runnable} interface should be implemented by any * class whose instances are intended to be executed by a thread. The - * class must define a method of no arguments calledrun
. + * class must define a method of no arguments called {@code run}. ** This interface is designed to provide a common protocol for objects that * wish to execute code while they are active. For example, - *
Runnable
is implemented by classThread
. + * {@code Runnable} is implemented by class {@code Thread}. * Being active simply means that a thread has been started and has not * yet been stopped. *- * In addition,
Runnable
provides the means for a class to be - * active while not subclassingThread
. A class that implements - *Runnable
can run without subclassingThread
- * by instantiating aThread
instance and passing itself in - * as the target. In most cases, theRunnable
interface should - * be used if you are only planning to override therun()
- * method and no otherThread
methods. + * In addition, {@code Runnable} provides the means for a class to be + * active while not subclassing {@code Thread}. A class that implements + * {@code Runnable} can run without subclassing {@code Thread} + * by instantiating a {@code Thread} instance and passing itself in + * as the target. In most cases, the {@code Runnable} interface should + * be used if you are only planning to override the {@code run()} + * method and no other {@code Thread} methods. * This is important because classes should not be subclassed * unless the programmer intends on modifying or enhancing the fundamental * behavior of the class. @@ -55,12 +55,12 @@ @FunctionalInterface public interface Runnable { /** - * When an object implementing interfaceRunnable
is used + * When an object implementing interface {@code Runnable} is used * to create a thread, starting the thread causes the object's - *run
method to be called in that separately executing + * {@code run} method to be called in that separately executing * thread. *- * The general contract of the method
run
is that it may + * The general contract of the method {@code run} is that it may * take any action whatsoever. * * @see java.lang.Thread#run() diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/RuntimePermission.java --- a/src/java.base/share/classes/java/lang/RuntimePermission.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/RuntimePermission.java Tue Sep 24 09:43:43 2019 +0100 @@ -180,7 +180,7 @@ * ** stopThread - *Stopping of threads via calls to the Thread stop
+ *Stopping of threads via calls to the Thread {@code stop} * method *This allows code to stop any thread in the system provided that it is * already granted permission to access that thread. @@ -191,9 +191,9 @@ * * @@ -246,8 +246,8 @@ *modifyThreadGroup *modification of thread groups, e.g., via calls to ThreadGroup - * + * {@code destroy}, {@code getParent}, {@code resume}, + * {@code setDaemon}, {@code setMaxPriority}, {@code stop}, + * and {@code suspend} methods *destroy
,getParent
,resume
, - *setDaemon
,setMaxPriority
,stop
, - * andsuspend
methodsThis allows an attacker to create thread groups and * set their run priority. ** accessClassInPackage.{package name} *Access to the specified package via a class loader's - * + * {@code loadClass} method when that class loader calls + * the SecurityManager {@code checkPackageAccess} method *loadClass
method when that class loader calls - * the SecurityManagercheckPackageAccess
methodThis gives code access to classes in packages * to which it normally does not have access. Malicious code * may use these classes to help in its attempt to compromise @@ -257,12 +257,12 @@ * * * @@ -412,8 +412,8 @@ * * @param name the name of the RuntimePermission. * - * @throws NullPointerException ifdefineClassInPackage.{package name} *Definition of classes in the specified package, via a class - * loader's + * loader's {@code defineClass} method when that class loader calls + * the SecurityManager {@code checkPackageDefinition} method. *defineClass
method when that class loader calls - * the SecurityManagercheckPackageDefinition
method.This grants code permission to define a class * in a particular package. This is dangerous because malicious * code with this permission may define rogue classes in - * trusted packages like *java.security
orjava.lang
, + * trusted packages like {@code java.security} or {@code java.lang}, * for example.name
isnull
. - * @throws IllegalArgumentException ifname
is empty. + * @throws NullPointerException if {@code name} is {@code null}. + * @throws IllegalArgumentException if {@code name} is empty. */ public RuntimePermission(String name) @@ -429,8 +429,8 @@ * @param name the name of the RuntimePermission. * @param actions should be null. * - * @throws NullPointerException ifname
isnull
. - * @throws IllegalArgumentException ifname
is empty. + * @throws NullPointerException if {@code name} is {@code null}. + * @throws IllegalArgumentException if {@code name} is empty. */ public RuntimePermission(String name, String actions) diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/SecurityManager.java --- a/src/java.base/share/classes/java/lang/SecurityManager.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/SecurityManager.java Tue Sep 24 09:43:43 2019 +0100 @@ -60,11 +60,11 @@ * operation to be performed. The * application can allow or disallow the operation. *- * The
SecurityManager
class contains many methods with - * names that begin with the wordcheck
. These methods + * The {@code SecurityManager} class contains many methods with + * names that begin with the word {@code check}. These methods * are called by various methods in the Java libraries before those * methods perform certain potentially sensitive operations. The - * invocation of such acheck
method typically looks like this: + * invocation of such a {@code check} method typically looks like this: ** SecurityManager security = System.getSecurityManager(); * if (security != null) { @@ -75,7 +75,7 @@ * The security manager is thereby given an opportunity to prevent * completion of the operation by throwing an exception. A security * manager routine simply returns if the operation is permitted, but - * throws a* *SecurityException
if the operation is not + * throws a {@code SecurityException} if the operation is not * permitted. ** Environments using a security manager will typically set the security @@ -185,16 +185,16 @@ * *
* If a requested access is allowed, - *
checkPermission
returns quietly. If denied, a - *SecurityException
is thrown. + * {@code checkPermission} returns quietly. If denied, a + * {@code SecurityException} is thrown. ** The default implementation of each of the other - *
check
methods inSecurityManager
is to - * call theSecurityManager checkPermission
method + * {@code check} methods in {@code SecurityManager} is to + * call the {@code SecurityManager checkPermission} method * to determine if the calling thread has permission to perform the requested * operation. *- * Note that the
checkPermission
method with + * Note that the {@code checkPermission} method with * just a single permission argument always performs security checks * within the context of the currently executing thread. * Sometimes a security check that should be made within a given context @@ -205,7 +205,7 @@ * java.lang.Object) checkPermission} * method that includes a context argument are provided * for this situation. The - *getSecurityContext
method returns a "snapshot" + * {@code getSecurityContext} method returns a "snapshot" * of the current calling context. (The default implementation * returns an AccessControlContext object.) A sample call is * the following: @@ -217,14 +217,14 @@ *- * The
checkPermission
method + * The {@code checkPermission} method * that takes a context object in addition to a permission * makes access decisions based on that context, * rather than on that of the current execution thread. * Code within a different context can thus call that method, * passing the permission and the * previously-saved context object. A sample call, using the - * SecurityManagersm
obtained as in the previous example, + * SecurityManager {@code sm} obtained as in the previous example, * is the following: * *@@ -234,21 +234,21 @@ ** Hours must be between 0 and 23, and Minutes must be between * 00 and 59. The format is locale independent and digits must be taken * from the Basic Latin block of the Unicode standard. @@ -364,10 +364,10 @@ * SimpleDateFormat} or {@linkplain #applyPattern(String) applying a * pattern}. *Permissions fall into these categories: File, Socket, Net, * Security, Runtime, Property, AWT, Reflect, and Serializable. * The classes managing these various - * permission categories are
java.io.FilePermission
, - *java.net.SocketPermission
, - *java.net.NetPermission
, - *java.security.SecurityPermission
, - *java.lang.RuntimePermission
, - *java.util.PropertyPermission
, - *java.awt.AWTPermission
, - *java.lang.reflect.ReflectPermission
, and - *java.io.SerializablePermission
. + * permission categories are {@code java.io.FilePermission}, + * {@code java.net.SocketPermission}, + * {@code java.net.NetPermission}, + * {@code java.security.SecurityPermission}, + * {@code java.lang.RuntimePermission}, + * {@code java.util.PropertyPermission}, + * {@code java.awt.AWTPermission}, + * {@code java.lang.reflect.ReflectPermission}, and + * {@code java.io.SerializablePermission}. * *All but the first two (FilePermission and SocketPermission) are - * subclasses of
java.security.BasicPermission
, which itself + * subclasses of {@code java.security.BasicPermission}, which itself * is an abstract subclass of the * top-level class for permissions, which is - *java.security.Permission
. BasicPermission defines the + * {@code java.security.Permission}. BasicPermission defines the * functionality needed for all permissions that contain a name * that follows the hierarchical property naming convention * (for example, "exitVM", "setFactory", "queuePrintJob", etc). @@ -259,16 +259,16 @@ * *FilePermission and SocketPermission are subclasses of the * top-level class for permissions - * (
java.security.Permission
). Classes like these + * ({@code java.security.Permission}). Classes like these * that have a more complicated name syntax than that used by * BasicPermission subclass directly from Permission rather than from * BasicPermission. For example, - * for ajava.io.FilePermission
object, the permission name is + * for a {@code java.io.FilePermission} object, the permission name is * the path name of a file (or directory). * *Some of the permission classes have an "actions" list that tells * the actions that are permitted for the object. For example, - * for a
java.io.FilePermission
object, the actions list + * for a {@code java.io.FilePermission} object, the actions list * (such as "read, write") specifies which actions are granted for the * specified file (or for files in the specified directory). * @@ -276,7 +276,7 @@ * ones that contain a name but no actions list; you either have the * named permission or you don't. * - *Note: There is also a
java.security.AllPermission
+ *Note: There is also a {@code java.security.AllPermission} * permission that implies all permissions. It exists to simplify the work * of system administrators who might need to perform multiple * tasks that require all (or numerous) permissions. @@ -285,7 +285,7 @@ * Permissions in the Java Development Kit (JDK)} * for permission-related information. * This document includes a table listing the various SecurityManager - *
check
methods and the permission(s) the default + * {@code check} methods and the permission(s) the default * implementation of each such method requires. * It also contains a table of the methods * that require permissions, and for each such method tells @@ -322,17 +322,17 @@ private boolean initialized = false; /** - * Constructs a newSecurityManager
. + * Constructs a new {@code SecurityManager}. * *If there is a security manager already installed, this method first - * calls the security manager's
checkPermission
method - * with theRuntimePermission("createSecurityManager")
+ * calls the security manager's {@code checkPermission} method + * with the {@code RuntimePermission("createSecurityManager")} * permission to ensure the calling thread has permission to create a new * security manager. - * This may result in throwing aSecurityException
. + * This may result in throwing a {@code SecurityException}. * * @throws java.lang.SecurityException if a security manager already - * exists and itscheckPermission
method + * exists and its {@code checkPermission} method * doesn't allow creation of a new security manager. * @see java.lang.System#getSecurityManager() * @see #checkPermission(java.security.Permission) checkPermission @@ -355,8 +355,8 @@ * Returns the current execution stack as an array of classes. ** The length of the array is the number of methods on the execution - * stack. The element at index
0
is the class of the - * currently executing method, the element at index1
is + * stack. The element at index {@code 0} is the class of the + * currently executing method, the element at index {@code 1} is * the class of that method's caller, and so on. * * @return the execution stack. @@ -366,15 +366,15 @@ /** * Creates an object that encapsulates the current execution * environment. The result of this method is used, for example, by the - * three-argumentcheckConnect
method and by the - * two-argumentcheckRead
method. + * three-argument {@code checkConnect} method and by the + * two-argument {@code checkRead} method. * These methods are needed because a trusted method may be called * on to read a file or open a socket on behalf of another method. * The trusted method needs to determine if the other (possibly * untrusted) method would be allowed to perform the operation on its * own. *The default implementation of this method is to return - * an
AccessControlContext
object. + * an {@code AccessControlContext} object. * * @return an implementation-dependent object that encapsulates * sufficient information about the current execution environment @@ -390,18 +390,18 @@ } /** - * Throws aSecurityException
if the requested + * Throws a {@code SecurityException} if the requested * access, specified by the given permission, is not permitted based * on the security policy currently in effect. *- * This method calls
AccessController.checkPermission
+ * This method calls {@code AccessController.checkPermission} * with the given permission. * * @param perm the requested permission. * @throws SecurityException if access is not permitted based on * the current security policy. * @throws NullPointerException if the permission argument is - *null
. + * {@code null}. * @since 1.2 */ public void checkPermission(Permission perm) { @@ -409,32 +409,32 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * specified security context is denied access to the resource * specified by the given permission. * The context must be a security * context returned by a previous call to - *getSecurityContext
and the access control + * {@code getSecurityContext} and the access control * decision is based upon the configured security policy for * that security context. *- * If
context
is an instance of - *AccessControlContext
then the - *AccessControlContext.checkPermission
method is + * If {@code context} is an instance of + * {@code AccessControlContext} then the + * {@code AccessControlContext.checkPermission} method is * invoked with the specified permission. *- * If
context
is not an instance of - *AccessControlContext
then a - *SecurityException
is thrown. + * If {@code context} is not an instance of + * {@code AccessControlContext} then a + * {@code SecurityException} is thrown. * * @param perm the specified permission * @param context a system-dependent security context. * @throws SecurityException if the specified security context - * is not an instance ofAccessControlContext
- * (e.g., isnull
), or is denied access to the + * is not an instance of {@code AccessControlContext} + * (e.g., is {@code null}), or is denied access to the * resource specified by the given permission. * @throws NullPointerException if the permission argument is - *null
. + * {@code null}. * @see java.lang.SecurityManager#getSecurityContext() * @see java.security.AccessControlContext#checkPermission(java.security.Permission) * @since 1.2 @@ -448,15 +448,15 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to create a new class loader. *- * This method calls
checkPermission
with the - *RuntimePermission("createClassLoader")
+ * This method calls {@code checkPermission} with the + * {@code RuntimePermission("createClassLoader")} * permission. ** If you override this method, then you should make a call to - *
super.checkCreateClassLoader
+ * {@code super.checkCreateClassLoader} * at the point the overridden method would normally throw an * exception. * @@ -486,31 +486,31 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to modify the thread argument. ** This method is invoked for the current security manager by the - *
stop
,suspend
,resume
, - *setPriority
,setName
, and - *setDaemon
methods of classThread
. + * {@code stop}, {@code suspend}, {@code resume}, + * {@code setPriority}, {@code setName}, and + * {@code setDaemon} methods of class {@code Thread}. ** If the thread argument is a system thread (belongs to - * the thread group with a
null
parent) then - * this method callscheckPermission
with the - *RuntimePermission("modifyThread")
permission. + * the thread group with a {@code null} parent) then + * this method calls {@code checkPermission} with the + * {@code RuntimePermission("modifyThread")} permission. * If the thread argument is not a system thread, * this method just returns silently. ** Applications that want a stricter policy should override this * method. If this method is overridden, the method that overrides * it should additionally check to see if the calling thread has the - *
RuntimePermission("modifyThread")
permission, and + * {@code RuntimePermission("modifyThread")} permission, and * if so, return silently. This is to ensure that code granted * that permission (such as the JDK itself) is allowed to * manipulate any thread. ** If this method is overridden, then - *
super.checkAccess
should + * {@code super.checkAccess} should * be called by the first statement in the overridden method, or the * equivalent security check should be placed in the overridden method. * @@ -518,7 +518,7 @@ * @throws SecurityException if the calling thread does not have * permission to modify the thread. * @throws NullPointerException if the thread argument is - *null
. + * {@code null}. * @see java.lang.Thread#resume() resume * @see java.lang.Thread#setDaemon(boolean) setDaemon * @see java.lang.Thread#setName(java.lang.String) setName @@ -538,32 +538,32 @@ } } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to modify the thread group argument. ** This method is invoked for the current security manager when a * new child thread or child thread group is created, and by the - *
setDaemon
,setMaxPriority
, - *stop
,suspend
,resume
, and - *destroy
methods of classThreadGroup
. + * {@code setDaemon}, {@code setMaxPriority}, + * {@code stop}, {@code suspend}, {@code resume}, and + * {@code destroy} methods of class {@code ThreadGroup}. ** If the thread group argument is the system thread group ( - * has a
null
parent) then - * this method callscheckPermission
with the - *RuntimePermission("modifyThreadGroup")
permission. + * has a {@code null} parent) then + * this method calls {@code checkPermission} with the + * {@code RuntimePermission("modifyThreadGroup")} permission. * If the thread group argument is not the system thread group, * this method just returns silently. ** Applications that want a stricter policy should override this * method. If this method is overridden, the method that overrides * it should additionally check to see if the calling thread has the - *
RuntimePermission("modifyThreadGroup")
permission, and + * {@code RuntimePermission("modifyThreadGroup")} permission, and * if so, return silently. This is to ensure that code granted * that permission (such as the JDK itself) is allowed to * manipulate any thread. ** If this method is overridden, then - *
super.checkAccess
should + * {@code super.checkAccess} should * be called by the first statement in the overridden method, or the * equivalent security check should be placed in the overridden method. * @@ -571,7 +571,7 @@ * @throws SecurityException if the calling thread does not have * permission to modify the thread group. * @throws NullPointerException if the thread group argument is - *null
. + * {@code null}. * @see java.lang.ThreadGroup#destroy() destroy * @see java.lang.ThreadGroup#resume() resume * @see java.lang.ThreadGroup#setDaemon(boolean) setDaemon @@ -592,20 +592,20 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to cause the Java Virtual Machine to * halt with the specified status code. ** This method is invoked for the current security manager by the - *
exit
method of classRuntime
. A status - * of0
indicates success; other values indicate various + * {@code exit} method of class {@code Runtime}. A status + * of {@code 0} indicates success; other values indicate various * errors. *- * This method calls
checkPermission
with the - *RuntimePermission("exitVM."+status)
permission. + * This method calls {@code checkPermission} with the + * {@code RuntimePermission("exitVM."+status)} permission. ** If you override this method, then you should make a call to - *
super.checkExit
+ * {@code super.checkExit} * at the point the overridden method would normally throw an * exception. * @@ -621,28 +621,28 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to create a subprocess. ** This method is invoked for the current security manager by the - *
exec
methods of classRuntime
. + * {@code exec} methods of class {@code Runtime}. *- * This method calls
checkPermission
with the - *FilePermission(cmd,"execute")
permission + * This method calls {@code checkPermission} with the + * {@code FilePermission(cmd,"execute")} permission * if cmd is an absolute path, otherwise it calls - *checkPermission
with + * {@code checkPermission} with *FilePermission("<<ALL FILES>>","execute")
. ** If you override this method, then you should make a call to - *
super.checkExec
+ * {@code super.checkExec} * at the point the overridden method would normally throw an * exception. * * @param cmd the specified system command. * @throws SecurityException if the calling thread does not have * permission to create a subprocess. - * @throws NullPointerException if thecmd
argument is - *null
. + * @throws NullPointerException if the {@code cmd} argument is + * {@code null}. * @see java.lang.Runtime#exec(java.lang.String) * @see java.lang.Runtime#exec(java.lang.String, java.lang.String[]) * @see java.lang.Runtime#exec(java.lang.String[]) @@ -661,28 +661,28 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to dynamic link the library code * specified by the string argument file. The argument is either a * simple library name or a complete filename. ** This method is invoked for the current security manager by - * methods
load
andloadLibrary
of class - *Runtime
. + * methods {@code load} and {@code loadLibrary} of class + * {@code Runtime}. *- * This method calls
checkPermission
with the - *RuntimePermission("loadLibrary."+lib)
permission. + * This method calls {@code checkPermission} with the + * {@code RuntimePermission("loadLibrary."+lib)} permission. ** If you override this method, then you should make a call to - *
super.checkLink
+ * {@code super.checkLink} * at the point the overridden method would normally throw an * exception. * * @param lib the name of the library. * @throws SecurityException if the calling thread does not have * permission to dynamically link the library. - * @throws NullPointerException if thelib
argument is - *null
. + * @throws NullPointerException if the {@code lib} argument is + * {@code null}. * @see java.lang.Runtime#load(java.lang.String) * @see java.lang.Runtime#loadLibrary(java.lang.String) * @see #checkPermission(java.security.Permission) checkPermission @@ -695,16 +695,16 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to read from the specified file * descriptor. *- * This method calls
checkPermission
with the - *RuntimePermission("readFileDescriptor")
+ * This method calls {@code checkPermission} with the + * {@code RuntimePermission("readFileDescriptor")} * permission. ** If you override this method, then you should make a call to - *
super.checkRead
+ * {@code super.checkRead} * at the point the overridden method would normally throw an * exception. * @@ -712,7 +712,7 @@ * @throws SecurityException if the calling thread does not have * permission to access the specified file descriptor. * @throws NullPointerException if the file descriptor argument is - *null
. + * {@code null}. * @see java.io.FileDescriptor * @see #checkPermission(java.security.Permission) checkPermission */ @@ -724,23 +724,23 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to read the file specified by the * string argument. *- * This method calls
checkPermission
with the - *FilePermission(file,"read")
permission. + * This method calls {@code checkPermission} with the + * {@code FilePermission(file,"read")} permission. ** If you override this method, then you should make a call to - *
super.checkRead
+ * {@code super.checkRead} * at the point the overridden method would normally throw an * exception. * * @param file the system-dependent file name. * @throws SecurityException if the calling thread does not have * permission to access the specified file. - * @throws NullPointerException if thefile
argument is - *null
. + * @throws NullPointerException if the {@code file} argument is + * {@code null}. * @see #checkPermission(java.security.Permission) checkPermission */ public void checkRead(String file) { @@ -749,32 +749,32 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * specified security context is not allowed to read the file * specified by the string argument. The context must be a security * context returned by a previous call to - *getSecurityContext
. - *If
context
is an instance of - *AccessControlContext
then the - *AccessControlContext.checkPermission
method will - * be invoked with theFilePermission(file,"read")
permission. - *If
context
is not an instance of - *AccessControlContext
then a - *SecurityException
is thrown. + * {@code getSecurityContext}. + *If {@code context} is an instance of + * {@code AccessControlContext} then the + * {@code AccessControlContext.checkPermission} method will + * be invoked with the {@code FilePermission(file,"read")} permission. + *
If {@code context} is not an instance of + * {@code AccessControlContext} then a + * {@code SecurityException} is thrown. *
* If you override this method, then you should make a call to - *
super.checkRead
+ * {@code super.checkRead} * at the point the overridden method would normally throw an * exception. * * @param file the system-dependent filename. * @param context a system-dependent security context. * @throws SecurityException if the specified security context - * is not an instance ofAccessControlContext
- * (e.g., isnull
), or does not have permission + * is not an instance of {@code AccessControlContext} + * (e.g., is {@code null}), or does not have permission * to read the specified file. - * @throws NullPointerException if thefile
argument is - *null
. + * @throws NullPointerException if the {@code file} argument is + * {@code null}. * @see java.lang.SecurityManager#getSecurityContext() * @see java.security.AccessControlContext#checkPermission(java.security.Permission) */ @@ -785,16 +785,16 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to write to the specified file * descriptor. *- * This method calls
checkPermission
with the - *RuntimePermission("writeFileDescriptor")
+ * This method calls {@code checkPermission} with the + * {@code RuntimePermission("writeFileDescriptor")} * permission. ** If you override this method, then you should make a call to - *
super.checkWrite
+ * {@code super.checkWrite} * at the point the overridden method would normally throw an * exception. * @@ -802,7 +802,7 @@ * @throws SecurityException if the calling thread does not have * permission to access the specified file descriptor. * @throws NullPointerException if the file descriptor argument is - *null
. + * {@code null}. * @see java.io.FileDescriptor * @see #checkPermission(java.security.Permission) checkPermission */ @@ -815,23 +815,23 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to write to the file specified by * the string argument. *- * This method calls
checkPermission
with the - *FilePermission(file,"write")
permission. + * This method calls {@code checkPermission} with the + * {@code FilePermission(file,"write")} permission. ** If you override this method, then you should make a call to - *
super.checkWrite
+ * {@code super.checkWrite} * at the point the overridden method would normally throw an * exception. * * @param file the system-dependent filename. * @throws SecurityException if the calling thread does not * have permission to access the specified file. - * @throws NullPointerException if thefile
argument is - *null
. + * @throws NullPointerException if the {@code file} argument is + * {@code null}. * @see #checkPermission(java.security.Permission) checkPermission */ public void checkWrite(String file) { @@ -840,25 +840,25 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to delete the specified file. ** This method is invoked for the current security manager by the - *
delete
method of classFile
. + * {@code delete} method of class {@code File}. *- * This method calls
checkPermission
with the - *FilePermission(file,"delete")
permission. + * This method calls {@code checkPermission} with the + * {@code FilePermission(file,"delete")} permission. ** If you override this method, then you should make a call to - *
super.checkDelete
+ * {@code super.checkDelete} * at the point the overridden method would normally throw an * exception. * * @param file the system-dependent filename. * @throws SecurityException if the calling thread does not * have permission to delete the file. - * @throws NullPointerException if thefile
argument is - *null
. + * @throws NullPointerException if the {@code file} argument is + * {@code null}. * @see java.io.File#delete() * @see #checkPermission(java.security.Permission) checkPermission */ @@ -868,22 +868,22 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to open a socket connection to the * specified host and port number. *- * A port number of
-1
indicates that the calling + * A port number of {@code -1} indicates that the calling * method is attempting to determine the IP address of the specified * host name. *- * This method calls
checkPermission
with the - *SocketPermission(host+":"+port,"connect")
permission if + * This method calls {@code checkPermission} with the + * {@code SocketPermission(host+":"+port,"connect")} permission if * the port is not equal to -1. If the port is equal to -1, then - * it callscheckPermission
with the - *SocketPermission(host,"resolve")
permission. + * it calls {@code checkPermission} with the + * {@code SocketPermission(host,"resolve")} permission. ** If you override this method, then you should make a call to - *
super.checkConnect
+ * {@code super.checkConnect} * at the point the overridden method would normally throw an * exception. * @@ -891,9 +891,9 @@ * @param port the protocol port to connect to. * @throws SecurityException if the calling thread does not have * permission to open a socket connection to the specified - *host
andport
. - * @throws NullPointerException if thehost
argument is - *null
. + * {@code host} and {@code port}. + * @throws NullPointerException if the {@code host} argument is + * {@code null}. * @see #checkPermission(java.security.Permission) checkPermission */ public void checkConnect(String host, int port) { @@ -913,28 +913,28 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * specified security context is not allowed to open a socket * connection to the specified host and port number. *- * A port number of
-1
indicates that the calling + * A port number of {@code -1} indicates that the calling * method is attempting to determine the IP address of the specified * host name. - *If
context
is not an instance of - *AccessControlContext
then a - *SecurityException
is thrown. + *If {@code context} is not an instance of + * {@code AccessControlContext} then a + * {@code SecurityException} is thrown. *
* Otherwise, the port number is checked. If it is not equal - * to -1, the
context
'scheckPermission
+ * to -1, the {@code context}'s {@code checkPermission} * method is called with a - *SocketPermission(host+":"+port,"connect")
permission. + * {@code SocketPermission(host+":"+port,"connect")} permission. * If the port is equal to -1, then - * thecontext
'scheckPermission
method + * the {@code context}'s {@code checkPermission} method * is called with a - *SocketPermission(host,"resolve")
permission. + * {@code SocketPermission(host,"resolve")} permission. ** If you override this method, then you should make a call to - *
super.checkConnect
+ * {@code super.checkConnect} * at the point the overridden method would normally throw an * exception. * @@ -942,12 +942,12 @@ * @param port the protocol port to connect to. * @param context a system-dependent security context. * @throws SecurityException if the specified security context - * is not an instance ofAccessControlContext
- * (e.g., isnull
), or does not have permission + * is not an instance of {@code AccessControlContext} + * (e.g., is {@code null}), or does not have permission * to open a socket connection to the specified - *host
andport
. - * @throws NullPointerException if thehost
argument is - *null
. + * {@code host} and {@code port}. + * @throws NullPointerException if the {@code host} argument is + * {@code null}. * @see java.lang.SecurityManager#getSecurityContext() * @see java.security.AccessControlContext#checkPermission(java.security.Permission) */ @@ -969,15 +969,15 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to wait for a connection request on * the specified local port number. *- * This method calls
checkPermission
with the - *SocketPermission("localhost:"+port,"listen")
. + * This method calls {@code checkPermission} with the + * {@code SocketPermission("localhost:"+port,"listen")}. ** If you override this method, then you should make a call to - *
super.checkListen
+ * {@code super.checkListen} * at the point the overridden method would normally throw an * exception. * @@ -992,18 +992,18 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not permitted to accept a socket connection from * the specified host and port number. ** This method is invoked for the current security manager by the - *
accept
method of classServerSocket
. + * {@code accept} method of class {@code ServerSocket}. *- * This method calls
checkPermission
with the - *SocketPermission(host+":"+port,"accept")
permission. + * This method calls {@code checkPermission} with the + * {@code SocketPermission(host+":"+port,"accept")} permission. ** If you override this method, then you should make a call to - *
super.checkAccept
+ * {@code super.checkAccept} * at the point the overridden method would normally throw an * exception. * @@ -1011,8 +1011,8 @@ * @param port the port number of the socket connection. * @throws SecurityException if the calling thread does not have * permission to accept the connection. - * @throws NullPointerException if thehost
argument is - *null
. + * @throws NullPointerException if the {@code host} argument is + * {@code null}. * @see java.net.ServerSocket#accept() * @see #checkPermission(java.security.Permission) checkPermission */ @@ -1028,16 +1028,16 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to use * (join/leave/send/receive) IP multicast. *- * This method calls
checkPermission
with the + * This method calls {@code checkPermission} with the *java.net.SocketPermission(maddr.getHostAddress(), * "accept,connect")
permission. ** If you override this method, then you should make a call to - *
super.checkMulticast
+ * {@code super.checkMulticast} * at the point the overridden method would normally throw an * exception. * @@ -1045,7 +1045,7 @@ * @throws SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. * @throws NullPointerException if the address argument is - *null
. + * {@code null}. * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission */ @@ -1059,16 +1059,16 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to use * (join/leave/send/receive) IP multicast. *- * This method calls
checkPermission
with the + * This method calls {@code checkPermission} with the *java.net.SocketPermission(maddr.getHostAddress(), * "accept,connect")
permission. ** If you override this method, then you should make a call to - *
super.checkMulticast
+ * {@code super.checkMulticast} * at the point the overridden method would normally throw an * exception. * @@ -1079,7 +1079,7 @@ * @throws SecurityException if the calling thread is not allowed to * use (join/leave/send/receive) IP multicast. * @throws NullPointerException if the address argument is - *null
. + * {@code null}. * @since 1.1 * @deprecated Use #checkPermission(java.security.Permission) instead * @see #checkPermission(java.security.Permission) checkPermission @@ -1095,18 +1095,18 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to access or modify the system * properties. *- * This method is used by the
getProperties
and - *setProperties
methods of classSystem
. + * This method is used by the {@code getProperties} and + * {@code setProperties} methods of class {@code System}. *- * This method calls
checkPermission
with the - *PropertyPermission("*", "read,write")
permission. + * This method calls {@code checkPermission} with the + * {@code PropertyPermission("*", "read,write")} permission. ** If you override this method, then you should make a call to - *
super.checkPropertiesAccess
+ * {@code super.checkPropertiesAccess} * at the point the overridden method would normally throw an * exception. * @@ -1122,18 +1122,18 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to access the system property with - * the specifiedkey
name. + * the specified {@code key} name. *- * This method is used by the
getProperty
method of - * classSystem
. + * This method is used by the {@code getProperty} method of + * class {@code System}. *- * This method calls
checkPermission
with the - *PropertyPermission(key, "read")
permission. + * This method calls {@code checkPermission} with the + * {@code PropertyPermission(key, "read")} permission. ** If you override this method, then you should make a call to - *
super.checkPropertyAccess
+ * {@code super.checkPropertyAccess} * at the point the overridden method would normally throw an * exception. * @@ -1141,9 +1141,9 @@ * * @throws SecurityException if the calling thread does not have * permission to access the specified system property. - * @throws NullPointerException if thekey
argument is - *null
. - * @throws IllegalArgumentException ifkey
is empty. + * @throws NullPointerException if the {@code key} argument is + * {@code null}. + * @throws IllegalArgumentException if {@code key} is empty. * * @see java.lang.System#getProperty(java.lang.String) * @see #checkPermission(java.security.Permission) checkPermission @@ -1154,15 +1154,15 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to initiate a print job request. ** This method calls - *
checkPermission
with the - *RuntimePermission("queuePrintJob")
permission. + * {@code checkPermission} with the + * {@code RuntimePermission("queuePrintJob")} permission. ** If you override this method, then you should make a call to - *
super.checkPrintJobAccess
+ * {@code super.checkPrintJobAccess} * at the point the overridden method would normally throw an * exception. * @@ -1461,16 +1461,16 @@ } /** - * Throws aSecurityException
if the + * Throws a {@code SecurityException} if the * calling thread is not allowed to set the socket factory used by - *ServerSocket
orSocket
, or the stream - * handler factory used byURL
. + * {@code ServerSocket} or {@code Socket}, or the stream + * handler factory used by {@code URL}. *- * This method calls
checkPermission
with the - *RuntimePermission("setFactory")
permission. + * This method calls {@code checkPermission} with the + * {@code RuntimePermission("setFactory")} permission. ** If you override this method, then you should make a call to - *
super.checkSetFactory
+ * {@code super.checkSetFactory} * at the point the overridden method would normally throw an * exception. * @@ -1494,8 +1494,8 @@ *If the requested permission is allowed, this method returns * quietly. If denied, a SecurityException is raised. * - *
This method creates a
SecurityPermission
object for - * the given permission target name and callscheckPermission
+ *This method creates a {@code SecurityPermission} object for + * the given permission target name and calls {@code checkPermission} * with it. * *
See the documentation for @@ -1503,16 +1503,16 @@ * a list of possible permission target names. * *
If you override this method, then you should make a call to - *
super.checkSecurityAccess
+ * {@code super.checkSecurityAccess} * at the point the overridden method would normally throw an * exception. * - * @param target the target name of theSecurityPermission
. + * @param target the target name of the {@code SecurityPermission}. * * @throws SecurityException if the calling thread does not have * permission for the requested access. - * @throws NullPointerException iftarget
is null. - * @throws IllegalArgumentException iftarget
is empty. + * @throws NullPointerException if {@code target} is null. + * @throws IllegalArgumentException if {@code target} is empty. * * @since 1.1 * @see #checkPermission(java.security.Permission) checkPermission diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/StackOverflowError.java --- a/src/java.base/share/classes/java/lang/StackOverflowError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/StackOverflowError.java Tue Sep 24 09:43:43 2019 +0100 @@ -38,14 +38,14 @@ private static final long serialVersionUID = 8609175038441759607L; /** - * Constructs aStackOverflowError
with no detail message. + * Constructs a {@code StackOverflowError} with no detail message. */ public StackOverflowError() { super(); } /** - * Constructs aStackOverflowError
with the specified + * Constructs a {@code StackOverflowError} with the specified * detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/UnknownError.java --- a/src/java.base/share/classes/java/lang/UnknownError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/UnknownError.java Tue Sep 24 09:43:43 2019 +0100 @@ -38,14 +38,14 @@ private static final long serialVersionUID = 2524784860676771849L; /** - * Constructs anUnknownError
with no detail message. + * Constructs an {@code UnknownError} with no detail message. */ public UnknownError() { super(); } /** - * Constructs anUnknownError
with the specified detail + * Constructs an {@code UnknownError} with the specified detail * message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/UnsatisfiedLinkError.java --- a/src/java.base/share/classes/java/lang/UnsatisfiedLinkError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/UnsatisfiedLinkError.java Tue Sep 24 09:43:43 2019 +0100 @@ -27,7 +27,7 @@ /** * Thrown if the Java Virtual Machine cannot find an appropriate - * native-language definition of a method declarednative
. + * native-language definition of a method declared {@code native}. * * @author unascribed * @see java.lang.Runtime @@ -39,14 +39,14 @@ private static final long serialVersionUID = -4019343241616879428L; /** - * Constructs anUnsatisfiedLinkError
with no detail message. + * Constructs an {@code UnsatisfiedLinkError} with no detail message. */ public UnsatisfiedLinkError() { super(); } /** - * Constructs anUnsatisfiedLinkError
with the + * Constructs an {@code UnsatisfiedLinkError} with the * specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/UnsupportedClassVersionError.java --- a/src/java.base/share/classes/java/lang/UnsupportedClassVersionError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/UnsupportedClassVersionError.java Tue Sep 24 09:43:43 2019 +0100 @@ -38,7 +38,7 @@ private static final long serialVersionUID = -7123279212883497373L; /** - * Constructs aUnsupportedClassVersionError
+ * Constructs a {@code UnsupportedClassVersionError} * with no detail message. */ public UnsupportedClassVersionError() { @@ -46,7 +46,7 @@ } /** - * Constructs aUnsupportedClassVersionError
with + * Constructs a {@code UnsupportedClassVersionError} with * the specified detail message. * * @param s the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/UnsupportedOperationException.java --- a/src/java.base/share/classes/java/lang/UnsupportedOperationException.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/UnsupportedOperationException.java Tue Sep 24 09:43:43 2019 +0100 @@ -56,7 +56,7 @@ * Constructs a new exception with the specified detail message and * cause. * - *Note that the detail message associated with
cause
is + *Note that the detail message associated with {@code cause} is * not automatically incorporated in this exception's detail * message. * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/VerifyError.java --- a/src/java.base/share/classes/java/lang/VerifyError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/VerifyError.java Tue Sep 24 09:43:43 2019 +0100 @@ -39,14 +39,14 @@ private static final long serialVersionUID = 7001962396098498785L; /** - * Constructs an
VerifyError
with no detail message. + * Constructs an {@code VerifyError} with no detail message. */ public VerifyError() { super(); } /** - * Constructs anVerifyError
with the specified detail message. + * Constructs an {@code VerifyError} with the specified detail message. * * @param s the detail message. */ diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/VirtualMachineError.java --- a/src/java.base/share/classes/java/lang/VirtualMachineError.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/VirtualMachineError.java Tue Sep 24 09:43:43 2019 +0100 @@ -38,14 +38,14 @@ private static final long serialVersionUID = 4161983926571568670L; /** - * Constructs aVirtualMachineError
with no detail message. + * Constructs a {@code VirtualMachineError} with no detail message. */ public VirtualMachineError() { super(); } /** - * Constructs aVirtualMachineError
with the specified + * Constructs a {@code VirtualMachineError} with the specified * detail message. * * @param message the detail message. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/invoke/MethodHandles.java --- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Tue Sep 24 09:43:43 2019 +0100 @@ -1042,7 +1042,7 @@ *IAE * *- * *{@code ANY.in(X)}, for inaccessible + *X
{@code ANY.in(X)}, for inaccessible {@code X} ** * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/invoke/package-info.java --- a/src/java.base/share/classes/java/lang/invoke/package-info.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/invoke/package-info.java Tue Sep 24 09:43:43 2019 +0100 @@ -216,22 +216,22 @@ * * * * - *
CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
- *CallSite bootstrap(Object... args)
- *CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
+ *- {@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)} + *
- {@code CallSite bootstrap(Object... args)} + *
- {@code CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)} *
* 0 * - *
CallSite bootstrap(Lookup caller, String name, MethodType type)
- *CallSite bootstrap(Lookup caller, Object... nameAndType)
+ *- {@code CallSite bootstrap(Lookup caller, String name, MethodType type)} + *
- {@code CallSite bootstrap(Lookup caller, Object... nameAndType)} *
+ * {@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)} * 1 - * CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
* * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/lang/ref/Reference.java --- a/src/java.base/share/classes/java/lang/ref/Reference.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/lang/ref/Reference.java Tue Sep 24 09:43:43 2019 +0100 @@ -323,10 +323,10 @@ /** * 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 2 * - *
CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
- *CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
- *CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
+ *- {@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)} + *
- {@code CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)} + *
- {@code CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)} *
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 */ @HotSpotIntrinsicCandidate public T get() { @@ -350,9 +350,9 @@ * Tells whether or not this reference object has been enqueued, either by * the program or by the garbage collector. If this reference object was * not registered with a queue when it was created, then this method will - * always returnfalse
. + * always return {@code false}. * - * @returntrue
if and only if this reference object has + * @return {@code true} if and only if this reference object has * been enqueued */ public boolean isEnqueued() { @@ -366,8 +366,8 @@ *This method is invoked only by Java code; when the garbage collector * enqueues references it does so directly, without invoking this method. * - * @return
true
if this reference object was successfully - * enqueued;false
if it was already enqueued or if + * @return {@code true} if this reference object was successfully + * enqueued; {@code false} if it was already enqueued or if * it was not registered with a queue when it was created */ public boolean enqueue() { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/AttributedString.java --- a/src/java.base/share/classes/java/text/AttributedString.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/AttributedString.java Tue Sep 24 09:43:43 2019 +0100 @@ -117,7 +117,7 @@ /** * Constructs an AttributedString instance with the given text. * @param text The text for this attributed string. - * @throws NullPointerException iftext
is null. + * @throws NullPointerException if {@code text} is null. */ public AttributedString(String text) { if (text == null) { @@ -130,8 +130,8 @@ * Constructs an AttributedString instance with the given text and attributes. * @param text The text for this attributed string. * @param attributes The attributes that apply to the entire string. - * @throws NullPointerException iftext
or - *attributes
is null. + * @throws NullPointerException if {@code text} or + * {@code attributes} is null. * @throws IllegalArgumentException if the text has length 0 * and the attributes parameter is not an empty Map (attributes * cannot be applied to a 0-length range). @@ -171,7 +171,7 @@ * Constructs an AttributedString instance with the given attributed * text represented by AttributedCharacterIterator. * @param text The text for this attributed string. - * @throws NullPointerException iftext
is null. + * @throws NullPointerException if {@code text} is null. */ public AttributedString(AttributedCharacterIterator text) { // If performance is critical, this constructor should be @@ -192,7 +192,7 @@ * @param beginIndex Index of the first character of the range. * @param endIndex Index of the character following the last character * of the range. - * @throws NullPointerException iftext
is null. + * @throws NullPointerException if {@code text} is null. * @throws IllegalArgumentException if the subrange given by * beginIndex and endIndex is out of the text range. * @see java.text.Annotation @@ -220,7 +220,7 @@ * @param attributes Specifies attributes to be extracted * from the text. If null is specified, all available attributes will * be used. - * @throws NullPointerException iftext
is null. + * @throws NullPointerException if {@code text} is null. * @throws IllegalArgumentException if the subrange given by * beginIndex and endIndex is out of the text range. * @see java.text.Annotation @@ -307,7 +307,7 @@ * Adds an attribute to the entire string. * @param attribute the attribute key * @param value the value of the attribute; may be null - * @throws NullPointerException ifattribute
is null. + * @throws NullPointerException if {@code attribute} is null. * @throws IllegalArgumentException if the AttributedString has length 0 * (attributes cannot be applied to a 0-length range). */ @@ -331,7 +331,7 @@ * @param value The value of the attribute. May be null. * @param beginIndex Index of the first character of the range. * @param endIndex Index of the character following the last character of the range. - * @throws NullPointerException ifattribute
is null. + * @throws NullPointerException if {@code attribute} is null. * @throws IllegalArgumentException if beginIndex is less than 0, endIndex is * greater than the length of the string, or beginIndex and endIndex together don't * define a non-empty subrange of the string. @@ -356,7 +356,7 @@ * @param beginIndex Index of the first character of the range. * @param endIndex Index of the character following the last * character of the range. - * @throws NullPointerException ifattributes
is null. + * @throws NullPointerException if {@code attributes} is null. * @throws IllegalArgumentException if beginIndex is less than * 0, endIndex is greater than the length of the string, or * beginIndex and endIndex together don't define a non-empty diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/Bidi.java --- a/src/java.base/share/classes/java/text/Bidi.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/Bidi.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -261,7 +261,7 @@ /** * Return the level of the nth logical run in this line. - * @param run the index of the run, between 0 andgetRunCount()
+ * @param run the index of the run, between 0 and {@code getRunCount()} * @return the level of the run */ public int getRunLevel(int run) { @@ -271,7 +271,7 @@ /** * Return the index of the character at the start of the nth logical run in this line, as * an offset from the start of the line. - * @param run the index of the run, between 0 andgetRunCount()
+ * @param run the index of the run, between 0 and {@code getRunCount()} * @return the start of the run */ public int getRunStart(int run) { @@ -282,7 +282,7 @@ * Return the index of the character past the end of the nth logical run in this line, as * an offset from the start of the line. For example, this will return the length * of the line for the last run on the line. - * @param run the index of the run, between 0 andgetRunCount()
+ * @param run the index of the run, between 0 and {@code getRunCount()} * @return limit the limit of the run */ public int getRunLimit(int run) { @@ -308,11 +308,11 @@ * Reorder the objects in the array into visual order based on their levels. * This is a utility function to use when you have a collection of objects * representing runs of text in logical order, each run containing text - * at a single level. The elements atindex
from - *objectStart
up toobjectStart + count
+ * at a single level. The elements at {@code index} from + * {@code objectStart} up to {@code objectStart + count} * in the objects array will be reordered into visual order assuming * each run of text has the level indicated by the corresponding element - * in the levels array (atindex - objectStart + levelStart
). + * in the levels array (at {@code index - objectStart + levelStart}). * * @param levels an array representing the bidi level of each object * @param levelStart the start position in the levels array diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/BreakIterator.java --- a/src/java.base/share/classes/java/text/BreakIterator.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/BreakIterator.java Tue Sep 24 09:43:43 2019 +0100 @@ -48,23 +48,23 @@ /** - * TheBreakIterator
class implements methods for finding - * the location of boundaries in text. Instances ofBreakIterator
+ * The {@code BreakIterator} class implements methods for finding + * the location of boundaries in text. Instances of {@code BreakIterator} * maintain a current position and scan over text * returning the index of characters where boundaries occur. - * Internally,BreakIterator
scans text using a - *CharacterIterator
, and is thus able to scan text held - * by any object implementing that protocol. AStringCharacterIterator
- * is used to scanString
objects passed tosetText
. + * Internally, {@code BreakIterator} scans text using a + * {@code CharacterIterator}, and is thus able to scan text held + * by any object implementing that protocol. A {@code StringCharacterIterator} + * is used to scan {@code String} objects passed to {@code setText}. * ** You use the factory methods provided by this class to create * instances of various types of break iterators. In particular, - * use
getWordInstance
,getLineInstance
, - *getSentenceInstance
, andgetCharacterInstance
- * to createBreakIterator
s that perform + * use {@code getWordInstance}, {@code getLineInstance}, + * {@code getSentenceInstance}, and {@code getCharacterInstance} + * to create {@code BreakIterator}s that perform * word, line, sentence, and character boundary analysis respectively. - * A singleBreakIterator
can work only on one unit + * A single {@code BreakIterator} can work only on one unit * (word, line, sentence, and so on). You must use a different iterator * for each unit boundary analysis you wish to perform. * @@ -100,7 +100,7 @@ * differ between languages. * *- * The
BreakIterator
instances returned by the factory methods + * The {@code BreakIterator} instances returned by the factory methods * of this class are intended for use with natural languages only, not for * programming language text. It is however possible to define subclasses * that tokenize a programming language. @@ -274,31 +274,31 @@ /** * Returns the nth boundary from the current boundary. If either * the first or last text boundary has been reached, it returns - *BreakIterator.DONE
and the current position is set to either + * {@code BreakIterator.DONE} and the current position is set to either * the first or last text boundary depending on which one is reached. Otherwise, * the iterator's current position is set to the new boundary. * For example, if the iterator's current position is the mth text boundary * and three more boundaries exist from the current boundary to the last text * boundary, the next(2) call will return m + 2. The new text position is set * to the (m + 2)th text boundary. A next(4) call would return - *BreakIterator.DONE
and the last text boundary would become the + * {@code BreakIterator.DONE} and the last text boundary would become the * new text position. * @param n which boundary to return. A value of 0 * does nothing. Negative values move to previous boundaries * and positive values move to later boundaries. * @return The character index of the nth boundary from the current position - * orBreakIterator.DONE
if either first or last text boundary + * or {@code BreakIterator.DONE} if either first or last text boundary * has been reached. */ public abstract int next(int n); /** * Returns the boundary following the current boundary. If the current boundary - * is the last text boundary, it returnsBreakIterator.DONE
and + * is the last text boundary, it returns {@code BreakIterator.DONE} and * the iterator's current position is unchanged. Otherwise, the iterator's * current position is set to the boundary following the current boundary. * @return The character index of the next text boundary or - *BreakIterator.DONE
if the current boundary is the last text + * {@code BreakIterator.DONE} if the current boundary is the last text * boundary. * Equivalent to next(1). * @see #next(int) @@ -307,11 +307,11 @@ /** * Returns the boundary preceding the current boundary. If the current boundary - * is the first text boundary, it returnsBreakIterator.DONE
and + * is the first text boundary, it returns {@code BreakIterator.DONE} and * the iterator's current position is unchanged. Otherwise, the iterator's * current position is set to the boundary preceding the current boundary. * @return The character index of the previous text boundary or - *BreakIterator.DONE
if the current boundary is the first text + * {@code BreakIterator.DONE} if the current boundary is the first text * boundary. */ public abstract int previous(); @@ -319,13 +319,13 @@ /** * Returns the first boundary following the specified character offset. If the * specified offset equals to the last text boundary, it returns - *BreakIterator.DONE
and the iterator's current position is unchanged. + * {@code BreakIterator.DONE} and the iterator's current position is unchanged. * Otherwise, the iterator's current position is set to the returned boundary. * The value returned is always greater than the offset or the value - *BreakIterator.DONE
. + * {@code BreakIterator.DONE}. * @param offset the character offset to begin scanning. * @return The first boundary after the specified offset or - *BreakIterator.DONE
if the last text boundary is passed in + * {@code BreakIterator.DONE} if the last text boundary is passed in * as the offset. * @throws IllegalArgumentException if the specified offset is less than * the first text boundary or greater than the last text boundary. @@ -335,13 +335,13 @@ /** * Returns the last boundary preceding the specified character offset. If the * specified offset equals to the first text boundary, it returns - *BreakIterator.DONE
and the iterator's current position is unchanged. + * {@code BreakIterator.DONE} and the iterator's current position is unchanged. * Otherwise, the iterator's current position is set to the returned boundary. * The value returned is always less than the offset or the value - *BreakIterator.DONE
. + * {@code BreakIterator.DONE}. * @param offset the character offset to begin scanning. * @return The last boundary before the specified offset or - *BreakIterator.DONE
if the first text boundary is passed in + * {@code BreakIterator.DONE} if the first text boundary is passed in * as the offset. * @throws IllegalArgumentException if the specified offset is less than * the first text boundary or greater than the last text boundary. @@ -361,8 +361,8 @@ /** * Returns true if the specified character offset is a text boundary. * @param offset the character offset to check. - * @returntrue
if "offset" is a boundary position, - *false
otherwise. + * @return {@code true} if "offset" is a boundary position, + * {@code false} otherwise. * @throws IllegalArgumentException if the specified offset is less than * the first text boundary or greater than the last text boundary. * @since 1.2 @@ -390,7 +390,7 @@ * Returns character index of the text boundary that was most * recently returned by next(), next(int), previous(), first(), last(), * following(int) or preceding(int). If any of these methods returns - *BreakIterator.DONE
because either first or last text boundary + * {@code BreakIterator.DONE} because either first or last text boundary * has been reached, it returns the first or last text boundary depending on * which one is reached. * @return The text boundary returned from the above methods, first or last @@ -437,7 +437,7 @@ private static final SoftReference[] iterCache = (SoftReference []) new SoftReference>[4]; /** - * Returns a new BreakIterator
instance + * Returns a new {@code BreakIterator} instance * for word breaks * for the {@linkplain Locale#getDefault() default locale}. * @return A break iterator for word breaks @@ -448,12 +448,12 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for word breaks * for the given locale. * @param locale the desired locale * @return A break iterator for word breaks - * @throws NullPointerException iflocale
is null + * @throws NullPointerException if {@code locale} is null */ public static BreakIterator getWordInstance(Locale locale) { @@ -461,7 +461,7 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for line breaks * for the {@linkplain Locale#getDefault() default locale}. * @return A break iterator for line breaks @@ -472,12 +472,12 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for line breaks * for the given locale. * @param locale the desired locale * @return A break iterator for line breaks - * @throws NullPointerException iflocale
is null + * @throws NullPointerException if {@code locale} is null */ public static BreakIterator getLineInstance(Locale locale) { @@ -485,7 +485,7 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for character breaks * for the {@linkplain Locale#getDefault() default locale}. * @return A break iterator for character breaks @@ -496,12 +496,12 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for character breaks * for the given locale. * @param locale the desired locale * @return A break iterator for character breaks - * @throws NullPointerException iflocale
is null + * @throws NullPointerException if {@code locale} is null */ public static BreakIterator getCharacterInstance(Locale locale) { @@ -509,7 +509,7 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for sentence breaks * for the {@linkplain Locale#getDefault() default locale}. * @return A break iterator for sentence breaks @@ -520,12 +520,12 @@ } /** - * Returns a newBreakIterator
instance + * Returns a new {@code BreakIterator} instance * for sentence breaks * for the given locale. * @param locale the desired locale * @return A break iterator for sentence breaks - * @throws NullPointerException iflocale
is null + * @throws NullPointerException if {@code locale} is null */ public static BreakIterator getSentenceInstance(Locale locale) { @@ -580,16 +580,16 @@ /** * Returns an array of all locales for which the - *get*Instance
methods of this class can return + * {@code get*Instance} methods of this class can return * localized instances. * The returned array represents the union of locales supported by the Java * runtime and by installed * {@link java.text.spi.BreakIteratorProvider BreakIteratorProvider} implementations. - * It must contain at least aLocale
+ * It must contain at least a {@code Locale} * instance equal to {@link java.util.Locale#US Locale.US}. * * @return An array of locales for which localized - *BreakIterator
instances are available. + * {@code BreakIterator} instances are available. */ public static synchronized Locale[] getAvailableLocales() { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/CharacterIteratorFieldDelegate.java --- a/src/java.base/share/classes/java/text/CharacterIteratorFieldDelegate.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/CharacterIteratorFieldDelegate.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,16 @@ /** * CharacterIteratorFieldDelegate combines the notifications from a Format - * into a resultingAttributedCharacterIterator
. The resulting - *AttributedCharacterIterator
can be retrieved by way of - * thegetIterator
method. + * into a resulting {@code AttributedCharacterIterator}. The resulting + * {@code AttributedCharacterIterator} can be retrieved by way of + * the {@code getIterator} method. * */ class CharacterIteratorFieldDelegate implements Format.FieldDelegate { /** - * Array of AttributeStrings. Wheneverformatted
is invoked + * Array of AttributeStrings. Whenever {@code formatted} is invoked * for a region > size, a new instance of AttributedString is added to - * attributedStrings. Subsequent invocations offormatted
+ * attributedStrings. Subsequent invocations of {@code formatted} * for existing regions result in invoking addAttribute on the existing * AttributedStrings. */ @@ -98,7 +98,7 @@ } /** - * Returns anAttributedCharacterIterator
that can be used + * Returns an {@code AttributedCharacterIterator} that can be used * to iterate over the resulting formatted String. * * @pararm string Result of formatting. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/ChoiceFormat.java --- a/src/java.base/share/classes/java/text/ChoiceFormat.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/ChoiceFormat.java Tue Sep 24 09:43:43 2019 +0100 @@ -44,8 +44,8 @@ import java.util.Arrays; /** - * AChoiceFormat
allows you to attach a format to a range of numbers. - * It is generally used in aMessageFormat
for handling plurals. + * A {@code ChoiceFormat} allows you to attach a format to a range of numbers. + * It is generally used in a {@code MessageFormat} for handling plurals. * The choice is specified with an ascending list of doubles, where each item * specifies a half-open interval up to the next item: *@@ -60,15 +60,15 @@ * ** ** Note: - *
ChoiceFormat
differs from the otherFormat
- * classes in that you create aChoiceFormat
object with a - * constructor (not with agetInstance
style factory - * method). The factory methods aren't necessary becauseChoiceFormat
+ * {@code ChoiceFormat} differs from the other {@code Format} + * classes in that you create a {@code ChoiceFormat} object with a + * constructor (not with a {@code getInstance} style factory + * method). The factory methods aren't necessary because {@code ChoiceFormat} * doesn't require any complex setup for a given locale. In fact, - *ChoiceFormat
doesn't implement any locale specific behavior. + * {@code ChoiceFormat} doesn't implement any locale specific behavior. * *- * When creating a
ChoiceFormat
, you must specify an array of formats + * When creating a {@code ChoiceFormat}, you must specify an array of formats * and an array of limits. The length of these arrays must be the same. * For example, *@@ -78,7 +78,7 @@ *
* @@ -381,7 +381,7 @@ /** * Specialization of format. This method really calls - *- * limits = {0, 1, ChoiceFormat.nextDouble(1)}
* formats = {"no files", "one file", "many files"}
- * (nextDouble
can be used to get the next higher double, to + * ({@code nextDouble} can be used to get the next higher double, to * make the half-open interval.) *format(double, StringBuffer, FieldPosition)
+ * {@code format(double, StringBuffer, FieldPosition)} * thus the range of longs that are supported is only equal to * the range that can be stored by double. This will never be * a practical limitation. @@ -542,16 +542,16 @@ /** * A list of lower bounds for the choices. The formatter will return - *choiceFormats[i]
if the number being formatted is greater than or equal to - *choiceLimits[i]
and less thanchoiceLimits[i+1]
. + * {@code choiceFormats[i]} if the number being formatted is greater than or equal to + * {@code choiceLimits[i]} and less than {@code choiceLimits[i+1]}. * @serial */ private double[] choiceLimits; /** * A list of choice strings. The formatter will return - *choiceFormats[i]
if the number being formatted is greater than or equal to - *choiceLimits[i]
and less thanchoiceLimits[i+1]
. + * {@code choiceFormats[i]} if the number being formatted is greater than or equal to + * {@code choiceLimits[i]} and less than {@code choiceLimits[i+1]}. * @serial */ private String[] choiceFormats; diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/CollationElementIterator.java --- a/src/java.base/share/classes/java/text/CollationElementIterator.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/CollationElementIterator.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ import sun.text.normalizer.NormalizerBase; /** - * TheCollationElementIterator
class is used as an iterator + * The {@code CollationElementIterator} class is used as an iterator * to walk through each character of an international string. Use the iterator * to return the ordering priority of the positioned character. The ordering * priority of a character, which we refer to as a key, defines how a character @@ -68,9 +68,9 @@ * The key of a character is an integer composed of primary order(short), * secondary order(byte), and tertiary order(byte). Java strictly defines * the size and signedness of its primitive data types. Therefore, the static - * functionsprimaryOrder
,secondaryOrder
, and - *tertiaryOrder
returnint
,short
, - * andshort
respectively to ensure the correctness of the key + * functions {@code primaryOrder}, {@code secondaryOrder}, and + * {@code tertiaryOrder} return {@code int}, {@code short}, + * and {@code short} respectively to ensure the correctness of the key * value. * *@@ -90,16 +90,16 @@ *
- *
CollationElementIterator.next
returns the collation order + * {@code CollationElementIterator.next} returns the collation order * of the next character. A collation order consists of primary order, * secondary order and tertiary order. The data type of the collation * order is int. The first 16 bits of a collation order * is its primary order; the next 8 bits is the secondary order and the * last 8 bits is the tertiary order. * - *Note:
CollationElementIterator
is a part of - *RuleBasedCollator
implementation. It is only usable - * withRuleBasedCollator
instances. + *Note: {@code CollationElementIterator} is a part of + * {@code RuleBasedCollator} implementation. It is only usable + * with {@code RuleBasedCollator} instances. * * @see Collator * @see RuleBasedCollator diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/CollationKey.java --- a/src/java.base/share/classes/java/text/CollationKey.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/CollationKey.java Tue Sep 24 09:43:43 2019 +0100 @@ -39,34 +39,34 @@ package java.text; /** - * A
CollationKey
represents aString
under the - * rules of a specificCollator
object. Comparing two - *CollationKey
s returns the relative order of the - *String
s they represent. UsingCollationKey
s - * to compareString
s is generally faster than using - *Collator.compare
. Thus, when theString
s + * A {@code CollationKey} represents a {@code String} under the + * rules of a specific {@code Collator} object. Comparing two + * {@code CollationKey}s returns the relative order of the + * {@code String}s they represent. Using {@code CollationKey}s + * to compare {@code String}s is generally faster than using + * {@code Collator.compare}. Thus, when the {@code String}s * must be compared multiple times, for example when sorting a list - * ofString
s. It's more efficient to useCollationKey
s. + * of {@code String}s. It's more efficient to use {@code CollationKey}s. * *- * You can not create
CollationKey
s directly. Rather, - * generate them by callingCollator.getCollationKey
. - * You can only compareCollationKey
s generated from - * the sameCollator
object. + * You can not create {@code CollationKey}s directly. Rather, + * generate them by calling {@code Collator.getCollationKey}. + * You can only compare {@code CollationKey}s generated from + * the same {@code Collator} object. * *- * Generating a
CollationKey
for aString
- * involves examining the entireString
+ * Generating a {@code CollationKey} for a {@code String} + * involves examining the entire {@code String} * and converting it to series of bits that can be compared bitwise. This * allows fast comparisons once the keys are generated. The cost of generating - * keys is recouped in faster comparisons whenString
s need + * keys is recouped in faster comparisons when {@code String}s need * to be compared many times. On the other hand, the result of a comparison - * is often determined by the first couple of characters of eachString
. - *Collator.compare
examines only as many characters as it needs which + * is often determined by the first couple of characters of each {@code String}. + * {@code Collator.compare} examines only as many characters as it needs which * allows it to be faster when doing single comparisons. *- * The following example shows how
CollationKey
s might be used - * to sort a list ofString
s. + * The following example shows how {@code CollationKey}s might be used + * to sort a list of {@code String}s. ***{@code * // Create an array of CollationKeys for the Strings to be sorted. diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/Collator.java --- a/src/java.base/share/classes/java/text/Collator.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/Collator.java Tue Sep 24 09:43:43 2019 +0100 @@ -49,28 +49,28 @@ /** - * The*Collator
class performs locale-sensitive - *String
comparison. You use this class to build + * The {@code Collator} class performs locale-sensitive + * {@code String} comparison. You use this class to build * searching and sorting routines for natural language text. * *- *
Collator
is an abstract base class. Subclasses + * {@code Collator} is an abstract base class. Subclasses * implement specific collation strategies. One subclass, - *RuleBasedCollator
, is currently provided with + * {@code RuleBasedCollator}, is currently provided with * the Java Platform and is applicable to a wide set of languages. Other * subclasses may be created to handle more specialized needs. * ** Like other locale-sensitive classes, you can use the static - * factory method,
getInstance
, to obtain the appropriate - *Collator
object for a given locale. You will only need - * to look at the subclasses ofCollator
if you need + * factory method, {@code getInstance}, to obtain the appropriate + * {@code Collator} object for a given locale. You will only need + * to look at the subclasses of {@code Collator} if you need * to understand the details of a particular collation strategy or * if you need to modify that strategy. * ** The following example shows how to compare two strings using - * the
Collator
for the default locale. + * the {@code Collator} for the default locale. *** *{@code * // Compare two strings in the default locale @@ -83,10 +83,10 @@ *- * You can set a
Collator
's strength property + * You can set a {@code Collator}'s strength property * to determine the level of difference considered significant in - * comparisons. Four strengths are provided:PRIMARY
, - *SECONDARY
,TERTIARY
, andIDENTICAL
. + * comparisons. Four strengths are provided: {@code PRIMARY}, + * {@code SECONDARY}, {@code TERTIARY}, and {@code IDENTICAL}. * The exact assignment of strengths to language features is * locale dependent. For example, in Czech, "e" and "f" are considered * primary differences, while "e" and "ě" are secondary differences, @@ -104,19 +104,19 @@ *- * For comparing
String
s exactly once, thecompare
+ * For comparing {@code String}s exactly once, the {@code compare} * method provides the best performance. When sorting a list of - *String
s however, it is generally necessary to compare each - *String
multiple times. In this case,CollationKey
s - * provide better performance. TheCollationKey
class converts - * aString
to a series of bits that can be compared bitwise - * against otherCollationKey
s. ACollationKey
is - * created by aCollator
object for a givenString
. + * {@code String}s however, it is generally necessary to compare each + * {@code String} multiple times. In this case, {@code CollationKey}s + * provide better performance. The {@code CollationKey} class converts + * a {@code String} to a series of bits that can be compared bitwise + * against other {@code CollationKey}s. A {@code CollationKey} is + * created by a {@code Collator} object for a given {@code String}. *
- * Note:CollationKey
s from different - *Collator
s can not be compared. See the class description + * Note: {@code CollationKey}s from different + * {@code Collator}s can not be compared. See the class description * for {@link CollationKey} - * for an example usingCollationKey
s. + * for an example using {@code CollationKey}s. * * @see RuleBasedCollator * @see CollationKey @@ -291,7 +291,7 @@ * to, or greater than the second. ** This implementation merely returns - *
compare((String)o1, (String)o2)
. + * {@code compare((String)o1, (String)o2) }. * * @return a negative integer, zero, or a positive integer as the * first argument is less than, equal to, or greater than the @@ -416,7 +416,7 @@ /** * Returns an array of all locales for which the - *getInstance
methods of this class can return + * {@code getInstance} methods of this class can return * localized instances. * The returned array represents the union of locales supported * by the Java runtime and by installed @@ -425,7 +425,7 @@ * {@link java.util.Locale#US Locale.US}. * * @return An array of locales for which localized - *Collator
instances are available. + * {@code Collator} instances are available. */ public static synchronized Locale[] getAvailableLocales() { LocaleServiceProviderPool pool = diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/DateFormat.java --- a/src/java.base/share/classes/java/text/DateFormat.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/DateFormat.java Tue Sep 24 09:43:43 2019 +0100 @@ -58,7 +58,7 @@ * formats and parses dates or time in a language-independent manner. * The date/time formatting subclass, such as {@link SimpleDateFormat}, allows for * formatting (i.e., date → text), parsing (text → date), and - * normalization. The date is represented as aDate
object or + * normalization. The date is represented as a {@code Date} object or * as the milliseconds since January 1, 1970, 00:00:00 GMT. * *{@code DateFormat} provides many class methods for obtaining default date/time @@ -185,15 +185,15 @@ * *
Subclasses should initialize this field to a {@link Calendar} * appropriate for the {@link Locale} associated with this - *
DateFormat
. + * {@code DateFormat}. * @serial */ protected Calendar calendar; /** - * The number formatter thatDateFormat
uses to format numbers + * The number formatter that {@code DateFormat} uses to format numbers * in dates and times. Subclasses should initialize this to a number format - * appropriate for the locale associated with thisDateFormat
. + * appropriate for the locale associated with this {@code DateFormat}. * @serial */ protected NumberFormat numberFormat; @@ -383,8 +383,8 @@ * See the {@link #parse(String, ParsePosition)} method for more information * on date parsing. * - * @param source AString
whose beginning should be parsed. - * @return ADate
parsed from the string. + * @param source A {@code String} whose beginning should be parsed. + * @return A {@code Date} parsed from the string. * @throws ParseException if the beginning of the specified string * cannot be parsed. */ @@ -427,26 +427,26 @@ public abstract Date parse(String source, ParsePosition pos); /** - * Parses text from a string to produce aDate
. + * Parses text from a string to produce a {@code Date}. ** The method attempts to parse text starting at the index given by - *
pos
. - * If parsing succeeds, then the index ofpos
is updated + * {@code pos}. + * If parsing succeeds, then the index of {@code pos} is updated * to the index after the last character used (parsing does not necessarily * use all characters up to the end of the string), and the parsed - * date is returned. The updatedpos
can be used to + * date is returned. The updated {@code pos} can be used to * indicate the starting point for the next call to this method. - * If an error occurs, then the index ofpos
is not - * changed, the error index ofpos
is set to the index of + * If an error occurs, then the index of {@code pos} is not + * changed, the error index of {@code pos} is set to the index of * the character where the error occurred, and null is returned. ** See the {@link #parse(String, ParsePosition)} method for more information * on date parsing. * - * @param source A
String
, part of which should be parsed. - * @param pos AParsePosition
object with index and error + * @param source A {@code String}, part of which should be parsed. + * @param pos A {@code ParsePosition} object with index and error * index information as described above. - * @return ADate
parsed from the string. In case of + * @return A {@code Date} parsed from the string. In case of * error, returns null. * @throws NullPointerException if {@code source} or {@code pos} is null. */ @@ -628,16 +628,16 @@ /** * Returns an array of all locales for which the - *get*Instance
methods of this class can return + * {@code get*Instance} methods of this class can return * localized instances. * The returned array represents the union of locales supported by the Java * runtime and by installed * {@link java.text.spi.DateFormatProvider DateFormatProvider} implementations. - * It must contain at least aLocale
instance equal to + * It must contain at least a {@code Locale} instance equal to * {@link java.util.Locale#US Locale.US}. * * @return An array of locales for which localized - *DateFormat
instances are available. + * {@code DateFormat} instances are available. */ public static Locale[] getAvailableLocales() { @@ -854,9 +854,9 @@ /** * Defines constants that are used as attribute keys in the - *AttributedCharacterIterator
returned - * fromDateFormat.formatToCharacterIterator
and as - * field identifiers inFieldPosition
. + * {@code AttributedCharacterIterator} returned + * from {@code DateFormat.formatToCharacterIterator} and as + * field identifiers in {@code FieldPosition}. ** The class also provides two methods to map * between its constants and the corresponding Calendar constants. @@ -881,13 +881,13 @@ private int calendarField; /** - * Returns the
Field
constant that corresponds to - * theCalendar
constantcalendarField
. - * If there is no direct mapping between theCalendar
- * constant and aField
, null is returned. + * Returns the {@code Field} constant that corresponds to + * the {@code Calendar} constant {@code calendarField}. + * If there is no direct mapping between the {@code Calendar} + * constant and a {@code Field}, null is returned. * - * @throws IllegalArgumentException ifcalendarField
is - * not the value of aCalendar
field constant. + * @throws IllegalArgumentException if {@code calendarField} is + * not the value of a {@code Calendar} field constant. * @param calendarField Calendar field constant * @return Field instance representing calendarField. * @see java.util.Calendar @@ -902,14 +902,14 @@ } /** - * Creates aField
. + * Creates a {@code Field}. * - * @param name the name of theField
- * @param calendarField theCalendar
constant this - *Field
corresponds to; any value, even one - * outside the range of legalCalendar
values may - * be used, but-1
should be used for values - * that don't correspond to legalCalendar
values + * @param name the name of the {@code Field} + * @param calendarField the {@code Calendar} constant this + * {@code Field} corresponds to; any value, even one + * outside the range of legal {@code Calendar} values may + * be used, but {@code -1} should be used for values + * that don't correspond to legal {@code Calendar} values */ protected Field(String name, int calendarField) { super(name); @@ -924,11 +924,11 @@ } /** - * Returns theCalendar
field associated with this + * Returns the {@code Calendar} field associated with this * attribute. For example, if this represents the hours field of - * aCalendar
, this would return - *Calendar.HOUR
. If there is no corresponding - *Calendar
constant, this will return -1. + * a {@code Calendar}, this would return + * {@code Calendar.HOUR}. If there is no corresponding + * {@code Calendar} constant, this will return -1. * * @return Calendar constant for this field * @see java.util.Calendar diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/DateFormatSymbols.java --- a/src/java.base/share/classes/java/text/DateFormatSymbols.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/DateFormatSymbols.java Tue Sep 24 09:43:43 2019 +0100 @@ -56,22 +56,22 @@ import sun.util.locale.provider.TimeZoneNameUtility; /** - *DateFormatSymbols
is a public class for encapsulating + * {@code DateFormatSymbols} is a public class for encapsulating * localizable date-time formatting data, such as the names of the * months, the names of the days of the week, and the time zone data. - *SimpleDateFormat
uses - *DateFormatSymbols
to encapsulate this information. + * {@code SimpleDateFormat} uses + * {@code DateFormatSymbols} to encapsulate this information. * *- * Typically you shouldn't use
DateFormatSymbols
directly. + * Typically you shouldn't use {@code DateFormatSymbols} directly. * Rather, you are encouraged to create a date-time formatter with the - *DateFormat
class's factory methods:getTimeInstance
, - *getDateInstance
, orgetDateTimeInstance
. - * These methods automatically create aDateFormatSymbols
for + * {@code DateFormat} class's factory methods: {@code getTimeInstance}, + * {@code getDateInstance}, or {@code getDateTimeInstance}. + * These methods automatically create a {@code DateFormatSymbols} for * the formatter so that you don't have to. After the * formatter is created, you may modify its format pattern using the - *setPattern
method. For more information about - * creating formatters usingDateFormat
's factory methods, + * {@code setPattern} method. For more information about + * creating formatters using {@code DateFormat}'s factory methods, * see {@link DateFormat}. * *@@ -88,16 +88,16 @@ * the symbols are overridden for the designated region. * *
- *
DateFormatSymbols
objects are cloneable. When you obtain - * aDateFormatSymbols
object, feel free to modify the + * {@code DateFormatSymbols} objects are cloneable. When you obtain + * a {@code DateFormatSymbols} object, feel free to modify the * date-time formatting data. For instance, you can replace the localized * date-time format pattern characters with the ones that you feel easy * to remember. Or you can change the representative cities * to your favorite ones. * *- * New
DateFormatSymbols
subclasses may be added to support - *SimpleDateFormat
for date-time formatting for additional locales. + * New {@code DateFormatSymbols} subclasses may be added to support + * {@code SimpleDateFormat} for date-time formatting for additional locales. * @see DateFormat * @see SimpleDateFormat @@ -159,7 +159,7 @@ /** * Era strings. For example: "AD" and "BC". An array of 2 strings, - * indexed byCalendar.BC
andCalendar.AD
. + * indexed by {@code Calendar.BC} and {@code Calendar.AD}. * @serial */ String eras[] = null; @@ -167,7 +167,7 @@ /** * Month strings. For example: "January", "February", etc. An array * of 13 strings (some calendars have 13 months), indexed by - *Calendar.JANUARY
,Calendar.FEBRUARY
, etc. + * {@code Calendar.JANUARY}, {@code Calendar.FEBRUARY}, etc. * @serial */ String months[] = null; @@ -175,7 +175,7 @@ /** * Short month strings. For example: "Jan", "Feb", etc. An array of * 13 strings (some calendars have 13 months), indexed by - *Calendar.JANUARY
,Calendar.FEBRUARY
, etc. + * {@code Calendar.JANUARY}, {@code Calendar.FEBRUARY}, etc. * @serial */ @@ -183,26 +183,26 @@ /** * Weekday strings. For example: "Sunday", "Monday", etc. An array - * of 8 strings, indexed byCalendar.SUNDAY
, - *Calendar.MONDAY
, etc. - * The elementweekdays[0]
is ignored. + * of 8 strings, indexed by {@code Calendar.SUNDAY}, + * {@code Calendar.MONDAY}, etc. + * The element {@code weekdays[0]} is ignored. * @serial */ String weekdays[] = null; /** * Short weekday strings. For example: "Sun", "Mon", etc. An array - * of 8 strings, indexed byCalendar.SUNDAY
, - *Calendar.MONDAY
, etc. - * The elementshortWeekdays[0]
is ignored. + * of 8 strings, indexed by {@code Calendar.SUNDAY}, + * {@code Calendar.MONDAY}, etc. + * The element {@code shortWeekdays[0]} is ignored. * @serial */ String shortWeekdays[] = null; /** * AM and PM strings. For example: "AM" and "PM". An array of - * 2 strings, indexed byCalendar.AM
and - *Calendar.PM
. + * 2 strings, indexed by {@code Calendar.AM} and + * {@code Calendar.PM}. * @serial */ String ampms[] = null; @@ -211,18 +211,18 @@ * Localized names of time zones in this locale. This is a * two-dimensional array of strings of size n by m, * where m is at least 5. Each of the n rows is an - * entry containing the localized names for a singleTimeZone
. - * Each such row contains (withi
ranging from + * entry containing the localized names for a single {@code TimeZone}. + * Each such row contains (with {@code i} ranging from * 0..n-1): *- *
* The zone ID is not localized; it's one of the valid IDs of @@ -274,8 +274,8 @@ * wish to use 'u' rather than 'y' to represent years in its date format * pattern strings. * This string must be exactly 18 characters long, with the index of - * the characters described by- - *
zoneStrings[i][0]
- time zone IDzoneStrings[i][1]
- long name of zone in standard + *- {@code zoneStrings[i][0]} - time zone ID
+ *- {@code zoneStrings[i][1]} - long name of zone in standard * time
- *zoneStrings[i][2]
- short name of zone in + *- {@code zoneStrings[i][2]} - short name of zone in * standard time
- *zoneStrings[i][3]
- long name of zone in daylight + *- {@code zoneStrings[i][3]} - long name of zone in daylight * saving time
- *zoneStrings[i][4]
- short name of zone in daylight + *- {@code zoneStrings[i][4]} - short name of zone in daylight * saving time
*DateFormat.ERA_FIELD
, - *DateFormat.YEAR_FIELD
, etc. Thus, if the string were + * the characters described by {@code DateFormat.ERA_FIELD}, + * {@code DateFormat.YEAR_FIELD}, etc. Thus, if the string were * "Xz...", then localized patterns would use 'X' for era and 'z' for year. * @serial */ @@ -295,16 +295,16 @@ /** * Returns an array of all locales for which the - *getInstance
methods of this class can return + * {@code getInstance} methods of this class can return * localized instances. * The returned array represents the union of locales supported by the * Java runtime and by installed * {@link java.text.spi.DateFormatSymbolsProvider DateFormatSymbolsProvider} - * implementations. It must contain at least aLocale
+ * implementations. It must contain at least a {@code Locale} * instance equal to {@link java.util.Locale#US Locale.US}. * * @return An array of locales for which localized - *DateFormatSymbols
instances are available. + * {@code DateFormatSymbols} instances are available. * @since 1.6 */ public static Locale[] getAvailableLocales() { @@ -314,8 +314,8 @@ } /** - * Gets theDateFormatSymbols
instance for the default - * locale. This method provides access toDateFormatSymbols
+ * Gets the {@code DateFormatSymbols} instance for the default + * locale. This method provides access to {@code DateFormatSymbols} * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DateFormatSymbolsProvider DateFormatSymbolsProvider} @@ -324,7 +324,7 @@ * getInstance(Locale.getDefault(Locale.Category.FORMAT))}. * @see java.util.Locale#getDefault(java.util.Locale.Category) * @see java.util.Locale.Category#FORMAT - * @return aDateFormatSymbols
instance. + * @return a {@code DateFormatSymbols} instance. * @since 1.6 */ public static final DateFormatSymbols getInstance() { @@ -332,15 +332,15 @@ } /** - * Gets theDateFormatSymbols
instance for the specified - * locale. This method provides access toDateFormatSymbols
+ * Gets the {@code DateFormatSymbols} instance for the specified + * locale. This method provides access to {@code DateFormatSymbols} * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DateFormatSymbolsProvider DateFormatSymbolsProvider} * implementations. * @param locale the given locale. - * @return aDateFormatSymbols
instance. - * @throws NullPointerException iflocale
is null + * @return a {@code DateFormatSymbols} instance. + * @throws NullPointerException if {@code locale} is null * @since 1.6 */ public static final DateFormatSymbols getInstance(Locale locale) { @@ -538,18 +538,18 @@ * The value returned is a * two-dimensional array of strings of size n by m, * where m is at least 5. Each of the n rows is an - * entry containing the localized names for a singleTimeZone
. - * Each such row contains (withi
ranging from + * entry containing the localized names for a single {@code TimeZone}. + * Each such row contains (with {@code i} ranging from * 0..n-1): *- *
* The zone ID is not localized; it's one of the valid IDs of @@ -559,7 +559,7 @@ * daylight saving time, the daylight saving time names should not be used. *- - *
zoneStrings[i][0]
- time zone IDzoneStrings[i][1]
- long name of zone in standard + *- {@code zoneStrings[i][0]} - time zone ID
+ *- {@code zoneStrings[i][1]} - long name of zone in standard * time
- *zoneStrings[i][2]
- short name of zone in + *- {@code zoneStrings[i][2]} - short name of zone in * standard time
- *zoneStrings[i][3]
- long name of zone in daylight + *- {@code zoneStrings[i][3]} - long name of zone in daylight * saving time
- *zoneStrings[i][4]
- short name of zone in daylight + *- {@code zoneStrings[i][4]} - short name of zone in daylight * saving time
** If {@link #setZoneStrings(String[][]) setZoneStrings} has been called - * on this
DateFormatSymbols
instance, then the strings + * on this {@code DateFormatSymbols} instance, then the strings * provided by that call are returned. Otherwise, the returned array * contains names provided by the Java runtime and by installed * {@link java.util.spi.TimeZoneNameProvider TimeZoneNameProvider} @@ -576,18 +576,18 @@ * Sets time zone strings. The argument must be a * two-dimensional array of strings of size n by m, * where m is at least 5. Each of the n rows is an - * entry containing the localized names for a singleTimeZone
. - * Each such row contains (withi
ranging from + * entry containing the localized names for a single {@code TimeZone}. + * Each such row contains (with {@code i} ranging from * 0..n-1): *- *
* The zone ID is not localized; it's one of the valid IDs of @@ -597,8 +597,8 @@ * * @param newZoneStrings the new time zone strings. * @throws IllegalArgumentException if the length of any row in - *- - *
zoneStrings[i][0]
- time zone IDzoneStrings[i][1]
- long name of zone in standard + *- {@code zoneStrings[i][0]} - time zone ID
+ *- {@code zoneStrings[i][1]} - long name of zone in standard * time
- *zoneStrings[i][2]
- short name of zone in + *- {@code zoneStrings[i][2]} - short name of zone in * standard time
- *zoneStrings[i][3]
- long name of zone in daylight + *- {@code zoneStrings[i][3]} - long name of zone in daylight * saving time
- *zoneStrings[i][4]
- short name of zone in daylight + *- {@code zoneStrings[i][4]} - short name of zone in daylight * saving time
*newZoneStrings
is less than 5 - * @throws NullPointerException ifnewZoneStrings
is null + * {@code newZoneStrings} is less than 5 + * @throws NullPointerException if {@code newZoneStrings} is null * @see #getZoneStrings() */ public void setZoneStrings(String[][] newZoneStrings) { @@ -888,7 +888,7 @@ /** * Write out the default serializable data, after ensuring the - *zoneStrings
field is initialized in order to make + * {@code zoneStrings} field is initialized in order to make * sure the backward compatibility. * * @since 1.6 diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/DigitList.java --- a/src/java.base/share/classes/java/text/DigitList.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/DigitList.java Tue Sep 24 09:43:43 2019 +0100 @@ -439,7 +439,7 @@ * java.math.RoundingMode class. * [bnf] * @param maximumDigits the number of digits to keep, from 0 to - *count-1
. If 0, then all digits are rounded away, and + * {@code count-1}. If 0, then all digits are rounded away, and * this method returns true if a one should be generated (e.g., formatting * 0.09 with "#.#"). * @param alreadyRounded whether or not rounding up has already happened. @@ -447,7 +447,7 @@ * an exact decimal representation of the value. * @throws ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY - * @return true if digitmaximumDigits-1
should be + * @return true if digit {@code maximumDigits-1} should be * incremented */ private boolean shouldRoundUp(int maximumDigits, diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/FieldPosition.java --- a/src/java.base/share/classes/java/text/FieldPosition.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/FieldPosition.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,33 +39,33 @@ package java.text; /** - *FieldPosition
is a simple class used byFormat
+ * {@code FieldPosition} is a simple class used by {@code Format} * and its subclasses to identify fields in formatted output. Fields can * be identified in two ways: **
*- By an integer constant, whose names typically end with - *
_FIELD
. The constants are defined in the various - * subclasses ofFormat
. - *- By a
Format.Field
constant, seeERA_FIELD
- * and its friends inDateFormat
for an example. + * {@code _FIELD}. The constants are defined in the various + * subclasses of {@code Format}. + *- By a {@code Format.Field} constant, see {@code ERA_FIELD} + * and its friends in {@code DateFormat} for an example. *
- *
FieldPosition
keeps track of the position of the + * {@code FieldPosition} keeps track of the position of the * field within the formatted output with two indices: the index * of the first character of the field and the index of the last * character of the field. * *- * One version of the
format
method in the various - *Format
classes requires aFieldPosition
- * object as an argument. You use thisformat
method + * One version of the {@code format} method in the various + * {@code Format} classes requires a {@code FieldPosition} + * object as an argument. You use this {@code format} method * to perform partial formatting or to get information about the * formatted output (such as the position of a field). * ** If you are interested in the positions of all attributes in the - * formatted string use the
Format
method - *formatToCharacterIterator
. + * formatted string use the {@code Format} method + * {@code formatToCharacterIterator}. * * @author Mark Davis * @since 1.1 @@ -113,9 +113,9 @@ /** * Creates a FieldPosition object for the given field constant. Fields are - * identified by constants defined in the variousFormat
+ * identified by constants defined in the various {@code Format} * subclasses. This is equivalent to calling - *new FieldPosition(attribute, -1)
. + * {@code new FieldPosition(attribute, -1)}. * * @param attribute Format.Field constant identifying a field * @since 1.4 @@ -125,16 +125,16 @@ } /** - * Creates aFieldPosition
object for the given field. + * Creates a {@code FieldPosition} object for the given field. * The field is identified by an attribute constant from one of the - *Field
subclasses as well as an integer field ID - * defined by theFormat
subclasses.Format
- * subclasses that are aware ofField
should give precedence - * toattribute
and ignorefieldID
if - *attribute
is not null. However, olderFormat
- * subclasses may not be aware ofField
and rely on - *fieldID
. If the field has no corresponding integer - * constant,fieldID
should be -1. + * {@code Field} subclasses as well as an integer field ID + * defined by the {@code Format} subclasses. {@code Format} + * subclasses that are aware of {@code Field} should give precedence + * to {@code attribute} and ignore {@code fieldID} if + * {@code attribute} is not null. However, older {@code Format} + * subclasses may not be aware of {@code Field} and rely on + * {@code fieldID}. If the field has no corresponding integer + * constant, {@code fieldID} should be -1. * * @param attribute Format.Field constant identifying a field * @param fieldID integer constant identifying a field @@ -147,7 +147,7 @@ /** * Returns the field identifier as an attribute constant - * from one of theField
subclasses. May return null if + * from one of the {@code Field} subclasses. May return null if * the field is specified only by an integer field ID. * * @return Identifier for the field @@ -206,7 +206,7 @@ } /** - * Returns aFormat.FieldDelegate
instance that is associated + * Returns a {@code Format.FieldDelegate} instance that is associated * with the FieldPosition. When the delegate is notified of the same * field the FieldPosition is associated with, the begin/end will be * adjusted. @@ -258,8 +258,8 @@ /** - * Return true if the receiver wants aFormat.Field
value and - *attribute
is equal to it. + * Return true if the receiver wants a {@code Format.Field} value and + * {@code attribute} is equal to it. */ private boolean matchesField(Format.Field attribute) { if (this.attribute != null) { @@ -269,9 +269,9 @@ } /** - * Return true if the receiver wants aFormat.Field
value and - *attribute
is equal to it, or true if the receiver - * represents an inteter constant andfield
equals it. + * Return true if the receiver wants a {@code Format.Field} value and + * {@code attribute} is equal to it, or true if the receiver + * represents an inteter constant and {@code field} equals it. */ private boolean matchesField(Format.Field attribute, int field) { if (this.attribute != null) { @@ -289,7 +289,7 @@ private class Delegate implements Format.FieldDelegate { /** * Indicates whether the field has been encountered before. If this - * is true, andformatted
is invoked, the begin/end + * is true, and {@code formatted} is invoked, the begin/end * are not updated. */ private boolean encounteredField; diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/Format.java --- a/src/java.base/share/classes/java/text/Format.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/Format.java Tue Sep 24 09:43:43 2019 +0100 @@ -41,64 +41,64 @@ import java.io.Serializable; /** - *Format
is an abstract base class for formatting locale-sensitive + * {@code Format} is an abstract base class for formatting locale-sensitive * information such as dates, messages, and numbers. * *- *
Format
defines the programming interface for formatting - * locale-sensitive objects intoString
s (the - *format
method) and for parsingString
s back - * into objects (theparseObject
method). + * {@code Format} defines the programming interface for formatting + * locale-sensitive objects into {@code String}s (the + * {@code format} method) and for parsing {@code String}s back + * into objects (the {@code parseObject} method). * *- * Generally, a format's
parseObject
method must be able to parse - * any string formatted by itsformat
method. However, there may + * Generally, a format's {@code parseObject} method must be able to parse + * any string formatted by its {@code format} method. However, there may * be exceptional cases where this is not possible. For example, a - *format
method might create two adjacent integer numbers with - * no separator in between, and in this case theparseObject
could + * {@code format} method might create two adjacent integer numbers with + * no separator in between, and in this case the {@code parseObject} could * not tell which digits belong to which number. * *Subclassing
* *- * The Java Platform provides three specialized subclasses of
Format
-- - *DateFormat
,MessageFormat
, and - *NumberFormat
--for formatting dates, messages, and numbers, + * The Java Platform provides three specialized subclasses of {@code Format}-- + * {@code DateFormat}, {@code MessageFormat}, and + * {@code NumberFormat}--for formatting dates, messages, and numbers, * respectively. ** Concrete subclasses must implement three methods: *
- *
* These general methods allow polymorphic parsing and formatting of objects - * and are used, for example, byformat(Object obj, StringBuffer toAppendTo, FieldPosition pos)
- *formatToCharacterIterator(Object obj)
- *parseObject(String source, ParsePosition pos)
+ *- {@code format(Object obj, StringBuffer toAppendTo, FieldPosition pos)} + *
- {@code formatToCharacterIterator(Object obj)} + *
- {@code parseObject(String source, ParsePosition pos)} *
MessageFormat
. - * Subclasses often also provide additionalformat
methods for - * specific input types as well asparse
methods for specific - * result types. Anyparse
method that does not take a - *ParsePosition
argument should throwParseException
+ * and are used, for example, by {@code MessageFormat}. + * Subclasses often also provide additional {@code format} methods for + * specific input types as well as {@code parse} methods for specific + * result types. Any {@code parse} method that does not take a + * {@code ParsePosition} argument should throw {@code ParseException} * when no text in the required format is at the beginning of the input text. * ** Most subclasses will also implement the following factory methods: *
*
* In addition, some subclasses may also implement other - *- - *
getInstance
for getting a useful format object appropriate + * {@code getInstance} for getting a useful format object appropriate * for the current locale *- - *
getInstance(Locale)
for getting a useful format + * {@code getInstance(Locale)} for getting a useful format * object appropriate for the specified locale *getXxxxInstance
methods for more specialized control. For - * example, theNumberFormat
class provides - *getPercentInstance
andgetCurrencyInstance
+ * {@code getXxxxInstance} methods for more specialized control. For + * example, the {@code NumberFormat} class provides + * {@code getPercentInstance} and {@code getCurrencyInstance} * methods for getting specialized number formatters. * *- * Subclasses of
Format
that allow programmers to create objects - * for locales (withgetInstance(Locale)
for example) + * Subclasses of {@code Format} that allow programmers to create objects + * for locales (with {@code getInstance(Locale)} for example) * must also implement the following class method: **@@ -112,7 +112,7 @@ * object which identifies what information is contained in the field and its * position in the formatted result. These constants should be named *item_FIELD
whereitem
identifies - * the field. For examples of these constants, seeERA_FIELD
and its + * the field. For examples of these constants, see {@code ERA_FIELD} and its * friends in {@link DateFormat}. * *Synchronization
@@ -162,18 +162,18 @@ /** * Formats an object and appends the resulting text to a given string * buffer. - * If thepos
argument identifies a field used by the format, + * If the {@code pos} argument identifies a field used by the format, * then its indices are set to the beginning and end of the first such * field encountered. * * @param obj The object to format * @param toAppendTo where the text is to be appended - * @param pos AFieldPosition
identifying a field + * @param pos A {@code FieldPosition} identifying a field * in the formatted text - * @return the string buffer passed in astoAppendTo
, + * @return the string buffer passed in as {@code toAppendTo}, * with formatted text appended - * @throws NullPointerException iftoAppendTo
or - *pos
is null + * @throws NullPointerException if {@code toAppendTo} or + * {@code pos} is null * @throws IllegalArgumentException if the Format cannot format the given * object */ @@ -182,20 +182,20 @@ FieldPosition pos); /** - * Formats an Object producing anAttributedCharacterIterator
. - * You can use the returnedAttributedCharacterIterator
+ * Formats an Object producing an {@code AttributedCharacterIterator}. + * You can use the returned {@code AttributedCharacterIterator} * to build the resulting String, as well as to determine information * about the resulting String. ** Each attribute key of the AttributedCharacterIterator will be of type - *
Field
. It is up to eachFormat
implementation + * {@code Field}. It is up to each {@code Format} implementation * to define what the legal values are for each attribute in the - *AttributedCharacterIterator
, but typically the attribute + * {@code AttributedCharacterIterator}, but typically the attribute * key is also used as the attribute value. *The default implementation creates an - *
AttributedCharacterIterator
with no attributes. Subclasses + * {@code AttributedCharacterIterator} with no attributes. Subclasses * that support fields should override this and create an - *AttributedCharacterIterator
with meaningful attributes. + * {@code AttributedCharacterIterator} with meaningful attributes. * * @throws NullPointerException if obj is null. * @throws IllegalArgumentException when the Format cannot format the @@ -212,20 +212,20 @@ * Parses text from a string to produce an object. ** The method attempts to parse text starting at the index given by - *
pos
. - * If parsing succeeds, then the index ofpos
is updated + * {@code pos}. + * If parsing succeeds, then the index of {@code pos} is updated * to the index after the last character used (parsing does not necessarily * use all characters up to the end of the string), and the parsed - * object is returned. The updatedpos
can be used to + * object is returned. The updated {@code pos} can be used to * indicate the starting point for the next call to this method. - * If an error occurs, then the index ofpos
is not - * changed, the error index ofpos
is set to the index of + * If an error occurs, then the index of {@code pos} is not + * changed, the error index of {@code pos} is set to the index of * the character where the error occurred, and null is returned. * - * @param source AString
, part of which should be parsed. - * @param pos AParsePosition
object with index and error + * @param source A {@code String}, part of which should be parsed. + * @param pos A {@code ParsePosition} object with index and error * index information as described above. - * @return AnObject
parsed from the string. In case of + * @return An {@code Object} parsed from the string. In case of * error, returns null. * @throws NullPointerException if {@code source} or {@code pos} is null. */ @@ -235,8 +235,8 @@ * Parses text from the beginning of the given string to produce an object. * The method may not use the entire text of the given string. * - * @param source AString
whose beginning should be parsed. - * @return AnObject
parsed from the string. + * @param source A {@code String} whose beginning should be parsed. + * @return An {@code Object} parsed from the string. * @throws ParseException if the beginning of the specified string * cannot be parsed. * @throws NullPointerException if {@code source} is null. @@ -271,8 +271,8 @@ // /** - * Creates anAttributedCharacterIterator
for the String - *s
. + * Creates an {@code AttributedCharacterIterator} for the String + * {@code s}. * * @param s String to create AttributedCharacterIterator from * @return AttributedCharacterIterator wrapping s @@ -284,9 +284,9 @@ } /** - * Creates anAttributedCharacterIterator
containing the + * Creates an {@code AttributedCharacterIterator} containing the * concatenated contents of the passed in - *AttributedCharacterIterator
s. + * {@code AttributedCharacterIterator}s. * * @param iterators AttributedCharacterIterators used to create resulting * AttributedCharacterIterators @@ -302,8 +302,8 @@ /** * Returns an AttributedCharacterIterator with the String - *string
and additional key/value pairkey
, - *value
. + * {@code string} and additional key/value pair {@code key}, + * {@code value}. * * @param string String to create AttributedCharacterIterator from * @param key Key for AttributedCharacterIterator @@ -321,8 +321,8 @@ /** * Creates an AttributedCharacterIterator with the contents of - *iterator
and the additional attributekey
- *value
. + * {@code iterator} and the additional attribute {@code key} + * {@code value}. * * @param iterator Initial AttributedCharacterIterator to add arg to * @param key Key for AttributedCharacterIterator @@ -341,9 +341,9 @@ /** * Defines constants that are used as attribute keys in the - *AttributedCharacterIterator
returned - * fromFormat.formatToCharacterIterator
and as - * field identifiers inFieldPosition
. + * {@code AttributedCharacterIterator} returned + * from {@code Format.formatToCharacterIterator} and as + * field identifiers in {@code FieldPosition}. * * @since 1.4 */ @@ -365,13 +365,13 @@ /** - * FieldDelegate is notified by the variousFormat
+ * FieldDelegate is notified by the various {@code Format} * implementations as they are formatting the Objects. This allows for * storage of the individual sections of the formatted String for - * later use, such as in aFieldPosition
or for an - *AttributedCharacterIterator
. + * later use, such as in a {@code FieldPosition} or for an + * {@code AttributedCharacterIterator}. *- * Delegates should NOT assume that the
Format
will notify + * Delegates should NOT assume that the {@code Format} will notify * the delegate of fields in any particular order. * * @see FieldPosition#getFieldDelegate @@ -381,7 +381,7 @@ /** * Notified when a particular region of the String is formatted. This * method will be invoked if there is no corresponding integer field id - * matchingattr
. + * matching {@code attr}. * * @param attr Identifies the field matched * @param value Value associated with the field diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/MessageFormat.java --- a/src/java.base/share/classes/java/text/MessageFormat.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/MessageFormat.java Tue Sep 24 09:43:43 2019 +0100 @@ -50,27 +50,27 @@ /** - *MessageFormat
provides a means to produce concatenated + * {@code MessageFormat} provides a means to produce concatenated * messages in a language-neutral way. Use this to construct messages * displayed for end users. * *- *
MessageFormat
takes a set of objects, formats them, then + * {@code MessageFormat} takes a set of objects, formats them, then * inserts the formatted strings into the pattern at the appropriate places. * ** Note: - *
MessageFormat
differs from the otherFormat
- * classes in that you create aMessageFormat
object with one - * of its constructors (not with agetInstance
style factory - * method). The factory methods aren't necessary becauseMessageFormat
+ * {@code MessageFormat} differs from the other {@code Format} + * classes in that you create a {@code MessageFormat} object with one + * of its constructors (not with a {@code getInstance} style factory + * method). The factory methods aren't necessary because {@code MessageFormat} * itself doesn't implement locale specific behavior. Any locale specific * behavior is defined by the pattern that you provide as well as the * subformats used for inserted arguments. * *Patterns and Their Interpretation
* - *MessageFormat
uses patterns of the following form: + * {@code MessageFormat} uses patterns of the following form: ** To format a number for a different Locale, specify it in the - * call to* MessageFormatPattern: * String @@ -102,7 +102,7 @@ * must be represented by doubled single quotes {@code ''} throughout a * String. For example, pattern string*"'{''}'"
is * interpreted as a sequence of'{
(start of quoting and a - * left curly brace),''
(a single quote), and + * left curly brace), {@code ''} (a single quote), and *}'
(a right curly brace and end of quoting), * not'{'
and'}'
(quoted left and * right curly braces): representing string"{'}"
, @@ -228,8 +228,8 @@ * static strings will, of course, be obtained from resource bundles. * Other parameters will be dynamically determined at runtime. *- * The first example uses the static method
MessageFormat.format
, - * which internally creates aMessageFormat
for one-time use: + * The first example uses the static method {@code MessageFormat.format}, + * which internally creates a {@code MessageFormat} for one-time use: ** ** int planet = 7; * String event = "a disturbance in the Force"; @@ -244,7 +244,7 @@ *- * The following example creates a
MessageFormat
instance that + * The following example creates a {@code MessageFormat} instance that * can be used repeatedly: *- * The output with different values for* int fileCount = 1273; @@ -256,7 +256,7 @@ * * System.out.println(form.format(testArgs)); *fileCount
: + * The output with different values for {@code fileCount}: ** ** The disk "MyDisk" contains 0 file(s). * The disk "MyDisk" contains 1 file(s). @@ -264,7 +264,7 @@ *- * For more sophisticated patterns, you can use a
ChoiceFormat
+ * For more sophisticated patterns, you can use a {@code ChoiceFormat} * to produce correct forms for singular and plural: *- * The output with different values for* MessageFormat form = new MessageFormat("The disk \"{1}\" contains {0}."); @@ -279,7 +279,7 @@ * * System.out.println(form.format(testArgs)); *fileCount
: + * The output with different values for {@code fileCount}: ** ** The disk "MyDisk" contains no files. * The disk "MyDisk" contains one file. @@ -287,7 +287,7 @@ *- * You can create the
ChoiceFormat
programmatically, as in the + * You can create the {@code ChoiceFormat} programmatically, as in the * above example, or by using a pattern. See {@link ChoiceFormat} * for more information. *{@code @@ -297,9 +297,9 @@ * ** Note: As we see above, the string produced - * by a
ChoiceFormat
inMessageFormat
is treated as special; + * by a {@code ChoiceFormat} in {@code MessageFormat} is treated as special; * occurrences of '{' are used to indicate subformats, and cause recursion. - * If you create both aMessageFormat
andChoiceFormat
+ * If you create both a {@code MessageFormat} and {@code ChoiceFormat} * programmatically (instead of using the string patterns), then be careful not to * produce a format that recurses on itself, which will cause an infinite loop. *@@ -398,8 +398,8 @@ *
- to the {@link #applyPattern applyPattern} * and {@link #toPattern toPattern} methods if format elements specify * a format type and therefore have the subformats created in the - *
applyPattern
method, as well as - *- to the
format
and + * {@code applyPattern} method, as well as + *- to the {@code format} and * {@link #formatToCharacterIterator formatToCharacterIterator} methods * if format elements do not specify a format type and therefore have * the subformats created in the formatting methods. @@ -596,14 +596,14 @@ /** * Sets the formats to use for the values passed into - *
format
methods or returned fromparse
- * methods. The indices of elements innewFormats
+ * {@code format} methods or returned from {@code parse} + * methods. The indices of elements in {@code newFormats} * correspond to the argument indices used in the previously set * pattern string. - * The order of formats innewFormats
thus corresponds to - * the order of elements in thearguments
array passed - * to theformat
methods or the result array returned - * by theparse
methods. + * The order of formats in {@code newFormats} thus corresponds to + * the order of elements in the {@code arguments} array passed + * to the {@code format} methods or the result array returned + * by the {@code parse} methods. ** If an argument index is used for more than one format element * in the pattern string, then the corresponding new format is used @@ -611,10 +611,10 @@ * for any format element in the pattern string, then the * corresponding new format is ignored. If fewer formats are provided * than needed, then only the formats for argument indices less - * than
newFormats.length
are replaced. + * than {@code newFormats.length} are replaced. * * @param newFormats the new formats to use - * @throws NullPointerException ifnewFormats
is null + * @throws NullPointerException if {@code newFormats} is null * @since 1.4 */ public void setFormatsByArgumentIndex(Format[] newFormats) { @@ -629,24 +629,24 @@ /** * Sets the formats to use for the format elements in the * previously set pattern string. - * The order of formats innewFormats
corresponds to + * The order of formats in {@code newFormats} corresponds to * the order of format elements in the pattern string. ** If more formats are provided than needed by the pattern string, * the remaining ones are ignored. If fewer formats are provided - * than needed, then only the first
newFormats.length
+ * than needed, then only the first {@code newFormats.length} * formats are replaced. ** Since the order of format elements in a pattern string often * changes during localization, it is generally better to use the * {@link #setFormatsByArgumentIndex setFormatsByArgumentIndex} * method, which assumes an order of formats corresponding to the - * order of elements in the
arguments
array passed to - * theformat
methods or the result array returned by - * theparse
methods. + * order of elements in the {@code arguments} array passed to + * the {@code format} methods or the result array returned by + * the {@code parse} methods. * * @param newFormats the new formats to use - * @throws NullPointerException ifnewFormats
is null + * @throws NullPointerException if {@code newFormats} is null */ public void setFormats(Format[] newFormats) { int runsToCopy = newFormats.length; @@ -663,9 +663,9 @@ * previously set pattern string that use the given argument * index. * The argument index is part of the format element definition and - * represents an index into thearguments
array passed - * to theformat
methods or the result array returned - * by theparse
methods. + * represents an index into the {@code arguments} array passed + * to the {@code format} methods or the result array returned + * by the {@code parse} methods. ** If the argument index is used for more than one format element * in the pattern string, then the new format is used for all such @@ -711,14 +711,14 @@ /** * Gets the formats used for the values passed into - *
format
methods or returned fromparse
+ * {@code format} methods or returned from {@code parse} * methods. The indices of elements in the returned array * correspond to the argument indices used in the previously set * pattern string. * The order of formats in the returned array thus corresponds to - * the order of elements in thearguments
array passed - * to theformat
methods or the result array returned - * by theparse
methods. + * the order of elements in the {@code arguments} array passed + * to the {@code format} methods or the result array returned + * by the {@code parse} methods. ** If an argument index is used for more than one format element * in the pattern string, then the format used for the last such @@ -753,9 +753,9 @@ * changes during localization, it's generally better to use the * {@link #getFormatsByArgumentIndex getFormatsByArgumentIndex} * method, which assumes an order of formats corresponding to the - * order of elements in the
arguments
array passed to - * theformat
methods or the result array returned by - * theparse
methods. + * order of elements in the {@code arguments} array passed to + * the {@code format} methods or the result array returned by + * the {@code parse} methods. * * @return the formats used for the format elements in the pattern */ @@ -766,16 +766,16 @@ } /** - * Formats an array of objects and appends theMessageFormat
's + * Formats an array of objects and appends the {@code MessageFormat}'s * pattern, with format elements replaced by the formatted objects, to the - * providedStringBuffer
. + * provided {@code StringBuffer}. ** The text substituted for the individual format elements is derived from * the current subformat of the format element and the - *
arguments
element at the format element's argument index + * {@code arguments} element at the format element's argument index * as indicated by the first matching line of the following table. An - * argument is unavailable ifarguments
is - *null
or has fewer than argumentIndex+1 elements. + * argument is unavailable if {@code arguments} is + * {@code null} or has fewer than argumentIndex+1 elements. * **
* @@ -791,36 +791,36 @@ *unavailable * "{" + argumentIndex + "}"
*- * null
- *"null"
+ *{@code null} + * {@code "null"} * - * instanceof ChoiceFormat
+ *{@code instanceof ChoiceFormat} * any * subformat.format(argument).indexOf('{') >= 0 ?
*
* (new MessageFormat(subformat.format(argument), getLocale())).format(argument) : * subformat.format(argument)- * != null
+ *{@code != null} * any - * subformat.format(argument)
+ *{@code subformat.format(argument)} * - * null
- *instanceof Number
- *NumberFormat.getInstance(getLocale()).format(argument)
+ *{@code null} + * {@code instanceof Number} + * {@code NumberFormat.getInstance(getLocale()).format(argument)} * - * instanceof Date
- *DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)
+ *{@code instanceof Date} + * {@code DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)} * - * instanceof String
- *argument
+ *{@code instanceof String} + * {@code argument} * * any - * argument.toString()
+ *{@code argument.toString()} * * - * If
pos
is non-null, and refers to - *Field.ARGUMENT
, the location of the first formatted + * If {@code pos} is non-null, and refers to + * {@code Field.ARGUMENT}, the location of the first formatted * string will be returned. * * @param arguments an array of objects to be formatted and substituted. @@ -830,7 +830,7 @@ * @return the string buffer passed in as {@code result}, with formatted * text appended * @throws IllegalArgumentException if an argument in the - *arguments
array is not of the type + * {@code arguments} array is not of the type * expected by the format element(s) that use it. * @throws NullPointerException if {@code result} is {@code null} */ @@ -851,7 +851,7 @@ * @param arguments object(s) to format * @return the formatted string * @throws IllegalArgumentException if the pattern is invalid, - * or if an argument in thearguments
array + * or if an argument in the {@code arguments} array * is not of the type expected by the format element(s) * that use it. * @throws NullPointerException if {@code pattern} is {@code null} @@ -863,9 +863,9 @@ // Overrides /** - * Formats an array of objects and appends theMessageFormat
's + * Formats an array of objects and appends the {@code MessageFormat}'s * pattern, with format elements replaced by the formatted objects, to the - * providedStringBuffer
. + * provided {@code StringBuffer}. * This is equivalent to **{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}((Object[]) arguments, result, pos)
@@ -876,7 +876,7 @@ * @param pos keeps track on the position of the first replaced argument * in the output string. * @throws IllegalArgumentException if an argument in the - *arguments
array is not of the type + * {@code arguments} array is not of the type * expected by the format element(s) that use it. * @throws NullPointerException if {@code result} is {@code null} */ @@ -888,36 +888,36 @@ /** * Formats an array of objects and inserts them into the - *MessageFormat
's pattern, producing an - *AttributedCharacterIterator
. - * You can use the returnedAttributedCharacterIterator
+ * {@code MessageFormat}'s pattern, producing an + * {@code AttributedCharacterIterator}. + * You can use the returned {@code AttributedCharacterIterator} * to build the resulting String, as well as to determine information * about the resulting String. *- * The text of the returned
AttributedCharacterIterator
is + * The text of the returned {@code AttributedCharacterIterator} is * the same that would be returned by ***{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}(arguments, new StringBuffer(), null).toString()
*- * In addition, the
AttributedCharacterIterator
contains at + * In addition, the {@code AttributedCharacterIterator} contains at * least attributes indicating where text was generated from an - * argument in thearguments
array. The keys of these attributes are of - * typeMessageFormat.Field
, their values are - *Integer
objects indicating the index in thearguments
+ * argument in the {@code arguments} array. The keys of these attributes are of + * type {@code MessageFormat.Field}, their values are + * {@code Integer} objects indicating the index in the {@code arguments} * array of the argument from which the text was generated. *- * The attributes/value from the underlying
Format
- * instances thatMessageFormat
uses will also be - * placed in the resultingAttributedCharacterIterator
. + * The attributes/value from the underlying {@code Format} + * instances that {@code MessageFormat} uses will also be + * placed in the resulting {@code AttributedCharacterIterator}. * This allows you to not only find where an argument is placed in the * resulting String, but also which fields it contains in turn. * * @param arguments an array of objects to be formatted and substituted. * @return AttributedCharacterIterator describing the formatted value. - * @throws NullPointerException ifarguments
is null. + * @throws NullPointerException if {@code arguments} is null. * @throws IllegalArgumentException if an argument in the - *arguments
array is not of the type + * {@code arguments} array is not of the type * expected by the format element(s) that use it. * @since 1.4 */ @@ -1055,8 +1055,8 @@ * See the {@link #parse(String, ParsePosition)} method for more information * on message parsing. * - * @param source AString
whose beginning should be parsed. - * @return AnObject
array parsed from the string. + * @param source A {@code String} whose beginning should be parsed. + * @return An {@code Object} array parsed from the string. * @throws ParseException if the beginning of the specified string * cannot be parsed. */ @@ -1073,23 +1073,23 @@ * Parses text from a string to produce an object array. ** The method attempts to parse text starting at the index given by - *
pos
. - * If parsing succeeds, then the index ofpos
is updated + * {@code pos}. + * If parsing succeeds, then the index of {@code pos} is updated * to the index after the last character used (parsing does not necessarily * use all characters up to the end of the string), and the parsed - * object array is returned. The updatedpos
can be used to + * object array is returned. The updated {@code pos} can be used to * indicate the starting point for the next call to this method. - * If an error occurs, then the index ofpos
is not - * changed, the error index ofpos
is set to the index of + * If an error occurs, then the index of {@code pos} is not + * changed, the error index of {@code pos} is set to the index of * the character where the error occurred, and null is returned. ** See the {@link #parse(String, ParsePosition)} method for more information * on message parsing. * - * @param source A
String
, part of which should be parsed. - * @param pos AParsePosition
object with index and error + * @param source A {@code String}, part of which should be parsed. + * @param pos A {@code ParsePosition} object with index and error * index information as described above. - * @return AnObject
array parsed from the string. In case of + * @return An {@code Object} array parsed from the string. In case of * error, returns null. * @throws NullPointerException if {@code pos} is null. */ @@ -1146,8 +1146,8 @@ /** * Defines constants that are used as attribute keys in the - *AttributedCharacterIterator
returned - * fromMessageFormat.formatToCharacterIterator
. + * {@code AttributedCharacterIterator} returned + * from {@code MessageFormat.formatToCharacterIterator}. * * @since 1.4 */ @@ -1188,9 +1188,9 @@ /** * Constant identifying a portion of a message that was generated - * from an argument passed intoformatToCharacterIterator
. - * The value associated with the key will be anInteger
- * indicating the index in thearguments
array of the + * from an argument passed into {@code formatToCharacterIterator}. + * The value associated with the key will be an {@code Integer} + * indicating the index in the {@code arguments} array of the * argument from which the text was generated. */ public static final Field ARGUMENT = @@ -1237,9 +1237,9 @@ private int[] argumentNumbers = new int[INITIAL_FORMATS]; /** - * One less than the number of entries inoffsets
. Can also be thought of - * as the index of the highest-numbered element inoffsets
that is being used. - * All of these arrays should have the same number of elements being used asoffsets
+ * One less than the number of entries in {@code offsets}. Can also be thought of + * as the index of the highest-numbered element in {@code offsets} that is being used. + * All of these arrays should have the same number of elements being used as {@code offsets} * does, and so this variable suffices to tell us how many entries are in all of them. * @serial */ @@ -1254,7 +1254,7 @@ * the first replaced argument will be set in it. * * @throws IllegalArgumentException if an argument in the - *arguments
array is not of the type + * {@code arguments} array is not of the type * expected by the format element(s) that use it. */ private StringBuffer subformat(Object[] arguments, StringBuffer result, @@ -1367,7 +1367,7 @@ /** * Convenience method to append all the characters in - *iterator
to the StringBufferresult
. + * {@code iterator} to the StringBuffer {@code result}. */ private void append(StringBuffer result, CharacterIterator iterator) { if (iterator.first() != CharacterIterator.DONE) { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/Normalizer.java --- a/src/java.base/share/classes/java/text/Normalizer.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/Normalizer.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,10 +40,10 @@ import sun.text.normalizer.NormalizerBase; /** - * This class provides the methodnormalize
which transforms Unicode + * This class provides the method {@code normalize} which transforms Unicode * text into an equivalent composed or decomposed form, allowing for easier * sorting and searching of text. - * Thenormalize
method supports the standard normalization forms + * The {@code normalize} method supports the standard normalization forms * described in * * Unicode Standard Annex #15 — Unicode Normalization Forms. @@ -88,12 +88,12 @@ * into the corresponding semantic characters. When sorting and searching, you * will often want to use these mappings. *- * The
normalize
method helps solve these problems by transforming + * The {@code normalize} method helps solve these problems by transforming * text into the canonical composed and decomposed forms as shown in the first * example above. In addition, you can have it perform compatibility * decompositions so that you can treat compatibility characters the same as * their equivalents. - * Finally, thenormalize
method rearranges accents into the + * Finally, the {@code normalize} method rearranges accents into the * proper canonical order, so that you do not have to worry about accent * rearrangement on your own. *@@ -152,7 +152,7 @@ * {@link java.text.Normalizer.Form#NFKC}, * {@link java.text.Normalizer.Form#NFKD} * @return The normalized String - * @throws NullPointerException If
src
orform
+ * @throws NullPointerException If {@code src} or {@code form} * is null. */ public static String normalize(CharSequence src, Form form) { @@ -169,7 +169,7 @@ * {@link java.text.Normalizer.Form#NFKD} * @return true if the sequence of char values is normalized; * false otherwise. - * @throws NullPointerException Ifsrc
orform
+ * @throws NullPointerException If {@code src} or {@code form} * is null. */ public static boolean isNormalized(CharSequence src, Form form) { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/NumberFormat.java --- a/src/java.base/share/classes/java/text/NumberFormat.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/NumberFormat.java Tue Sep 24 09:43:43 2019 +0100 @@ -56,13 +56,13 @@ import sun.util.locale.provider.LocaleServiceProviderPool; /** - *NumberFormat
is the abstract base class for all number + * {@code NumberFormat} is the abstract base class for all number * formats. This class provides the interface for formatting and parsing - * numbers.NumberFormat
also provides methods for determining + * numbers. {@code NumberFormat} also provides methods for determining * which locales have number formats, and what their names are. * *- *
NumberFormat
helps you to format and parse numbers for any locale. + * {@code NumberFormat} helps you to format and parse numbers for any locale. * Your code can be completely independent of the locale conventions for * decimal points, thousands-separators, or even the particular decimal * digits used, or whether the number format is even decimal. @@ -88,7 +88,7 @@ * }getInstance
. + * call to {@code getInstance}. **- * Use{@code * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); @@ -107,25 +107,25 @@ * myNumber = nf.parse(myString); * }*getInstance
orgetNumberInstance
to get the - * normal number format. UsegetIntegerInstance
to get an - * integer number format. UsegetCurrencyInstance
to get the + * Use {@code getInstance} or {@code getNumberInstance} to get the + * normal number format. Use {@code getIntegerInstance} to get an + * integer number format. Use {@code getCurrencyInstance} to get the * currency number format. Use {@code getCompactNumberInstance} to get the * compact number format to format a number in shorter form. For example, * {@code 2000} can be formatted as {@code "2K"} in - * {@link java.util.Locale#US US locale}. UsegetPercentInstance
+ * {@link java.util.Locale#US US locale}. Use {@code getPercentInstance} * to get a format for displaying percentages. With this format, a fraction * like 0.53 is displayed as 53%. * ** You can also control the display of numbers with such methods as - *
setMinimumFractionDigits
. + * {@code setMinimumFractionDigits}. * If you want even more control over the format or parsing, * or want to give your users more control, - * you can try casting theNumberFormat
you get from the factory methods + * you can try casting the {@code NumberFormat} you get from the factory methods * to a {@code DecimalFormat} or {@code CompactNumberFormat} depending on * the factory method used. This will work for the vast majority of locales; - * just remember to put it in atry
block in case you encounter + * just remember to put it in a {@code try} block in case you encounter * an unusual one. * *@@ -149,8 +149,8 @@ * point, use setParseIntegerOnly. * *
- * You can also use forms of the
parse
andformat
- * methods withParsePosition
andFieldPosition
to + * You can also use forms of the {@code parse} and {@code format} + * methods with {@code ParsePosition} and {@code FieldPosition} to * allow you to: **
- progressively parse through pieces of a string @@ -159,15 +159,15 @@ * For example, you can align numbers in two ways: *
*
- If you are using a monospaced font with spacing for alignment, - * you can pass the
FieldPosition
in your format call, with - *field
=INTEGER_FIELD
. On output, - *getEndIndex
will be set to the offset between the + * you can pass the {@code FieldPosition} in your format call, with + * {@code field} = {@code INTEGER_FIELD}. On output, + * {@code getEndIndex} will be set to the offset between the * last character of the integer and the decimal. Add * (desiredSpaceCount - getEndIndex) spaces at the front of the string. * *- If you are using proportional fonts, * instead of padding with spaces, measure the width - * of the string in pixels from the start to
getEndIndex
. + * of the string in pixels from the start to {@code getEndIndex}. * Then move the pen by * (desiredPixelWidth - widthToAlignmentPoint) before drawing the text. * It also works where there is no decimal, but possibly additional @@ -238,17 +238,17 @@ ** This implementation extracts the number's value using * {@link java.lang.Number#longValue()} for all integral type values that - * can be converted to
long
without loss of information, - * includingBigInteger
values with a + * can be converted to {@code long} without loss of information, + * including {@code BigInteger} values with a * {@link java.math.BigInteger#bitLength() bit length} of less than 64, * and {@link java.lang.Number#doubleValue()} for all other types. It * then calls * {@link #format(long,java.lang.StringBuffer,java.text.FieldPosition)} * or {@link #format(double,java.lang.StringBuffer,java.text.FieldPosition)}. * This may result in loss of magnitude information and precision for - *BigInteger
andBigDecimal
values. + * {@code BigInteger} and {@code BigDecimal} values. * @param number the number to format - * @param toAppendTo theStringBuffer
to which the formatted + * @param toAppendTo the {@code StringBuffer} to which the formatted * text is to be appended * @param pos keeps track on the position of the field within the * returned string. For example, for formatting a number @@ -258,11 +258,11 @@ * and end index of {@code fieldPosition} will be set * to 0 and 9, respectively for the output string * {@code 1,234,567.89}. - * @return the value passed in astoAppendTo
- * @throws IllegalArgumentException ifnumber
is - * null or not an instance ofNumber
. - * @throws NullPointerException iftoAppendTo
or - *pos
is null + * @return the value passed in as {@code toAppendTo} + * @throws IllegalArgumentException if {@code number} is + * null or not an instance of {@code Number}. + * @throws NullPointerException if {@code toAppendTo} or + * {@code pos} is null * @throws ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.FieldPosition @@ -285,26 +285,26 @@ } /** - * Parses text from a string to produce aNumber
. + * Parses text from a string to produce a {@code Number}. ** The method attempts to parse text starting at the index given by - *
pos
. - * If parsing succeeds, then the index ofpos
is updated + * {@code pos}. + * If parsing succeeds, then the index of {@code pos} is updated * to the index after the last character used (parsing does not necessarily * use all characters up to the end of the string), and the parsed - * number is returned. The updatedpos
can be used to + * number is returned. The updated {@code pos} can be used to * indicate the starting point for the next call to this method. - * If an error occurs, then the index ofpos
is not - * changed, the error index ofpos
is set to the index of + * If an error occurs, then the index of {@code pos} is not + * changed, the error index of {@code pos} is set to the index of * the character where the error occurred, and null is returned. ** See the {@link #parse(String, ParsePosition)} method for more information * on number parsing. * - * @param source A
String
, part of which should be parsed. - * @param pos AParsePosition
object with index and error + * @param source A {@code String}, part of which should be parsed. + * @param pos A {@code ParsePosition} object with index and error * index information as described above. - * @return ANumber
parsed from the string. In case of + * @return A {@code Number} parsed from the string. In case of * error, returns null. * @throws NullPointerException if {@code source} or {@code pos} is null. */ @@ -422,8 +422,8 @@ * See the {@link #parse(String, ParsePosition)} method for more information * on number parsing. * - * @param source AString
whose beginning should be parsed. - * @return ANumber
parsed from the string. + * @param source A {@code String} whose beginning should be parsed. + * @return A {@code Number} parsed from the string. * @throws ParseException if the beginning of the specified string * cannot be parsed. */ @@ -677,16 +677,16 @@ /** * Returns an array of all locales for which the - *get*Instance
methods of this class can return + * {@code get*Instance} methods of this class can return * localized instances. * The returned array represents the union of locales supported by the Java * runtime and by installed * {@link java.text.spi.NumberFormatProvider NumberFormatProvider} implementations. - * It must contain at least aLocale
instance equal to + * It must contain at least a {@code Locale} instance equal to * {@link java.util.Locale#US Locale.US}. * * @return An array of locales for which localized - *NumberFormat
instances are available. + * {@code NumberFormat} instances are available. */ public static Locale[] getAvailableLocales() { LocaleServiceProviderPool pool = @@ -888,9 +888,9 @@ * {@link #setCurrency(java.util.Currency) setCurrency}. ** The default implementation throws - *
UnsupportedOperationException
. + * {@code UnsupportedOperationException}. * - * @return the currency used by this number format, ornull
+ * @return the currency used by this number format, or {@code null} * @throws UnsupportedOperationException if the number format class * doesn't implement currency formatting * @since 1.4 @@ -905,12 +905,12 @@ * number of fraction digits used by the number format. ** The default implementation throws - *
UnsupportedOperationException
. + * {@code UnsupportedOperationException}. * * @param currency the new currency to be used by this number format * @throws UnsupportedOperationException if the number format class * doesn't implement currency formatting - * @throws NullPointerException ifcurrency
is null + * @throws NullPointerException if {@code currency} is null * @since 1.4 */ public void setCurrency(Currency currency) { @@ -926,7 +926,7 @@ * * @throws UnsupportedOperationException The default implementation * always throws this exception - * @return TheRoundingMode
used for this NumberFormat. + * @return The {@code RoundingMode} used for this NumberFormat. * @see #setRoundingMode(RoundingMode) * @since 1.6 */ @@ -943,8 +943,8 @@ * * @throws UnsupportedOperationException The default implementation * always throws this exception - * @throws NullPointerException ifroundingMode
is null - * @param roundingMode TheRoundingMode
to be used + * @throws NullPointerException if {@code roundingMode} is null + * @param roundingMode The {@code RoundingMode} to be used * @see #getRoundingMode() * @since 1.6 */ @@ -996,20 +996,20 @@ /** * First, read in the default serializable data. * - * Then, ifserialVersionOnStream
is less than 1, indicating that + * Then, if {@code serialVersionOnStream} is less than 1, indicating that * the stream was written by JDK 1.1, - * set theint
fields such asmaximumIntegerDigits
- * to be equal to thebyte
fields such asmaxIntegerDigits
, - * since theint
fields were not present in JDK 1.1. + * set the {@code int} fields such as {@code maximumIntegerDigits} + * to be equal to the {@code byte} fields such as {@code maxIntegerDigits}, + * since the {@code int} fields were not present in JDK 1.1. * Finally, set serialVersionOnStream back to the maximum allowed value so that * default serialization will work properly if this object is streamed out again. * - *If
minimumIntegerDigits
is greater than - *maximumIntegerDigits
orminimumFractionDigits
- * is greater thanmaximumFractionDigits
, then the stream data - * is invalid and this method throws anInvalidObjectException
. + *If {@code minimumIntegerDigits} is greater than + * {@code maximumIntegerDigits} or {@code minimumFractionDigits} + * is greater than {@code maximumFractionDigits}, then the stream data + * is invalid and this method throws an {@code InvalidObjectException}. * In addition, if any of these values is negative, then this method throws - * an
InvalidObjectException
. + * an {@code InvalidObjectException}. * * @since 1.2 */ @@ -1035,9 +1035,9 @@ /** * Write out the default serializable data, after first setting - * thebyte
fields such asmaxIntegerDigits
to be - * equal to theint
fields such asmaximumIntegerDigits
- * (or toByte.MAX_VALUE
, whichever is smaller), for compatibility + * the {@code byte} fields such as {@code maxIntegerDigits} to be + * equal to the {@code int} fields such as {@code maximumIntegerDigits} + * (or to {@code Byte.MAX_VALUE}, whichever is smaller), for compatibility * with the JDK 1.1 version of the stream format. * * @since 1.2 @@ -1076,16 +1076,16 @@ /** * The maximum number of digits allowed in the integer portion of a - * number.maxIntegerDigits
must be greater than or equal to - *minIntegerDigits
. + * number. {@code maxIntegerDigits} must be greater than or equal to + * {@code minIntegerDigits}. ** Note: This field exists only for serialization * compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new - *
int
fieldmaximumIntegerDigits
is used instead. - * When writing to a stream,maxIntegerDigits
is set to - *maximumIntegerDigits
orByte.MAX_VALUE
, + * {@code int} field {@code maximumIntegerDigits} is used instead. + * When writing to a stream, {@code maxIntegerDigits} is set to + * {@code maximumIntegerDigits} or {@code Byte.MAX_VALUE}, * whichever is smaller. When reading from a stream, this field is used - * only ifserialVersionOnStream
is less than 1. + * only if {@code serialVersionOnStream} is less than 1. * * @serial * @see #getMaximumIntegerDigits @@ -1094,16 +1094,16 @@ /** * The minimum number of digits allowed in the integer portion of a - * number.minimumIntegerDigits
must be less than or equal to - *maximumIntegerDigits
. + * number. {@code minimumIntegerDigits} must be less than or equal to + * {@code maximumIntegerDigits}. ** Note: This field exists only for serialization * compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new - *
int
fieldminimumIntegerDigits
is used instead. - * When writing to a stream,minIntegerDigits
is set to - *minimumIntegerDigits
orByte.MAX_VALUE
, + * {@code int} field {@code minimumIntegerDigits} is used instead. + * When writing to a stream, {@code minIntegerDigits} is set to + * {@code minimumIntegerDigits} or {@code Byte.MAX_VALUE}, * whichever is smaller. When reading from a stream, this field is used - * only ifserialVersionOnStream
is less than 1. + * only if {@code serialVersionOnStream} is less than 1. * * @serial * @see #getMinimumIntegerDigits @@ -1112,16 +1112,16 @@ /** * The maximum number of digits allowed in the fractional portion of a - * number.maximumFractionDigits
must be greater than or equal to - *minimumFractionDigits
. + * number. {@code maximumFractionDigits} must be greater than or equal to + * {@code minimumFractionDigits}. ** Note: This field exists only for serialization * compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new - *
int
fieldmaximumFractionDigits
is used instead. - * When writing to a stream,maxFractionDigits
is set to - *maximumFractionDigits
orByte.MAX_VALUE
, + * {@code int} field {@code maximumFractionDigits} is used instead. + * When writing to a stream, {@code maxFractionDigits} is set to + * {@code maximumFractionDigits} or {@code Byte.MAX_VALUE}, * whichever is smaller. When reading from a stream, this field is used - * only ifserialVersionOnStream
is less than 1. + * only if {@code serialVersionOnStream} is less than 1. * * @serial * @see #getMaximumFractionDigits @@ -1130,16 +1130,16 @@ /** * The minimum number of digits allowed in the fractional portion of a - * number.minimumFractionDigits
must be less than or equal to - *maximumFractionDigits
. + * number. {@code minimumFractionDigits} must be less than or equal to + * {@code maximumFractionDigits}. ** Note: This field exists only for serialization * compatibility with JDK 1.1. In Java platform 2 v1.2 and higher, the new - *
int
fieldminimumFractionDigits
is used instead. - * When writing to a stream,minFractionDigits
is set to - *minimumFractionDigits
orByte.MAX_VALUE
, + * {@code int} field {@code minimumFractionDigits} is used instead. + * When writing to a stream, {@code minFractionDigits} is set to + * {@code minimumFractionDigits} or {@code Byte.MAX_VALUE}, * whichever is smaller. When reading from a stream, this field is used - * only ifserialVersionOnStream
is less than 1. + * only if {@code serialVersionOnStream} is less than 1. * * @serial * @see #getMinimumFractionDigits @@ -1158,8 +1158,8 @@ /** * The maximum number of digits allowed in the integer portion of a - * number.maximumIntegerDigits
must be greater than or equal to - *minimumIntegerDigits
. + * number. {@code maximumIntegerDigits} must be greater than or equal to + * {@code minimumIntegerDigits}. * * @serial * @since 1.2 @@ -1169,8 +1169,8 @@ /** * The minimum number of digits allowed in the integer portion of a - * number.minimumIntegerDigits
must be less than or equal to - *maximumIntegerDigits
. + * number. {@code minimumIntegerDigits} must be less than or equal to + * {@code maximumIntegerDigits}. * * @serial * @since 1.2 @@ -1180,8 +1180,8 @@ /** * The maximum number of digits allowed in the fractional portion of a - * number.maximumFractionDigits
must be greater than or equal to - *minimumFractionDigits
. + * number. {@code maximumFractionDigits} must be greater than or equal to + * {@code minimumFractionDigits}. * * @serial * @since 1.2 @@ -1191,8 +1191,8 @@ /** * The minimum number of digits allowed in the fractional portion of a - * number.minimumFractionDigits
must be less than or equal to - *maximumFractionDigits
. + * number. {@code minimumFractionDigits} must be less than or equal to + * {@code maximumFractionDigits}. * * @serial * @since 1.2 @@ -1203,21 +1203,21 @@ static final int currentSerialVersion = 1; /** - * Describes the version ofNumberFormat
present on the stream. + * Describes the version of {@code NumberFormat} present on the stream. * Possible values are: **
- * When streaming out a- 0 (or uninitialized): the JDK 1.1 version of the stream format. - * In this version, the
int
fields such as - *maximumIntegerDigits
were not present, and thebyte
- * fields such asmaxIntegerDigits
are used instead. + * In this version, the {@code int} fields such as + * {@code maximumIntegerDigits} were not present, and the {@code byte} + * fields such as {@code maxIntegerDigits} are used instead. * *- 1: the 1.2 version of the stream format. The values of the - *
byte
fields such asmaxIntegerDigits
are ignored, - * and theint
fields such asmaximumIntegerDigits
+ * {@code byte} fields such as {@code maxIntegerDigits} are ignored, + * and the {@code int} fields such as {@code maximumIntegerDigits} * are used instead. *NumberFormat
, the most recent format - * (corresponding to the highest allowableserialVersionOnStream
) + * When streaming out a {@code NumberFormat}, the most recent format + * (corresponding to the highest allowable {@code serialVersionOnStream}) * is always written. * * @serial @@ -1236,9 +1236,9 @@ // /** * Defines constants that are used as attribute keys in the - *AttributedCharacterIterator
returned - * fromNumberFormat.formatToCharacterIterator
and as - * field identifiers inFieldPosition
. + * {@code AttributedCharacterIterator} returned + * from {@code NumberFormat.formatToCharacterIterator} and as + * field identifiers in {@code FieldPosition}. * * @since 1.4 */ diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/ParsePosition.java --- a/src/java.base/share/classes/java/text/ParsePosition.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/ParsePosition.java Tue Sep 24 09:43:43 2019 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,14 +40,14 @@ /** - *ParsePosition
is a simple class used byFormat
+ * {@code ParsePosition} is a simple class used by {@code Format} * and its subclasses to keep track of the current position during parsing. - * TheparseObject
method in the variousFormat
- * classes requires aParsePosition
object as an argument. + * The {@code parseObject} method in the various {@code Format} + * classes requires a {@code ParsePosition} object as an argument. * ** By design, as you parse through a string with different formats, - * you can use the same
ParsePosition
, since the index parameter + * you can use the same {@code ParsePosition}, since the index parameter * records the current position. * * @author Mark Davis diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/RuleBasedCollator.java --- a/src/java.base/share/classes/java/text/RuleBasedCollator.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/RuleBasedCollator.java Tue Sep 24 09:43:43 2019 +0100 @@ -43,14 +43,14 @@ import java.util.Locale; /** - * TheRuleBasedCollator
class is a concrete subclass of - *Collator
that provides a simple, data-driven, table + * The {@code RuleBasedCollator} class is a concrete subclass of + * {@code Collator} that provides a simple, data-driven, table * collator. With this class you can create a customized table-based - *Collator
.RuleBasedCollator
maps + * {@code Collator}. {@code RuleBasedCollator} maps * characters to sort keys. * *- *
RuleBasedCollator
has the following restrictions + * {@code RuleBasedCollator} has the following restrictions * for efficiency (other subclasses may be used for more complex languages) : **
- If a special collation rule controlled by a <modifier> is @@ -75,7 +75,7 @@ * [0021-002F, 003A-0040, 005B-0060, 007B-007E]). If those * characters are desired, you can put them in single quotes * (e.g. ampersand => '&'). Note that unquoted white space characters - * are ignored; e.g.
b c
is treated asbc
. + * are ignored; e.g. {@code b c} is treated as {@code bc}. *- Modifier: There are currently two modifiers that * turn on special collation rules. *
@@ -146,7 +146,7 @@ * *
- * If you produce one of these errors, aNormalization and Accents *
- *
RuleBasedCollator
automatically processes its rule table to + * {@code RuleBasedCollator} automatically processes its rule table to * include both pre-composed and combining-character versions of * accented characters. Even if the provided rule string contains only * base characters and separate combining accent characters, the pre-composed @@ -175,8 +175,8 @@ * text-argument) is not already in the sequence. * (e.g. "a < b & e < f") *RuleBasedCollator
throws - * aParseException
. + * If you produce one of these errors, a {@code RuleBasedCollator} throws + * a {@code ParseException}. * *Examples *
Simple: "< a < b < c < d" @@ -191,9 +191,9 @@ * aa, AA" * *
- * To create a
RuleBasedCollator
object with specialized - * rules tailored to your needs, you construct theRuleBasedCollator
- * with the rules contained in aString
object. For example: + * To create a {@code RuleBasedCollator} object with specialized + * rules tailored to your needs, you construct the {@code RuleBasedCollator} + * with the rules contained in a {@code String} object. For example: *** String simple = "< a< b< c< d"; @@ -218,7 +218,7 @@ ** A new collation rules string can be created by concatenating rules * strings. For example, the rules returned by {@link #getRules()} could - * be concatenated to combine multiple
RuleBasedCollator
s. + * be concatenated to combine multiple {@code RuleBasedCollator}s. * ** The following example demonstrates how to change the order of @@ -350,7 +350,7 @@ * than, greater than or equal to another string in a language. * This can be overridden in a subclass. * - * @throws NullPointerException if
source
ortarget
is null. + * @throws NullPointerException if {@code source} or {@code target} is null. */ public synchronized int compare(String source, String target) { diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/SimpleDateFormat.java --- a/src/java.base/share/classes/java/text/SimpleDateFormat.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/text/SimpleDateFormat.java Tue Sep 24 09:43:43 2019 +0100 @@ -58,19 +58,19 @@ import sun.util.locale.provider.TimeZoneNameUtility; /** - *SimpleDateFormat
is a concrete class for formatting and + * {@code SimpleDateFormat} is a concrete class for formatting and * parsing dates in a locale-sensitive manner. It allows for formatting * (date → text), parsing (text → date), and normalization. * *- *
SimpleDateFormat
allows you to start by choosing + * {@code SimpleDateFormat} allows you to start by choosing * any user-defined patterns for date-time formatting. However, you * are encouraged to create a date-time formatter with either - *getTimeInstance
,getDateInstance
, or - *getDateTimeInstance
inDateFormat
. Each + * {@code getTimeInstance}, {@code getDateInstance}, or + * {@code getDateTimeInstance} in {@code DateFormat}. Each * of these class methods can return a date/time formatter initialized * with a default format pattern. You may modify the format pattern - * using theapplyPattern
methods as desired. + * using the {@code applyPattern} methods as desired. * For more information on using these methods, see * {@link DateFormat}. * @@ -79,19 +79,19 @@ * Date and time formats are specified by date and time pattern * strings. * Within date and time pattern strings, unquoted letters from - *'A'
to'Z'
and from'a'
to - *'z'
are interpreted as pattern letters representing the + * {@code 'A'} to {@code 'Z'} and from {@code 'a'} to + * {@code 'z'} are interpreted as pattern letters representing the * components of a date or time string. - * Text can be quoted using single quotes ('
) to avoid + * Text can be quoted using single quotes ({@code '}) to avoid * interpretation. - *"''"
represents a single quote. + * {@code "''"} represents a single quote. * All other characters are not interpreted; they're simply copied into the * output string during formatting or matched against the input string * during parsing. ** The following pattern letters are defined (all other characters from - *
'A'
to'Z'
and from'a'
to - *'z'
are reserved): + * {@code 'A'} to {@code 'Z'} and from {@code 'a'} to + * {@code 'z'} are reserved): **@@ -247,11 +247,11 @@ * digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to * Jan 11, 12 A.D. **
* @@ -104,120 +104,120 @@ * * *- * G
+ *{@code G} * Era designator * Text - * AD
+ *{@code AD} * - * y
+ *{@code y} * Year * Year - * 1996
;96
+ *{@code 1996}; {@code 96} * - * Y
+ *{@code Y} * Week year * Year - * 2009
;09
+ *{@code 2009}; {@code 09} * - * M
+ *{@code M} * Month in year (context sensitive) * Month - * July
;Jul
;07
+ *{@code July}; {@code Jul}; {@code 07} * - * L
+ *{@code L} * Month in year (standalone form) * Month - * July
;Jul
;07
+ *{@code July}; {@code Jul}; {@code 07} * - * w
+ *{@code w} * Week in year * Number - * 27
+ *{@code 27} * - * W
+ *{@code W} * Week in month * Number - * 2
+ *{@code 2} * - * D
+ *{@code D} * Day in year * Number - * 189
+ *{@code 189} * - * d
+ *{@code d} * Day in month * Number - * 10
+ *{@code 10} * - * F
+ *{@code F} * Day of week in month * Number - * 2
+ *{@code 2} * - * E
+ *{@code E} * Day name in week * Text - * Tuesday
;Tue
+ *{@code Tuesday}; {@code Tue} * - * u
+ *{@code u} * Day number of week (1 = Monday, ..., 7 = Sunday) * Number - * 1
+ *{@code 1} * - * a
+ *{@code a} * Am/pm marker * Text - * PM
+ *{@code PM} * - * H
+ *{@code H} * Hour in day (0-23) * Number - * 0
+ *{@code 0} * - * k
+ *{@code k} * Hour in day (1-24) * Number - * 24
+ *{@code 24} * - * K
+ *{@code K} * Hour in am/pm (0-11) * Number - * 0
+ *{@code 0} * - * h
+ *{@code h} * Hour in am/pm (1-12) * Number - * 12
+ *{@code 12} * - * m
+ *{@code m} * Minute in hour * Number - * 30
+ *{@code 30} * - * s
+ *{@code s} * Second in minute * Number - * 55
+ *{@code 55} * - * S
+ *{@code S} * Millisecond * Number - * 978
+ *{@code 978} * - * z
+ *{@code z} * Time zone * General time zone - * Pacific Standard Time
;PST
;GMT-08:00
+ *{@code Pacific Standard Time}; {@code PST}; {@code GMT-08:00} * - * Z
+ *{@code Z} * Time zone * RFC 822 time zone - * -0800
+ *{@code -0800} * - * *X
+ *{@code X} * Time zone * ISO 8601 time zone - * -08
;-0800
;-08:00
+ *{@code -08}; {@code -0800}; {@code -08:00} * - For parsing with the abbreviated year pattern ("y" or "yy"), - *
SimpleDateFormat
must interpret the abbreviated year + * {@code SimpleDateFormat} must interpret the abbreviated year * relative to some century. It does this by adjusting dates to be - * within 80 years before and 20 years after the time theSimpleDateFormat
+ * within 80 years before and 20 years after the time the {@code SimpleDateFormat} * instance is created. For example, using a pattern of "MM/dd/yy" and a - *SimpleDateFormat
instance created on Jan 1, 1997, the string + * {@code SimpleDateFormat} instance created on Jan 1, 1997, the string * "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64" * would be interpreted as May 4, 1964. * During parsing, only strings consisting of exactly two digits, as defined by @@ -303,16 +303,16 @@ * following syntax is used: ** GMTOffsetTimeZone: - *+ * {@code 0 1 2 3 4 5 6 7 8 9}GMT
Sign Hours:
Minutes + * {@code GMT} Sign Hours {@code :} Minutes * Sign: one of - *+ -
+ * {@code + -} * Hours: * Digit * Digit Digit * Minutes: * Digit Digit * Digit: one of - *0 1 2 3 4 5 6 7 8 9
SimpleDateFormat
also supports localized date and time
+ * {@code SimpleDateFormat} also supports localized date and time
* pattern strings. In these strings, the pattern letters described above
* may be replaced with other, locale dependent, pattern letters.
- * SimpleDateFormat
does not deal with the localization of text
+ * {@code SimpleDateFormat} does not deal with the localization of text
* other than the pattern letters; that's up to the client of the class.
*
* "yyyy.MM.dd G 'at' HH:mm:ss z"
- * 2001.07.04 AD at 12:08:56 PDT
+ * "EEE, MMM d, ''yy"
- * Wed, Jul 4, '01
+ * "h:mm a"
- * 12:08 PM
+ * "hh 'o''clock' a, zzzz"
- * 12 o'clock PM, Pacific Daylight Time
+ * "K:mm a, z"
- * 0:08 PM, PDT
+ * "yyyyy.MMMMM.dd GGG hh:mm aaa"
- * 02001.July.04 AD 12:08 PM
+ * "EEE, d MMM yyyy HH:mm:ss Z"
- * Wed, 4 Jul 2001 12:08:56 -0700
+ * "yyMMddHHmmssZ"
- * 010704120856-0700
+ * "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
- * 2001-07-04T12:08:56.235-0700
+ * "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
- * 2001-07-04T12:08:56.235-07:00
+ * "YYYY-'W'ww-u"
- * 2001-W27-3
+ * defaultCenturyStart
on stream.
+ * has no {@code defaultCenturyStart} on stream.
* defaultCenturyStart
.
+ * {@code defaultCenturyStart}.
* serialVersionOnStream
+ * and the highest allowable {@code serialVersionOnStream}
* is written.
* @serial
* @since 1.1.4
@@ -523,7 +523,7 @@
/**
* We map dates with two-digit years into the century starting at
- * defaultCenturyStart
, which may be any date. May
+ * {@code defaultCenturyStart}, which may be any date. May
* not be null.
* @serial
* @since 1.1.4
@@ -546,8 +546,8 @@
/**
* The Locale used to instantiate this
- * SimpleDateFormat
. The value may be null if this object
- * has been created by an older SimpleDateFormat
and
+ * {@code SimpleDateFormat}. The value may be null if this object
+ * has been created by an older {@code SimpleDateFormat} and
* deserialized.
*
* @serial
@@ -556,7 +556,7 @@
private Locale locale;
/**
- * Indicates whether this SimpleDateFormat
should use
+ * Indicates whether this {@code SimpleDateFormat} should use
* the DateFormatSymbols. If true, the format and parse methods
* use the DateFormatSymbols values. If false, the format and
* parse methods call Calendar.getDisplayName or
@@ -565,7 +565,7 @@
transient boolean useDateFormatSymbols;
/**
- * Constructs a SimpleDateFormat
using the default pattern and
+ * Constructs a {@code SimpleDateFormat} using the default pattern and
* date format symbols for the default
* {@link java.util.Locale.Category#FORMAT FORMAT} locale.
* Note: This constructor may not support all locales.
@@ -579,7 +579,7 @@
}
/**
- * Constructs a SimpleDateFormat
using the given pattern and
+ * Constructs a {@code SimpleDateFormat} using the given pattern and
* the default date format symbols for the default
* {@link java.util.Locale.Category#FORMAT FORMAT} locale.
* Note: This constructor may not support all locales.
@@ -601,7 +601,7 @@
}
/**
- * Constructs a SimpleDateFormat
using the given pattern and
+ * Constructs a {@code SimpleDateFormat} using the given pattern and
* the default date format symbols for the given locale.
* Note: This constructor may not support all locales.
* For full coverage, use the factory methods in the {@link DateFormat}
@@ -626,7 +626,7 @@
}
/**
- * Constructs a SimpleDateFormat
using the given pattern and
+ * Constructs a {@code SimpleDateFormat} using the given pattern and
* date format symbols.
*
* @param pattern the pattern describing the date and time format
@@ -916,7 +916,7 @@
* to begin on the date the user specifies.
*
* @param startDate During parsing, two digit years will be placed in the range
- * startDate
to startDate + 100 years
.
+ * {@code startDate} to {@code startDate + 100 years}.
* @see #get2DigitYearStart
* @throws NullPointerException if {@code startDate} is {@code null}.
* @since 1.2
@@ -939,8 +939,8 @@
}
/**
- * Formats the given Date
into a date/time string and appends
- * the result to the given StringBuffer
.
+ * Formats the given {@code Date} into a date/time string and appends
+ * the result to the given {@code StringBuffer}.
*
* @param date the date-time value to be formatted into a date-time string.
* @param toAppendTo where the new date-time text is to be appended.
@@ -1003,13 +1003,13 @@
}
/**
- * Formats an Object producing an AttributedCharacterIterator
.
- * You can use the returned AttributedCharacterIterator
+ * Formats an Object producing an {@code AttributedCharacterIterator}.
+ * You can use the returned {@code AttributedCharacterIterator}
* to build the resulting String, as well as to determine information
* about the resulting String.
*
* Each attribute key of the AttributedCharacterIterator will be of type
- * DateFormat.Field
, with the corresponding attribute value
+ * {@code DateFormat.Field}, with the corresponding attribute value
* being the same as the attribute key.
*
* @throws NullPointerException if obj is null.
@@ -1427,17 +1427,17 @@
/**
- * Parses text from a string to produce a Date
.
+ * Parses text from a string to produce a {@code Date}.
*
* The method attempts to parse text starting at the index given by
- * pos
.
- * If parsing succeeds, then the index of pos
is updated
+ * {@code pos}.
+ * If parsing succeeds, then the index of {@code pos} is updated
* to the index after the last character used (parsing does not necessarily
* use all characters up to the end of the string), and the parsed
- * date is returned. The updated pos
can be used to
+ * date is returned. The updated {@code pos} can be used to
* indicate the starting point for the next call to this method.
- * If an error occurs, then the index of pos
is not
- * changed, the error index of pos
is set to the index of
+ * If an error occurs, then the index of {@code pos} is not
+ * changed, the error index of {@code pos} is set to the index of
* the character where the error occurred, and null is returned.
*
*
This parsing operation uses the {@link DateFormat#calendar
@@ -1454,12 +1454,12 @@
* {@link #setTimeZone(java.util.TimeZone) setTimeZone} may need
* to be restored for further operations.
*
- * @param text A String
, part of which should be parsed.
- * @param pos A ParsePosition
object with index and error
+ * @param text A {@code String}, part of which should be parsed.
+ * @param pos A {@code ParsePosition} object with index and error
* index information as described above.
- * @return A Date
parsed from the string. In case of
+ * @return A {@code Date} parsed from the string. In case of
* error, returns null.
- * @throws NullPointerException if text
or pos
is null.
+ * @throws NullPointerException if {@code text} or {@code pos} is null.
*/
@Override
public Date parse(String text, ParsePosition pos)
@@ -2393,10 +2393,10 @@
}
/**
- * Creates a copy of this SimpleDateFormat
. This also
+ * Creates a copy of this {@code SimpleDateFormat}. This also
* clones the format's date format symbols.
*
- * @return a clone of this SimpleDateFormat
+ * @return a clone of this {@code SimpleDateFormat}
*/
@Override
public Object clone() {
@@ -2406,9 +2406,9 @@
}
/**
- * Returns the hash code value for this SimpleDateFormat
object.
+ * Returns the hash code value for this {@code SimpleDateFormat} object.
*
- * @return the hash code value for this SimpleDateFormat
object.
+ * @return the hash code value for this {@code SimpleDateFormat} object.
*/
@Override
public int hashCode()
@@ -2418,11 +2418,11 @@
}
/**
- * Compares the given object with this SimpleDateFormat
for
+ * Compares the given object with this {@code SimpleDateFormat} for
* equality.
*
* @return true if the given object is equal to this
- * SimpleDateFormat
+ * {@code SimpleDateFormat}
*/
@Override
public boolean equals(Object obj)
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/StringCharacterIterator.java
--- a/src/java.base/share/classes/java/text/StringCharacterIterator.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/StringCharacterIterator.java Tue Sep 24 09:43:43 2019 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,10 +41,10 @@
package java.text;
/**
- * StringCharacterIterator
implements the
- * CharacterIterator
protocol for a String
.
- * The StringCharacterIterator
class iterates over the
- * entire String
.
+ * {@code StringCharacterIterator} implements the
+ * {@code CharacterIterator} protocol for a {@code String}.
+ * The {@code StringCharacterIterator} class iterates over the
+ * entire {@code String}.
*
* @see CharacterIterator
* @since 1.1
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/spi/BreakIteratorProvider.java
--- a/src/java.base/share/classes/java/text/spi/BreakIteratorProvider.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/spi/BreakIteratorProvider.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,13 +46,13 @@
}
/**
- * Returns a new BreakIterator
instance
+ * Returns a new {@code BreakIterator} instance
* for word breaks
* for the given locale.
* @param locale the desired locale
* @return A break iterator for word breaks
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -61,13 +61,13 @@
public abstract BreakIterator getWordInstance(Locale locale);
/**
- * Returns a new BreakIterator
instance
+ * Returns a new {@code BreakIterator} instance
* for line breaks
* for the given locale.
* @param locale the desired locale
* @return A break iterator for line breaks
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -76,13 +76,13 @@
public abstract BreakIterator getLineInstance(Locale locale);
/**
- * Returns a new BreakIterator
instance
+ * Returns a new {@code BreakIterator} instance
* for character breaks
* for the given locale.
* @param locale the desired locale
* @return A break iterator for character breaks
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -91,13 +91,13 @@
public abstract BreakIterator getCharacterInstance(Locale locale);
/**
- * Returns a new BreakIterator
instance
+ * Returns a new {@code BreakIterator} instance
* for sentence breaks
* for the given locale.
* @param locale the desired locale
* @return A break iterator for sentence breaks
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/spi/CollatorProvider.java
--- a/src/java.base/share/classes/java/text/spi/CollatorProvider.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/spi/CollatorProvider.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,12 +46,12 @@
}
/**
- * Returns a new Collator
instance for the specified locale.
+ * Returns a new {@code Collator} instance for the specified locale.
* @param locale the desired locale.
- * @return the Collator
for the desired locale.
+ * @return the {@code Collator} for the desired locale.
* @throws NullPointerException if
- * locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/spi/DateFormatProvider.java
--- a/src/java.base/share/classes/java/text/spi/DateFormatProvider.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/spi/DateFormatProvider.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,7 +46,7 @@
}
/**
- * Returns a new DateFormat
instance which formats time
+ * Returns a new {@code DateFormat} instance which formats time
* with the given formatting style for the specified locale.
* @param style the given formatting style. Either one of
* {@link java.text.DateFormat#SHORT DateFormat.SHORT},
@@ -54,19 +54,19 @@
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
* @param locale the desired locale.
- * @throws IllegalArgumentException if style
is invalid,
- * or if locale
isn't
+ * @throws IllegalArgumentException if {@code style} is invalid,
+ * or if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @throws NullPointerException if locale
is null
+ * @throws NullPointerException if {@code locale} is null
* @return a time formatter.
* @see java.text.DateFormat#getTimeInstance(int, java.util.Locale)
*/
public abstract DateFormat getTimeInstance(int style, Locale locale);
/**
- * Returns a new DateFormat
instance which formats date
+ * Returns a new {@code DateFormat} instance which formats date
* with the given formatting style for the specified locale.
* @param style the given formatting style. Either one of
* {@link java.text.DateFormat#SHORT DateFormat.SHORT},
@@ -74,19 +74,19 @@
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
* @param locale the desired locale.
- * @throws IllegalArgumentException if style
is invalid,
- * or if locale
isn't
+ * @throws IllegalArgumentException if {@code style} is invalid,
+ * or if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @throws NullPointerException if locale
is null
+ * @throws NullPointerException if {@code locale} is null
* @return a date formatter.
* @see java.text.DateFormat#getDateInstance(int, java.util.Locale)
*/
public abstract DateFormat getDateInstance(int style, Locale locale);
/**
- * Returns a new DateFormat
instance which formats date and time
+ * Returns a new {@code DateFormat} instance which formats date and time
* with the given formatting style for the specified locale.
* @param dateStyle the given date formatting style. Either one of
* {@link java.text.DateFormat#SHORT DateFormat.SHORT},
@@ -99,13 +99,13 @@
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
* @param locale the desired locale.
- * @throws IllegalArgumentException if dateStyle
or
- * timeStyle
is invalid,
- * or if locale
isn't
+ * @throws IllegalArgumentException if {@code dateStyle} or
+ * {@code timeStyle} is invalid,
+ * or if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @throws NullPointerException if locale
is null
+ * @throws NullPointerException if {@code locale} is null
* @return a date/time formatter.
* @see java.text.DateFormat#getDateTimeInstance(int, int, java.util.Locale)
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/spi/DateFormatSymbolsProvider.java
--- a/src/java.base/share/classes/java/text/spi/DateFormatSymbolsProvider.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/spi/DateFormatSymbolsProvider.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,16 +46,16 @@
}
/**
- * Returns a new DateFormatSymbols
instance for the
+ * Returns a new {@code DateFormatSymbols} instance for the
* specified locale.
*
* @param locale the desired locale
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @return a DateFormatSymbols
instance.
+ * @return a {@code DateFormatSymbols} instance.
* @see java.text.DateFormatSymbols#getInstance(java.util.Locale)
*/
public abstract DateFormatSymbols getInstance(Locale locale);
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java
--- a/src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java Tue Sep 24 09:43:43 2019 +0100
@@ -56,16 +56,16 @@
}
/**
- * Returns a new DecimalFormatSymbols
instance for the
+ * Returns a new {@code DecimalFormatSymbols} instance for the
* specified locale.
*
* @param locale the desired locale
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
- * @return a DecimalFormatSymbols
instance.
+ * @return a {@code DecimalFormatSymbols} instance.
* @see java.text.DecimalFormatSymbols#getInstance(java.util.Locale)
*/
public abstract DecimalFormatSymbols getInstance(Locale locale);
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/text/spi/NumberFormatProvider.java
--- a/src/java.base/share/classes/java/text/spi/NumberFormatProvider.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/text/spi/NumberFormatProvider.java Tue Sep 24 09:43:43 2019 +0100
@@ -46,12 +46,12 @@
}
/**
- * Returns a new NumberFormat
instance which formats
+ * Returns a new {@code NumberFormat} instance which formats
* monetary values for the specified locale.
*
* @param locale the desired locale.
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -61,7 +61,7 @@
public abstract NumberFormat getCurrencyInstance(Locale locale);
/**
- * Returns a new NumberFormat
instance which formats
+ * Returns a new {@code NumberFormat} instance which formats
* integer values for the specified locale.
* The returned number format is configured to
* round floating point numbers to the nearest integer using
@@ -71,8 +71,8 @@
* java.text.NumberFormat#isParseIntegerOnly isParseIntegerOnly}).
*
* @param locale the desired locale
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -82,12 +82,12 @@
public abstract NumberFormat getIntegerInstance(Locale locale);
/**
- * Returns a new general-purpose NumberFormat
instance for
+ * Returns a new general-purpose {@code NumberFormat} instance for
* the specified locale.
*
* @param locale the desired locale
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@@ -97,12 +97,12 @@
public abstract NumberFormat getNumberInstance(Locale locale);
/**
- * Returns a new NumberFormat
instance which formats
+ * Returns a new {@code NumberFormat} instance which formats
* percentage values for the specified locale.
*
* @param locale the desired locale
- * @throws NullPointerException if locale
is null
- * @throws IllegalArgumentException if locale
isn't
+ * @throws NullPointerException if {@code locale} is null
+ * @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/time/ZoneId.java
--- a/src/java.base/share/classes/java/time/ZoneId.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/time/ZoneId.java Tue Sep 24 09:43:43 2019 +0100
@@ -339,7 +339,7 @@
* The rules of the returned {@code ZoneId} will be equivalent to the
* parsed {@code ZoneOffset}.
*
[A-Za-z][A-Za-z0-9~/._+-]+
+ * match the regular expression {@code [A-Za-z][A-Za-z0-9~/._+-]+}
* otherwise a {@code DateTimeException} is thrown. If the zone ID is not
* in the configured set of IDs, {@code ZoneRulesException} is thrown.
* The detailed format of the region ID depends on the group supplying the data.
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/util/Calendar.java
--- a/src/java.base/share/classes/java/util/Calendar.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/util/Calendar.java Tue Sep 24 09:43:43 2019 +0100
@@ -62,10 +62,10 @@
import sun.util.spi.CalendarProvider;
/**
- * The Calendar
class is an abstract class that provides methods
+ * The {@code Calendar} class is an abstract class that provides methods
* for converting between a specific instant in time and a set of {@link
- * #fields calendar fields} such as YEAR
, MONTH
,
- * DAY_OF_MONTH
, HOUR
, and so on, and for
+ * #fields calendar fields} such as {@code YEAR}, {@code MONTH},
+ * {@code DAY_OF_MONTH}, {@code HOUR}, and so on, and for
* manipulating the calendar fields, such as getting the date of the next
* week. An instant in time can be represented by a millisecond value that is
* an offset from the Epoch, January 1, 1970
@@ -73,13 +73,13 @@
*
* The class also provides additional fields and methods for
* implementing a concrete calendar system outside the package. Those
- * fields and methods are defined as protected
.
+ * fields and methods are defined as {@code protected}.
*
*
- * Like other locale-sensitive classes, Calendar
provides a
- * class method, getInstance
, for getting a generally useful
- * object of this type. Calendar
's getInstance
method
- * returns a Calendar
object whose
+ * Like other locale-sensitive classes, {@code Calendar} provides a
+ * class method, {@code getInstance}, for getting a generally useful
+ * object of this type. {@code Calendar}'s {@code getInstance} method
+ * returns a {@code Calendar} object whose
* calendar fields have been initialized with the current date and time:
*
** - *@@ -87,47 +87,47 @@ **
A Calendar
object can produce all the calendar field values
+ *
A {@code Calendar} object can produce all the calendar field values
* needed to implement the date-time formatting for a particular language and
* calendar style (for example, Japanese-Gregorian, Japanese-Traditional).
- * Calendar
defines the range of values returned by
+ * {@code Calendar} defines the range of values returned by
* certain calendar fields, as well as their meaning. For example,
* the first month of the calendar system has value MONTH ==
* JANUARY
for all calendars. Other values are defined by the
- * concrete subclass, such as ERA
. See individual field
+ * concrete subclass, such as {@code ERA}. See individual field
* documentation and subclass documentation for details.
*
*
The calendar field values can be set by calling the set
- * methods. Any field values set in a Calendar
will not be
+ *
The calendar field values can be set by calling the {@code set}
+ * methods. Any field values set in a {@code Calendar} will not be
* interpreted until it needs to calculate its time value (milliseconds from
* the Epoch) or values of the calendar fields. Calling the
- * get
, getTimeInMillis
, getTime
,
- * add
and roll
involves such calculation.
+ * {@code get}, {@code getTimeInMillis}, {@code getTime},
+ * {@code add} and {@code roll} involves such calculation.
*
*
Calendar
has two modes for interpreting the calendar
+ *
{@code Calendar} has two modes for interpreting the calendar
* fields, lenient and non-lenient. When a
- * Calendar
is in lenient mode, it accepts a wider range of
- * calendar field values than it produces. When a Calendar
- * recomputes calendar field values for return by get()
, all of
+ * {@code Calendar} is in lenient mode, it accepts a wider range of
+ * calendar field values than it produces. When a {@code Calendar}
+ * recomputes calendar field values for return by {@code get()}, all of
* the calendar fields are normalized. For example, a lenient
- * GregorianCalendar
interprets MONTH == JANUARY
,
- * DAY_OF_MONTH == 32
as February 1.
+ * {@code GregorianCalendar} interprets {@code MONTH == JANUARY},
+ * {@code DAY_OF_MONTH == 32} as February 1.
- *
When a Calendar
is in non-lenient mode, it throws an
+ *
When a {@code Calendar} is in non-lenient mode, it throws an
* exception if there is any inconsistency in its calendar fields. For
- * example, a GregorianCalendar
always produces
- * DAY_OF_MONTH
values between 1 and the length of the month. A
- * non-lenient GregorianCalendar
throws an exception upon
+ * example, a {@code GregorianCalendar} always produces
+ * {@code DAY_OF_MONTH} values between 1 and the length of the month. A
+ * non-lenient {@code GregorianCalendar} throws an exception upon
* calculating its time or calendar field values if any out-of-range field
* value has been set.
*
*
Calendar
defines a locale-specific seven day week using two
+ * {@code Calendar} defines a locale-specific seven day week using two
* parameters: the first day of the week and the minimal days in first week
* (from 1 to 7). These numbers are taken from the locale resource data or the
* locale itself when a {@code Calendar} is constructed. If the designated
@@ -138,15 +138,15 @@
* They may also be specified explicitly through the methods for setting their
* values.
*
- * When setting or getting the WEEK_OF_MONTH
or
- * WEEK_OF_YEAR
fields, Calendar
must determine the
+ *
When setting or getting the {@code WEEK_OF_MONTH} or
+ * {@code WEEK_OF_YEAR} fields, {@code Calendar} must determine the
* first week of the month or year as a reference point. The first week of a
* month or year is defined as the earliest seven day period beginning on
- * getFirstDayOfWeek()
and containing at least
- * getMinimalDaysInFirstWeek()
days of that month or year. Weeks
+ * {@code getFirstDayOfWeek()} and containing at least
+ * {@code getMinimalDaysInFirstWeek()} days of that month or year. Weeks
* numbered ..., -1, 0 precede the first week; weeks numbered 2, 3,... follow
- * it. Note that the normalized numbering returned by get()
may be
- * different. For example, a specific Calendar
subclass may
+ * it. Note that the normalized numbering returned by {@code get()} may be
+ * different. For example, a specific {@code Calendar} subclass may
* designate the week before week 1 of a year as week n
of
* the previous year.
*
@@ -156,12 +156,12 @@
* may be insufficient information for the computation (such as only
* year and month with no day of month), or there may be inconsistent
* information (such as Tuesday, July 15, 1996 (Gregorian) -- July 15,
- * 1996 is actually a Monday). Calendar
will resolve
+ * 1996 is actually a Monday). {@code Calendar} will resolve
* calendar field values to determine the date and time in the
* following way.
*
*
If there is any conflict in calendar field values,
- * Calendar
gives priorities to calendar fields that have been set
+ * {@code Calendar} gives priorities to calendar fields that have been set
* more recently. The following are the default combinations of the
* calendar fields. The most recent combination, as determined by the
* most recently set single field, will be used.
@@ -184,11 +184,11 @@
*
*
*
If there are any calendar fields whose values haven't been set in the selected
- * field combination, Calendar
uses their default values. The default
+ * field combination, {@code Calendar} uses their default values. The default
* value of each field may vary by concrete calendar systems. For example, in
- * GregorianCalendar
, the default of a field is the same as that
- * of the start of the Epoch: i.e., YEAR = 1970
, MONTH =
- * JANUARY
, DAY_OF_MONTH = 1
, etc.
+ * {@code GregorianCalendar}, the default of a field is the same as that
+ * of the start of the Epoch: i.e., {@code YEAR = 1970}, MONTH =
+ * JANUARY
, {@code DAY_OF_MONTH = 1}, etc.
*
*
* Note: There are certain possible ambiguities in @@ -213,98 +213,98 @@ *
set()
, add()
, and roll()
.
+ * {@code set()}, {@code add()}, and {@code roll()}.
*
- * set(f, value)
changes calendar field
- * f
to value
. In addition, it sets an
- * internal member variable to indicate that calendar field f
has
- * been changed. Although calendar field f
is changed immediately,
+ *
{@code set(f, value)} changes calendar field
+ * {@code f} to {@code value}. In addition, it sets an
+ * internal member variable to indicate that calendar field {@code f} has
+ * been changed. Although calendar field {@code f} is changed immediately,
* the calendar's time value in milliseconds is not recomputed until the next call to
- * get()
, getTime()
, getTimeInMillis()
,
- * add()
, or roll()
is made. Thus, multiple calls to
- * set()
do not trigger multiple, unnecessary
+ * {@code get()}, {@code getTime()}, {@code getTimeInMillis()},
+ * {@code add()}, or {@code roll()} is made. Thus, multiple calls to
+ * {@code set()} do not trigger multiple, unnecessary
* computations. As a result of changing a calendar field using
- * set()
, other calendar fields may also change, depending on the
+ * {@code set()}, other calendar fields may also change, depending on the
* calendar field, the calendar field value, and the calendar system. In addition,
- * get(f)
will not necessarily return value
set by
- * the call to the set
method
+ * {@code get(f)} will not necessarily return {@code value} set by
+ * the call to the {@code set} method
* after the calendar fields have been recomputed. The specifics are determined by
* the concrete calendar class.
Example: Consider a GregorianCalendar
+ *
Example: Consider a {@code GregorianCalendar}
* originally set to August 31, 1999. Calling set(Calendar.MONTH,
* Calendar.SEPTEMBER)
sets the date to September 31,
* 1999. This is a temporary internal representation that resolves to
- * October 1, 1999 if getTime()
is then called. However, a
- * call to set(Calendar.DAY_OF_MONTH, 30)
before the call to
- * getTime()
sets the date to September 30, 1999, since
- * no recomputation occurs after set()
itself.
{@code add(f, delta)} adds {@code delta}
+ * to field {@code f}. This is equivalent to calling Add rule 1. The value of field Add rule 1. The value of field {@code f}
+ * after the call minus the value of field {@code f} before the
+ * call is {@code delta}, modulo any overflow that has occurred in
+ * field {@code f}. Overflow occurs when a field value exceeds its
* range and, as a result, the next larger field is incremented or
* decremented and the field value is adjusted back into its range. Add rule 2. If a smaller field is expected to be
* invariant, but it is impossible for it to be equal to its
* prior value because of changes in its minimum or maximum after field
- * In addition, unlike In addition, unlike {@code set()}, {@code add()} forces
* an immediate recomputation of the calendar's milliseconds and all
* fields. Example: Consider a Example: Consider a {@code GregorianCalendar}
* originally set to August 31, 1999. Calling add(f, delta)
adds delta
- * to field f
. This is equivalent to calling set(f,
+ *
set(f,
* get(f) + delta)
with two adjustments:
- *
*
- * f
- * after the call minus the value of field f
before the
- * call is delta
, modulo any overflow that has occurred in
- * field f
. Overflow occurs when a field value exceeds its
+ * f
is changed or other constraints, such as time zone
+ * {@code f} is changed or other constraints, such as time zone
* offset changes, then its value is adjusted to be as close
* as possible to its expected value. A smaller field represents a
- * smaller unit of time. HOUR
is a smaller field than
- * DAY_OF_MONTH
. No adjustment is made to smaller fields
+ * smaller unit of time. {@code HOUR} is a smaller field than
+ * {@code DAY_OF_MONTH}. No adjustment is made to smaller fields
* that are not expected to be invariant. The calendar system
* determines what fields are expected to be invariant.set()
, add()
forces
+ * GregorianCalendar
+ * add(Calendar.MONTH,
* 13)
sets the calendar to September 30, 2000. Add rule
- * 1 sets the MONTH
field to September, since
+ * 1 sets the {@code MONTH} field to September, since
* adding 13 months to August gives September of the next year. Since
- * DAY_OF_MONTH
cannot be 31 in September in a
- * GregorianCalendar
, add rule 2 sets the
- * DAY_OF_MONTH
to 30, the closest possible value. Although
- * it is a smaller field, DAY_OF_WEEK
is not adjusted by
+ * {@code DAY_OF_MONTH} cannot be 31 in September in a
+ * {@code GregorianCalendar}, add rule 2 sets the
+ * {@code DAY_OF_MONTH} to 30, the closest possible value. Although
+ * it is a smaller field, {@code DAY_OF_WEEK} is not adjusted by
* rule 2, since it is expected to change when the month changes in a
- * GregorianCalendar
.
roll(f, delta)
adds
- * delta
to field f
without changing larger
- * fields. This is equivalent to calling add(f, delta)
with
+ *
{@code roll(f, delta)} adds + * {@code delta} to field {@code f} without changing larger + * fields. This is equivalent to calling {@code add(f, delta)} with * the following adjustment:
* *** *Roll rule. Larger fields are unchanged after the * call. A larger field represents a larger unit of - * time.
+ * time. {@code DAY_OF_MONTH} is a larger field than + * {@code HOUR}. *DAY_OF_MONTH
is a larger field than - *HOUR
.
Example: See {@link java.util.GregorianCalendar#roll(int, int)}. * *
Usage model. To motivate the behavior of
- * add()
and roll()
, consider a user interface
+ * {@code add()} and {@code roll()}, consider a user interface
* component with increment and decrement buttons for the month, day, and
- * year, and an underlying GregorianCalendar
. If the
+ * year, and an underlying {@code GregorianCalendar}. If the
* interface reads January 31, 1999 and the user presses the month
* increment button, what should it read? If the underlying
- * implementation uses set()
, it might read March 3, 1999. A
+ * implementation uses {@code set()}, it might read March 3, 1999. A
* better result would be February 28, 1999. Furthermore, if the user
* presses the month increment button again, it should read March 31,
* 1999, not March 28, 1999. By saving the original date and using either
- * add()
or roll()
, depending on whether larger
+ * {@code add()} or {@code roll()}, depending on whether larger
* fields should be affected, the user interface can behave as most users
* will intuitively expect.
get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* era, e.g., AD or BC in the Julian calendar. This is a calendar-specific
* value; see subclass documentation.
*
@@ -379,16 +379,16 @@
public static final int ERA = 0;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* year. This is a calendar-specific value; see subclass documentation.
*/
public static final int YEAR = 1;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* month. This is a calendar-specific value. The first month of
* the year in the Gregorian and Julian calendars is
- * JANUARY
which is 0; the last depends on the number
+ * {@code JANUARY} which is 0; the last depends on the number
* of months in a year.
*
* @see #JANUARY
@@ -408,11 +408,11 @@
public static final int MONTH = 2;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* week number within the current year. The first week of the year, as
- * defined by getFirstDayOfWeek()
and
- * getMinimalDaysInFirstWeek()
, has value 1. Subclasses define
- * the value of WEEK_OF_YEAR
for days before the first week of
+ * defined by {@code getFirstDayOfWeek()} and
+ * {@code getMinimalDaysInFirstWeek()}, has value 1. Subclasses define
+ * the value of {@code WEEK_OF_YEAR} for days before the first week of
* the year.
*
* @see #getFirstDayOfWeek
@@ -421,11 +421,11 @@
public static final int WEEK_OF_YEAR = 3;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* week number within the current month. The first week of the month, as
- * defined by getFirstDayOfWeek()
and
- * getMinimalDaysInFirstWeek()
, has value 1. Subclasses define
- * the value of WEEK_OF_MONTH
for days before the first week of
+ * defined by {@code getFirstDayOfWeek()} and
+ * {@code getMinimalDaysInFirstWeek()}, has value 1. Subclasses define
+ * the value of {@code WEEK_OF_MONTH} for days before the first week of
* the month.
*
* @see #getFirstDayOfWeek
@@ -434,8 +434,8 @@
public static final int WEEK_OF_MONTH = 4;
/**
- * Field number for get
and set
indicating the
- * day of the month. This is a synonym for DAY_OF_MONTH
.
+ * Field number for {@code get} and {@code set} indicating the
+ * day of the month. This is a synonym for {@code DAY_OF_MONTH}.
* The first day of the month has value 1.
*
* @see #DAY_OF_MONTH
@@ -443,8 +443,8 @@
public static final int DATE = 5;
/**
- * Field number for get
and set
indicating the
- * day of the month. This is a synonym for DATE
.
+ * Field number for {@code get} and {@code set} indicating the
+ * day of the month. This is a synonym for {@code DATE}.
* The first day of the month has value 1.
*
* @see #DATE
@@ -452,16 +452,16 @@
public static final int DAY_OF_MONTH = 5;
/**
- * Field number for get
and set
indicating the day
+ * Field number for {@code get} and {@code set} indicating the day
* number within the current year. The first day of the year has value 1.
*/
public static final int DAY_OF_YEAR = 6;
/**
- * Field number for get
and set
indicating the day
- * of the week. This field takes values SUNDAY
,
- * MONDAY
, TUESDAY
, WEDNESDAY
,
- * THURSDAY
, FRIDAY
, and SATURDAY
.
+ * Field number for {@code get} and {@code set} indicating the day
+ * of the week. This field takes values {@code SUNDAY},
+ * {@code MONDAY}, {@code TUESDAY}, {@code WEDNESDAY},
+ * {@code THURSDAY}, {@code FRIDAY}, and {@code SATURDAY}.
*
* @see #SUNDAY
* @see #MONDAY
@@ -474,24 +474,24 @@
public static final int DAY_OF_WEEK = 7;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* ordinal number of the day of the week within the current month. Together
- * with the DAY_OF_WEEK
field, this uniquely specifies a day
- * within a month. Unlike WEEK_OF_MONTH
and
- * WEEK_OF_YEAR
, this field's value does not depend on
- * getFirstDayOfWeek()
or
- * getMinimalDaysInFirstWeek()
. DAY_OF_MONTH 1
- * through 7
always correspond to DAY_OF_WEEK_IN_MONTH
- * 1
; 8
through 14
correspond to
- * DAY_OF_WEEK_IN_MONTH 2
, and so on.
- * DAY_OF_WEEK_IN_MONTH 0
indicates the week before
- * DAY_OF_WEEK_IN_MONTH 1
. Negative values count back from the
+ * with the {@code DAY_OF_WEEK} field, this uniquely specifies a day
+ * within a month. Unlike {@code WEEK_OF_MONTH} and
+ * {@code WEEK_OF_YEAR}, this field's value does not depend on
+ * {@code getFirstDayOfWeek()} or
+ * {@code getMinimalDaysInFirstWeek()}. {@code DAY_OF_MONTH 1}
+ * through {@code 7} always correspond to DAY_OF_WEEK_IN_MONTH
+ * 1
; {@code 8} through {@code 14} correspond to
+ * {@code DAY_OF_WEEK_IN_MONTH 2}, and so on.
+ * {@code DAY_OF_WEEK_IN_MONTH 0} indicates the week before
+ * {@code DAY_OF_WEEK_IN_MONTH 1}. Negative values count back from the
* end of the month, so the last Sunday of a month is specified as
- * DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1
. Because
+ * {@code DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1}. Because
* negative values count backward they will usually be aligned differently
* within the month than positive values. For example, if a month has 31
- * days, DAY_OF_WEEK_IN_MONTH -1
will overlap
- * DAY_OF_WEEK_IN_MONTH 5
and the end of 4
.
+ * days, {@code DAY_OF_WEEK_IN_MONTH -1} will overlap
+ * {@code DAY_OF_WEEK_IN_MONTH 5} and the end of {@code 4}.
*
* @see #DAY_OF_WEEK
* @see #WEEK_OF_MONTH
@@ -499,9 +499,9 @@
public static final int DAY_OF_WEEK_IN_MONTH = 8;
/**
- * Field number for get
and set
indicating
- * whether the HOUR
is before or after noon.
- * E.g., at 10:04:15.250 PM the AM_PM
is PM
.
+ * Field number for {@code get} and {@code set} indicating
+ * whether the {@code HOUR} is before or after noon.
+ * E.g., at 10:04:15.250 PM the {@code AM_PM} is {@code PM}.
*
* @see #AM
* @see #PM
@@ -510,10 +510,10 @@
public static final int AM_PM = 9;
/**
- * Field number for get
and set
indicating the
- * hour of the morning or afternoon. HOUR
is used for the
+ * Field number for {@code get} and {@code set} indicating the
+ * hour of the morning or afternoon. {@code HOUR} is used for the
* 12-hour clock (0 - 11). Noon and midnight are represented by 0, not by 12.
- * E.g., at 10:04:15.250 PM the HOUR
is 10.
+ * E.g., at 10:04:15.250 PM the {@code HOUR} is 10.
*
* @see #AM_PM
* @see #HOUR_OF_DAY
@@ -521,60 +521,60 @@
public static final int HOUR = 10;
/**
- * Field number for get
and set
indicating the
- * hour of the day. HOUR_OF_DAY
is used for the 24-hour clock.
- * E.g., at 10:04:15.250 PM the HOUR_OF_DAY
is 22.
+ * Field number for {@code get} and {@code set} indicating the
+ * hour of the day. {@code HOUR_OF_DAY} is used for the 24-hour clock.
+ * E.g., at 10:04:15.250 PM the {@code HOUR_OF_DAY} is 22.
*
* @see #HOUR
*/
public static final int HOUR_OF_DAY = 11;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* minute within the hour.
- * E.g., at 10:04:15.250 PM the MINUTE
is 4.
+ * E.g., at 10:04:15.250 PM the {@code MINUTE} is 4.
*/
public static final int MINUTE = 12;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* second within the minute.
- * E.g., at 10:04:15.250 PM the SECOND
is 15.
+ * E.g., at 10:04:15.250 PM the {@code SECOND} is 15.
*/
public static final int SECOND = 13;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* millisecond within the second.
- * E.g., at 10:04:15.250 PM the MILLISECOND
is 250.
+ * E.g., at 10:04:15.250 PM the {@code MILLISECOND} is 250.
*/
public static final int MILLISECOND = 14;
/**
- * Field number for get
and set
+ * Field number for {@code get} and {@code set}
* indicating the raw offset from GMT in milliseconds.
*
* This field reflects the correct GMT offset value of the time
- * zone of this Calendar
if the
- * TimeZone
implementation subclass supports
+ * zone of this {@code Calendar} if the
+ * {@code TimeZone} implementation subclass supports
* historical GMT offset changes.
*/
public static final int ZONE_OFFSET = 15;
/**
- * Field number for get
and set
indicating the
+ * Field number for {@code get} and {@code set} indicating the
* daylight saving offset in milliseconds.
*
* This field reflects the correct daylight saving offset value of
- * the time zone of this Calendar
if the
- * TimeZone
implementation subclass supports
+ * the time zone of this {@code Calendar} if the
+ * {@code TimeZone} implementation subclass supports
* historical Daylight Saving Time schedule changes.
*/
public static final int DST_OFFSET = 16;
/**
- * The number of distinct fields recognized by get
and set
.
- * Field numbers range from 0..FIELD_COUNT-1
.
+ * The number of distinct fields recognized by {@code get} and {@code set}.
+ * Field numbers range from {@code 0..FIELD_COUNT-1}.
*/
public static final int FIELD_COUNT = 17;
@@ -694,7 +694,7 @@
/**
* Value of the {@link #MONTH} field indicating the
- * thirteenth month of the year. Although GregorianCalendar
+ * thirteenth month of the year. Although {@code GregorianCalendar}
* does not use this value, lunar calendars do.
*/
public static final int UNDECIMBER = 12;
@@ -839,8 +839,8 @@
/**
* The calendar field values for the currently set time for this calendar.
- * This is an array of FIELD_COUNT
integers, with index values
- * ERA
through DST_OFFSET
.
+ * This is an array of {@code FIELD_COUNT} integers, with index values
+ * {@code ERA} through {@code DST_OFFSET}.
* @serial
*/
@SuppressWarnings("ProtectedField")
@@ -850,8 +850,8 @@
* The flags which tell if a specified calendar field for the calendar is set.
* A new object has no fields set. After the first call to a method
* which generates the fields, they all remain set after that.
- * This is an array of FIELD_COUNT
booleans, with index values
- * ERA
through DST_OFFSET
.
+ * This is an array of {@code FIELD_COUNT} booleans, with index values
+ * {@code ERA} through {@code DST_OFFSET}.
* @serial
*/
@SuppressWarnings("ProtectedField")
@@ -874,8 +874,8 @@
protected long time;
/**
- * True if then the value of time
is valid.
- * The time is made invalid by a change to an item of field[]
.
+ * True if then the value of {@code time} is valid.
+ * The time is made invalid by a change to an item of {@code field[]}.
* @see #time
* @serial
*/
@@ -883,10 +883,10 @@
protected boolean isTimeSet;
/**
- * True if fields[]
are in sync with the currently set time.
+ * True if {@code fields[]} are in sync with the currently set time.
* If false, then the next attempt to get the value of a field will
* force a recomputation of all fields from the current value of
- * time
.
+ * {@code time}.
* @serial
*/
@SuppressWarnings("ProtectedField")
@@ -899,8 +899,8 @@
transient boolean areAllFieldsSet;
/**
- * True
if this calendar allows out-of-range field values during computation
- * of time
from fields[]
.
+ * {@code True} if this calendar allows out-of-range field values during computation
+ * of {@code time} from {@code fields[]}.
* @see #setLenient
* @see #isLenient
* @serial
@@ -908,20 +908,20 @@
private boolean lenient = true;
/**
- * The TimeZone
used by this calendar. Calendar
+ * The {@code TimeZone} used by this calendar. {@code Calendar}
* uses the time zone data to translate between locale and GMT time.
* @serial
*/
private TimeZone zone;
/**
- * True
if zone references to a shared TimeZone object.
+ * {@code True} if zone references to a shared TimeZone object.
*/
private transient boolean sharedZone = false;
/**
- * The first day of the week, with possible values SUNDAY
,
- * MONDAY
, etc. This is a locale-dependent value.
+ * The first day of the week, with possible values {@code SUNDAY},
+ * {@code MONDAY}, etc. This is a locale-dependent value.
* @serial
*/
private int firstDayOfWeek;
@@ -964,10 +964,10 @@
static final int ALL_FIELDS = (1 << FIELD_COUNT) - 1;
/**
- * The next available value for stamp[]
, an internal array.
+ * The next available value for {@code stamp[]}, an internal array.
* This actually should not be written out to the stream, and will probably
* be removed from the stream in the near future. In the meantime,
- * a value of MINIMUM_USER_STAMP
should be used.
+ * a value of {@code MINIMUM_USER_STAMP} should be used.
* @serial
*/
private int nextStamp = MINIMUM_USER_STAMP;
@@ -997,7 +997,7 @@
*
serialVersionOnStream
+ * and the highest allowable {@code serialVersionOnStream}
* is written.
* @serial
* @since 1.1.6
@@ -1307,7 +1307,7 @@
* Sets the time zone parameter to the given {@code zone}. If no time
* zone parameter is given to this {@code Calendar.Builder}, the
* {@linkplain TimeZone#getDefault() default
- * TimeZone
} will be used in the {@link #build() build}
+ * {@code TimeZone}} will be used in the {@link #build() build}
* method.
*
* @param zone the {@link TimeZone}
@@ -1378,7 +1378,7 @@
/**
* Sets the locale parameter to the given {@code locale}. If no locale
* is given to this {@code Calendar.Builder}, the {@linkplain
- * Locale#getDefault(Locale.Category) default Locale
}
+ * Locale#getDefault(Locale.Category) default {@code Locale}}
* for {@link Locale.Category#FORMAT} will be used.
*
* If no calendar type is explicitly given by a call to the
@@ -1614,7 +1614,7 @@
/**
* Gets a calendar using the default time zone and locale. The
- * Calendar
returned is based on the current time
+ * {@code Calendar} returned is based on the current time
* in the default time zone with the default
* {@link Locale.Category#FORMAT FORMAT} locale.
*
@@ -1632,7 +1632,7 @@
/**
* Gets a calendar using the specified time zone and default locale.
- * The Calendar
returned is based on the current time
+ * The {@code Calendar} returned is based on the current time
* in the given time zone with the default
* {@link Locale.Category#FORMAT FORMAT} locale.
*
@@ -1646,7 +1646,7 @@
/**
* Gets a calendar using the default time zone and specified locale.
- * The Calendar
returned is based on the current time
+ * The {@code Calendar} returned is based on the current time
* in the default time zone with the given locale.
*
* If the locale contains the time zone with "tz"
@@ -1663,7 +1663,7 @@
/**
* Gets a calendar with the specified time zone and locale.
- * The Calendar
returned is based on the current time
+ * The {@code Calendar} returned is based on the current time
* in the given time zone with the given locale.
*
* @param zone the time zone to use
@@ -1738,13 +1738,13 @@
}
/**
- * Returns an array of all locales for which the getInstance
+ * Returns an array of all locales for which the {@code getInstance}
* methods of this class can return localized instances.
- * The array returned must contain at least a Locale
+ * The array returned must contain at least a {@code Locale}
* instance equal to {@link java.util.Locale#US Locale.US}.
*
* @return An array of locales for which localized
- * Calendar
instances are available.
+ * {@code Calendar} instances are available.
*/
public static synchronized Locale[] getAvailableLocales()
{
@@ -1774,11 +1774,11 @@
protected abstract void computeFields();
/**
- * Returns a Date
object representing this
- * Calendar
's time value (millisecond offset from the Epoch").
*
- * @return a Date
representing the time value.
+ * @return a {@code Date} representing the time value.
* @see #setTime(Date)
* @see #getTimeInMillis()
*/
@@ -1787,11 +1787,11 @@
}
/**
- * Sets this Calendar's time with the given Date
.
+ * Sets this Calendar's time with the given {@code Date}.
*
- * Note: Calling setTime()
with
- * Date(Long.MAX_VALUE)
or Date(Long.MIN_VALUE)
- * may yield incorrect field values from get()
.
+ * Note: Calling {@code setTime()} with
+ * {@code Date(Long.MAX_VALUE)} or {@code Date(Long.MIN_VALUE)}
+ * may yield incorrect field values from {@code get()}.
*
* @param date the given Date.
* @see #getTime()
@@ -1874,7 +1874,7 @@
/**
* Sets the value of the given calendar field. This method does
* not affect any setting state of the field in this
- * Calendar
instance.
+ * {@code Calendar} instance.
*
* @throws IndexOutOfBoundsException if the specified field is out of range
* (field < 0 || field >= FIELD_COUNT
).
@@ -1920,15 +1920,15 @@
}
/**
- * Sets the values for the calendar fields YEAR
,
- * MONTH
, and DAY_OF_MONTH
.
+ * Sets the values for the calendar fields {@code YEAR},
+ * {@code MONTH}, and {@code DAY_OF_MONTH}.
* Previous values of other calendar fields are retained. If this is not desired,
* call {@link #clear()} first.
*
- * @param year the value used to set the YEAR
calendar field.
- * @param month the value used to set the MONTH
calendar field.
+ * @param year the value used to set the {@code YEAR} calendar field.
+ * @param month the value used to set the {@code MONTH} calendar field.
* Month value is 0-based. e.g., 0 for January.
- * @param date the value used to set the DAY_OF_MONTH
calendar field.
+ * @param date the value used to set the {@code DAY_OF_MONTH} calendar field.
* @see #set(int,int)
* @see #set(int,int,int,int,int)
* @see #set(int,int,int,int,int,int)
@@ -1941,18 +1941,18 @@
}
/**
- * Sets the values for the calendar fields YEAR
,
- * MONTH
, DAY_OF_MONTH
,
- * HOUR_OF_DAY
, and MINUTE
.
+ * Sets the values for the calendar fields {@code YEAR},
+ * {@code MONTH}, {@code DAY_OF_MONTH},
+ * {@code HOUR_OF_DAY}, and {@code MINUTE}.
* Previous values of other fields are retained. If this is not desired,
* call {@link #clear()} first.
*
- * @param year the value used to set the YEAR
calendar field.
- * @param month the value used to set the MONTH
calendar field.
+ * @param year the value used to set the {@code YEAR} calendar field.
+ * @param month the value used to set the {@code MONTH} calendar field.
* Month value is 0-based. e.g., 0 for January.
- * @param date the value used to set the DAY_OF_MONTH
calendar field.
- * @param hourOfDay the value used to set the HOUR_OF_DAY
calendar field.
- * @param minute the value used to set the MINUTE
calendar field.
+ * @param date the value used to set the {@code DAY_OF_MONTH} calendar field.
+ * @param hourOfDay the value used to set the {@code HOUR_OF_DAY} calendar field.
+ * @param minute the value used to set the {@code MINUTE} calendar field.
* @see #set(int,int)
* @see #set(int,int,int)
* @see #set(int,int,int,int,int,int)
@@ -1967,19 +1967,19 @@
}
/**
- * Sets the values for the fields YEAR
, MONTH
,
- * DAY_OF_MONTH
, HOUR_OF_DAY
, MINUTE
, and
- * SECOND
.
+ * Sets the values for the fields {@code YEAR}, {@code MONTH},
+ * {@code DAY_OF_MONTH}, {@code HOUR_OF_DAY}, {@code MINUTE}, and
+ * {@code SECOND}.
* Previous values of other fields are retained. If this is not desired,
* call {@link #clear()} first.
*
- * @param year the value used to set the YEAR
calendar field.
- * @param month the value used to set the MONTH
calendar field.
+ * @param year the value used to set the {@code YEAR} calendar field.
+ * @param month the value used to set the {@code MONTH} calendar field.
* Month value is 0-based. e.g., 0 for January.
- * @param date the value used to set the DAY_OF_MONTH
calendar field.
- * @param hourOfDay the value used to set the HOUR_OF_DAY
calendar field.
- * @param minute the value used to set the MINUTE
calendar field.
- * @param second the value used to set the SECOND
calendar field.
+ * @param date the value used to set the {@code DAY_OF_MONTH} calendar field.
+ * @param hourOfDay the value used to set the {@code HOUR_OF_DAY} calendar field.
+ * @param minute the value used to set the {@code MINUTE} calendar field.
+ * @param second the value used to set the {@code SECOND} calendar field.
* @see #set(int,int)
* @see #set(int,int,int)
* @see #set(int,int,int,int,int)
@@ -1998,14 +1998,14 @@
/**
* Sets all the calendar field values and the time value
* (millisecond offset from the Epoch) of
- * this Calendar
undefined. This means that {@link
- * #isSet(int) isSet()} will return false
for all the
+ * this {@code Calendar} undefined. This means that {@link
+ * #isSet(int) isSet()} will return {@code false} for all the
* calendar fields, and the date and time calculations will treat
* the fields as if they had never been set. A
- * Calendar
implementation class may use its specific
+ * {@code Calendar} implementation class may use its specific
* default field values for date/time calculations. For example,
- * GregorianCalendar
uses 1970 if the
- * YEAR
field value is undefined.
+ * {@code GregorianCalendar} uses 1970 if the
+ * {@code YEAR} field value is undefined.
*
* @see #clear(int)
*/
@@ -2022,10 +2022,10 @@
/**
* Sets the given calendar field value and the time value
* (millisecond offset from the Epoch) of
- * this Calendar
undefined. This means that {@link
- * #isSet(int) isSet(field)} will return false
, and
+ * this {@code Calendar} undefined. This means that {@link
+ * #isSet(int) isSet(field)} will return {@code false}, and
* the date and time calculations will treat the field as if it
- * had never been set. A Calendar
implementation
+ * had never been set. A {@code Calendar} implementation
* class may use the field's specific default value for date and
* time calculations.
*
@@ -2033,7 +2033,7 @@
* fields are handled independently and the the resolution rule for the time of
* day is applied. Clearing one of the fields doesn't reset
- * the hour of day value of this Calendar
. Use {@link
+ * the hour of day value of this {@code Calendar}. Use {@link
* #set(int,int) set(Calendar.HOUR_OF_DAY, 0)} to reset the hour
* value.
*
@@ -2053,11 +2053,11 @@
/**
* Determines if the given calendar field has a value set,
* including cases that the value has been set by internal fields
- * calculations triggered by a get
method call.
+ * calculations triggered by a {@code get} method call.
*
* @param field the calendar field to test
- * @return true
if the given calendar field has a value set;
- * false
otherwise.
+ * @return {@code true} if the given calendar field has a value set;
+ * {@code false} otherwise.
*/
public final boolean isSet(int field)
{
@@ -2066,24 +2066,24 @@
/**
* Returns the string representation of the calendar
- * field
value in the given style
and
- * locale
. If no string representation is
- * applicable, null
is returned. This method calls
+ * {@code field} value in the given {@code style} and
+ * {@code locale}. If no string representation is
+ * applicable, {@code null} is returned. This method calls
* {@link Calendar#get(int) get(field)} to get the calendar
- * field
value if the string representation is
- * applicable to the given calendar field
.
+ * {@code field} value if the string representation is
+ * applicable to the given calendar {@code field}.
*
- *
For example, if this Calendar
is a
- * GregorianCalendar
and its date is 2005-01-01, then
+ *
For example, if this {@code Calendar} is a
+ * {@code GregorianCalendar} and its date is 2005-01-01, then
* the string representation of the {@link #MONTH} field would be
* "January" in the long style in an English locale or "Jan" in
* the short style. However, no string representation would be
* available for the {@link #DAY_OF_MONTH} field, and this method
- * would return null
.
+ * would return {@code null}.
*
*
The default implementation supports the calendar fields for
* which a {@link DateFormatSymbols} has names in the given
- * locale
.
+ * {@code locale}.
*
* @param field
* the calendar field for which the string representation
@@ -2309,10 +2309,10 @@
* externally by calling one of the setter methods rather than by the
* internal time calculation.
*
- * @return true
if the field has been set externally,
- * false
otherwise.
+ * @return {@code true} if the field has been set externally,
+ * {@code false} otherwise.
* @throws IndexOutOfBoundsException if the specified
- * field
is out of range
+ * {@code field} is out of range
* (field < 0 || field >= FIELD_COUNT
).
* @see #selectFields()
* @see #setFieldsComputed(int)
@@ -2345,7 +2345,7 @@
*
* @param fieldMask the field to be marked as computed.
* @throws IndexOutOfBoundsException if the specified
- * field
is out of range
+ * {@code field} is out of range
* (field < 0 || field >= FIELD_COUNT
).
* @see #isExternallySet(int)
* @see #selectFields()
@@ -2374,15 +2374,15 @@
/**
* Sets the state of the calendar fields that are not specified
- * by fieldMask
to unset. If fieldMask
+ * by {@code fieldMask} to unset. If {@code fieldMask}
* specifies all the calendar fields, then the state of this
- * Calendar
becomes that all the calendar fields are in sync
+ * {@code Calendar} becomes that all the calendar fields are in sync
* with the time value (millisecond offset from the Epoch).
*
* @param fieldMask the field mask indicating which calendar fields are in
* sync with the time value.
* @throws IndexOutOfBoundsException if the specified
- * field
is out of range
+ * {@code field} is out of range
* (field < 0 || field >= FIELD_COUNT
).
* @see #isExternallySet(int)
* @see #selectFields()
@@ -2428,8 +2428,8 @@
}
/**
- * Returns whether the specified field
is on in the
- * fieldMask
.
+ * Returns whether the specified {@code field} is on in the
+ * {@code fieldMask}.
*/
static boolean isFieldSet(int fieldMask, int field) {
return (fieldMask & (1 << field)) != 0;
@@ -2439,16 +2439,16 @@
* Returns a field mask indicating which calendar field values
* to be used to calculate the time value. The calendar fields are
* returned as a bit mask, each bit of which corresponds to a field, i.e.,
- * the mask value of field
is (1 <<
- * field)
. For example, 0x26 represents the YEAR
,
- * MONTH
, and DAY_OF_MONTH
fields (i.e., 0x26 is
+ * the mask value of {@code field} is (1 <<
+ * field)
. For example, 0x26 represents the {@code YEAR},
+ * {@code MONTH}, and {@code DAY_OF_MONTH} fields (i.e., 0x26 is
* equal to
* (1<<YEAR)|(1<<MONTH)|(1<<DAY_OF_MONTH))
.
*
*
This method supports the calendar fields resolution as described in
* the class description. If the bit mask for a given field is on and its
- * field has not been set (i.e., isSet(field)
is
- * false
), then the default value of the field has to be
+ * field has not been set (i.e., {@code isSet(field)} is
+ * {@code false}), then the default value of the field has to be
* used, which case means that the field has been selected because the
* selected combination involves the field.
*
@@ -2693,26 +2693,26 @@
}
/**
- * Compares this Calendar
to the specified
- * Object
. The result is true
if and only if
- * the argument is a Calendar
object of the same calendar
+ * Compares this {@code Calendar} to the specified
+ * {@code Object}. The result is {@code true} if and only if
+ * the argument is a {@code Calendar} object of the same calendar
* system that represents the same time value (millisecond offset from the
* Epoch) under the same
- * Calendar
parameters as this object.
+ * {@code Calendar} parameters as this object.
*
- *
The Calendar
parameters are the values represented
- * by the isLenient
, getFirstDayOfWeek
,
- * getMinimalDaysInFirstWeek
and getTimeZone
+ *
The {@code Calendar} parameters are the values represented
+ * by the {@code isLenient}, {@code getFirstDayOfWeek},
+ * {@code getMinimalDaysInFirstWeek} and {@code getTimeZone}
* methods. If there is any difference in those parameters
- * between the two Calendar
s, this method returns
- * false
.
+ * between the two {@code Calendar}s, this method returns
+ * {@code false}.
*
*
Use the {@link #compareTo(Calendar) compareTo} method to
* compare only the time values.
*
* @param obj the object to compare with.
- * @return true
if this object is equal to obj
;
- * false
otherwise.
+ * @return {@code true} if this object is equal to {@code obj};
+ * {@code false} otherwise.
*/
@SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
@Override
@@ -2753,19 +2753,19 @@
}
/**
- * Returns whether this Calendar
represents a time
+ * Returns whether this {@code Calendar} represents a time
* before the time represented by the specified
- * Object
. This method is equivalent to:
+ * {@code Object}. This method is equivalent to:
*
{@code * compareTo(when) < 0 * }- * if and only if
when
is a Calendar
- * instance. Otherwise, the method returns false
.
+ * if and only if {@code when} is a {@code Calendar}
+ * instance. Otherwise, the method returns {@code false}.
*
- * @param when the Object
to be compared
- * @return true
if the time of this
- * Calendar
is before the time represented by
- * when
; false
otherwise.
+ * @param when the {@code Object} to be compared
+ * @return {@code true} if the time of this
+ * {@code Calendar} is before the time represented by
+ * {@code when}; {@code false} otherwise.
* @see #compareTo(Calendar)
*/
public boolean before(Object when) {
@@ -2774,18 +2774,18 @@
}
/**
- * Returns whether this Calendar
represents a time
+ * Returns whether this {@code Calendar} represents a time
* after the time represented by the specified
- * Object
. This method is equivalent to:
+ * {@code Object}. This method is equivalent to:
* {@code * compareTo(when) > 0 * }- * if and only if
when
is a Calendar
- * instance. Otherwise, the method returns false
.
+ * if and only if {@code when} is a {@code Calendar}
+ * instance. Otherwise, the method returns {@code false}.
*
- * @param when the Object
to be compared
- * @return true
if the time of this Calendar
is
- * after the time represented by when
; false
+ * @param when the {@code Object} to be compared
+ * @return {@code true} if the time of this {@code Calendar} is
+ * after the time represented by {@code when}; {@code false}
* otherwise.
* @see #compareTo(Calendar)
*/
@@ -2797,19 +2797,19 @@
/**
* Compares the time values (millisecond offsets from the Epoch) represented by two
- * Calendar
objects.
+ * {@code Calendar} objects.
*
- * @param anotherCalendar the Calendar
to be compared.
- * @return the value 0
if the time represented by the argument
- * is equal to the time represented by this Calendar
; a value
- * less than 0
if the time of this Calendar
is
+ * @param anotherCalendar the {@code Calendar} to be compared.
+ * @return the value {@code 0} if the time represented by the argument
+ * is equal to the time represented by this {@code Calendar}; a value
+ * less than {@code 0} if the time of this {@code Calendar} is
* before the time represented by the argument; and a value greater than
- * 0
if the time of this Calendar
is after the
+ * {@code 0} if the time of this {@code Calendar} is after the
* time represented by the argument.
- * @throws NullPointerException if the specified Calendar
is
- * null
.
+ * @throws NullPointerException if the specified {@code Calendar} is
+ * {@code null}.
* @throws IllegalArgumentException if the time value of the
- * specified Calendar
object can't be obtained due to
+ * specified {@code Calendar} object can't be obtained due to
* any invalid calendar values.
* @since 1.5
*/
@@ -2822,7 +2822,7 @@
* Adds or subtracts the specified amount of time to the given calendar field,
* based on the calendar's rules. For example, to subtract 5 days from
* the current time of the calendar, you can achieve it by calling:
- * add(Calendar.DAY_OF_MONTH, -5)
.
+ *
{@code add(Calendar.DAY_OF_MONTH, -5)}. * * @param field the calendar field. * @param amount the amount of date or time to be added to the field. @@ -2838,7 +2838,7 @@ *
roll(Calendar.DATE, true).
* When rolling on the year or Calendar.YEAR field, it will roll the year
* value in the range between 1 and the value returned by calling
- * getMaximum(Calendar.YEAR)
.
+ * {@code getMaximum(Calendar.YEAR)}.
* When rolling on the month or Calendar.MONTH field, other fields like
* date might conflict and, need to be changed. For instance,
* rolling the month on the date 01/31/96 will result in 02/29/96.
@@ -2858,15 +2858,15 @@
* without changing larger fields. A negative amount means to roll
* down.
*
- *
NOTE: This default implementation on Calendar
just repeatedly calls the
+ *
NOTE: This default implementation on {@code Calendar} just repeatedly calls the
* version of {@link #roll(int,boolean) roll()} that rolls by one unit. This may not
- * always do the right thing. For example, if the DAY_OF_MONTH
field is 31,
- * rolling through February will leave it set to 28. The GregorianCalendar
+ * always do the right thing. For example, if the {@code DAY_OF_MONTH} field is 31,
+ * rolling through February will leave it set to 28. The {@code GregorianCalendar}
* version of this function takes care of this problem. Other subclasses
* should also provide overrides of this function that do the right thing.
*
* @param field the calendar field.
- * @param amount the signed amount to add to the calendar field
.
+ * @param amount the signed amount to add to the calendar {@code field}.
* @since 1.2
* @see #roll(int,boolean)
* @see #add(int,int)
@@ -2929,7 +2929,7 @@
}
/**
- * Sets the sharedZone flag to shared
.
+ * Sets the sharedZone flag to {@code shared}.
*/
void setZoneShared(boolean shared) {
sharedZone = shared;
@@ -2942,8 +2942,8 @@
* With strict (non-lenient) interpretation, such dates will cause an exception to be
* thrown. The default is lenient.
*
- * @param lenient true
if the lenient mode is to be turned
- * on; false
if it is to be turned off.
+ * @param lenient {@code true} if the lenient mode is to be turned
+ * on; {@code false} if it is to be turned off.
* @see #isLenient()
* @see java.text.DateFormat#setLenient
*/
@@ -2955,8 +2955,8 @@
/**
* Tells whether date/time interpretation is to be lenient.
*
- * @return true
if the interpretation mode of this calendar is lenient;
- * false
otherwise.
+ * @return {@code true} if the interpretation mode of this calendar is lenient;
+ * {@code false} otherwise.
* @see #setLenient(boolean)
*/
public boolean isLenient()
@@ -2965,8 +2965,8 @@
}
/**
- * Sets what the first day of the week is; e.g., SUNDAY
in the U.S.,
- * MONDAY
in France.
+ * Sets what the first day of the week is; e.g., {@code SUNDAY} in the U.S.,
+ * {@code MONDAY} in France.
*
* @param value the given first day of the week.
* @see #getFirstDayOfWeek()
@@ -2982,8 +2982,8 @@
}
/**
- * Gets what the first day of the week is; e.g., SUNDAY
in the U.S.,
- * MONDAY
in France.
+ * Gets what the first day of the week is; e.g., {@code SUNDAY} in the U.S.,
+ * {@code MONDAY} in France.
*
* @return the first day of the week.
* @see #setFirstDayOfWeek(int)
@@ -3125,7 +3125,7 @@
/**
* Returns the minimum value for the given calendar field of this
- * Calendar
instance. The minimum value is defined as
+ * {@code Calendar} instance. The minimum value is defined as
* the smallest value returned by the {@link #get(int) get} method
* for any possible time value. The minimum value depends on
* calendar system specific parameters of the instance.
@@ -3142,7 +3142,7 @@
/**
* Returns the maximum value for the given calendar field of this
- * Calendar
instance. The maximum value is defined as
+ * {@code Calendar} instance. The maximum value is defined as
* the largest value returned by the {@link #get(int) get} method
* for any possible time value. The maximum value depends on
* calendar system specific parameters of the instance.
@@ -3159,7 +3159,7 @@
/**
* Returns the highest minimum value for the given calendar field
- * of this Calendar
instance. The highest minimum
+ * of this {@code Calendar} instance. The highest minimum
* value is defined as the largest value returned by {@link
* #getActualMinimum(int)} for any possible time value. The
* greatest minimum value depends on calendar system specific
@@ -3177,13 +3177,13 @@
/**
* Returns the lowest maximum value for the given calendar field
- * of this Calendar
instance. The lowest maximum
+ * of this {@code Calendar} instance. The lowest maximum
* value is defined as the smallest value returned by {@link
* #getActualMaximum(int)} for any possible time value. The least
* maximum value depends on calendar system specific parameters of
- * the instance. For example, a Calendar
for the
+ * the instance. For example, a {@code Calendar} for the
* Gregorian calendar system returns 28 for the
- * DAY_OF_MONTH
field, because the 28th is the last
+ * {@code DAY_OF_MONTH} field, because the 28th is the last
* day of the shortest month of this calendar, February in a
* common year.
*
@@ -3199,17 +3199,17 @@
/**
* Returns the minimum value that the specified calendar field
- * could have, given the time value of this Calendar
.
+ * could have, given the time value of this {@code Calendar}.
*
*
The default implementation of this method uses an iterative
* algorithm to determine the actual minimum value for the
* calendar field. Subclasses should, if possible, override this
* with a more efficient implementation - in many cases, they can
- * simply return getMinimum()
.
+ * simply return {@code getMinimum()}.
*
* @param field the calendar field
* @return the minimum of the given calendar field for the time
- * value of this Calendar
+ * value of this {@code Calendar}
* @see #getMinimum(int)
* @see #getMaximum(int)
* @see #getGreatestMinimum(int)
@@ -3252,8 +3252,8 @@
/**
* Returns the maximum value that the specified calendar field
* could have, given the time value of this
- * Calendar
. For example, the actual maximum value of
- * the MONTH
field is 12 in some years, and 13 in
+ * {@code Calendar}. For example, the actual maximum value of
+ * the {@code MONTH} field is 12 in some years, and 13 in
* other years in the Hebrew calendar system.
*
*
The default implementation of this method uses an iterative
@@ -3263,7 +3263,7 @@
*
* @param field the calendar field
* @return the maximum of the given calendar field for the time
- * value of this Calendar
+ * value of this {@code Calendar}
* @see #getMinimum(int)
* @see #getMaximum(int)
* @see #getGreatestMinimum(int)
@@ -3351,7 +3351,7 @@
*
* @param field the calendar field
* @return the calendar field name
- * @throws IndexOutOfBoundsException if field
is negative,
+ * @throws IndexOutOfBoundsException if {@code field} is negative,
* equal to or greater than {@code FIELD_COUNT}.
*/
static String getFieldName(int field) {
@@ -3362,7 +3362,7 @@
* Return a string representation of this calendar. This method
* is intended to be used only for debugging purposes, and the
* format of the returned string may vary between implementations.
- * The returned string may be empty but may not be null
.
+ * The returned string may be empty but may not be {@code null}.
*
* @return a string representation of this calendar.
*/
@@ -3517,13 +3517,13 @@
/**
* Save the state of this object to a stream (i.e., serialize it).
*
- * Ideally, Calendar
would only write out its state data and
+ * Ideally, {@code Calendar} would only write out its state data and
* the current time, and not write any field data out, such as
- * fields[]
, isTimeSet
, areFieldsSet
,
- * and isSet[]
. nextStamp
also should not be part
+ * {@code fields[]}, {@code isTimeSet}, {@code areFieldsSet},
+ * and {@code isSet[]}. {@code nextStamp} also should not be part
* of the persistent state. Unfortunately, this didn't happen before JDK 1.1
* shipped. To be compatible with JDK 1.1, we will always have to write out
- * the field values and state flags. However, nextStamp
can be
+ * the field values and state flags. However, {@code nextStamp} can be
* removed from the serialization stream; this will probably happen in the
* near future.
*/
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/util/ConcurrentModificationException.java
--- a/src/java.base/share/classes/java/util/ConcurrentModificationException.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/util/ConcurrentModificationException.java Tue Sep 24 09:43:43 2019 +0100
@@ -107,7 +107,7 @@
* Constructs a new exception with the specified detail message and
* cause.
*
- *
Note that the detail message associated with cause
is
+ *
Note that the detail message associated with {@code cause} is * not automatically incorporated in this exception's detail * message. * diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/util/Currency.java --- a/src/java.base/share/classes/java/util/Currency.java Tue Sep 24 10:04:13 2019 +0000 +++ b/src/java.base/share/classes/java/util/Currency.java Tue Sep 24 09:43:43 2019 +0100 @@ -55,9 +55,9 @@ * ISO web site for more information. *
* The class is designed so that there's never more than one
- * Currency
instance for any given currency. Therefore, there's
- * no public constructor. You obtain a Currency
instance using
- * the getInstance
methods.
+ * {@code Currency} instance for any given currency. Therefore, there's
+ * no public constructor. You obtain a {@code Currency} instance using
+ * the {@code getInstance} methods.
*
* Users can supersede the Java runtime currency data by means of the system
* property {@systemProperty java.util.currency.data}. If this system property is
@@ -274,7 +274,7 @@
/**
- * Constructs a Currency
instance. The constructor is private
+ * Constructs a {@code Currency} instance. The constructor is private
* so that we can insure that there's never more than one instance for a
* given currency.
*/
@@ -285,12 +285,12 @@
}
/**
- * Returns the Currency
instance for the given currency code.
+ * Returns the {@code Currency} instance for the given currency code.
*
* @param currencyCode the ISO 4217 code of the currency
- * @return the Currency
instance for the given currency code
- * @throws NullPointerException if currencyCode
is null
- * @throws IllegalArgumentException if currencyCode
is not
+ * @return the {@code Currency} instance for the given currency code
+ * @throws NullPointerException if {@code currencyCode} is null
+ * @throws IllegalArgumentException if {@code currencyCode} is not
* a supported ISO 4217 code.
*/
public static Currency getInstance(String currencyCode) {
@@ -350,7 +350,7 @@
}
/**
- * Returns the Currency
instance for the country of the
+ * Returns the {@code Currency} instance for the country of the
* given locale. The language and variant components of the locale
* are ignored. The result may vary over time, as countries change their
* currencies. For example, for the original member countries of the
@@ -365,14 +365,14 @@
* specified, the currency from the "cu" extension supersedes the implicit one
* from the "rg" extension.
*
- * The method returns null
for territories that don't
+ * The method returns {@code null} for territories that don't
* have a currency, such as Antarctica.
*
- * @param locale the locale for whose country a Currency
+ * @param locale the locale for whose country a {@code Currency}
* instance is needed
- * @return the Currency
instance for the country of the given
+ * @return the {@code Currency} instance for the country of the given
* locale, or {@code null}
- * @throws NullPointerException if locale
+ * @throws NullPointerException if {@code locale}
* is {@code null}
* @throws IllegalArgumentException if the country of the given {@code locale}
* is not a supported ISO 3166 country code.
@@ -537,7 +537,7 @@
* @param locale the locale for which a display name for this currency is
* needed
* @return the symbol of this currency for the specified locale
- * @throws NullPointerException if locale
is null
+ * @throws NullPointerException if {@code locale} is null
*/
public String getSymbol(Locale locale) {
LocaleServiceProviderPool pool =
@@ -632,7 +632,7 @@
* @param locale the locale for which a display name for this currency is
* needed
* @return the display name of this currency for the specified locale
- * @throws NullPointerException if locale
is null
+ * @throws NullPointerException if {@code locale} is null
* @since 1.7
*/
public String getDisplayName(Locale locale) {
diff -r a7f16447085e -r 48e480e56aad src/java.base/share/classes/java/util/GregorianCalendar.java
--- a/src/java.base/share/classes/java/util/GregorianCalendar.java Tue Sep 24 10:04:13 2019 +0000
+++ b/src/java.base/share/classes/java/util/GregorianCalendar.java Tue Sep 24 09:43:43 2019 +0100
@@ -53,11 +53,11 @@
import sun.util.calendar.ZoneInfo;
/**
- * GregorianCalendar
is a concrete subclass of
- * Calendar
and provides the standard calendar system
+ * {@code GregorianCalendar} is a concrete subclass of
+ * {@code Calendar} and provides the standard calendar system
* used by most of the world.
*
- *
GregorianCalendar
is a hybrid calendar that
+ *
{@code GregorianCalendar} is a hybrid calendar that * supports both the Julian and Gregorian calendar systems with the * support of a single discontinuity, which corresponds by default to * the Gregorian date when the Gregorian calendar was instituted @@ -68,19 +68,19 @@ *
* Historically, in those countries which adopted the Gregorian calendar first,
* October 4, 1582 (Julian) was thus followed by October 15, 1582 (Gregorian). This calendar models
- * this correctly. Before the Gregorian cutover, GregorianCalendar
+ * this correctly. Before the Gregorian cutover, {@code GregorianCalendar}
* implements the Julian calendar. The only difference between the Gregorian
* and the Julian calendar is the leap year rule. The Julian calendar specifies
* leap years every four years, whereas the Gregorian calendar omits century
* years which are not divisible by 400.
*
*
- * GregorianCalendar
implements proleptic Gregorian and
+ * {@code GregorianCalendar} implements proleptic Gregorian and
* Julian calendars. That is, dates are computed by extrapolating the current
* rules indefinitely far backward and forward in time. As a result,
- * GregorianCalendar
may be used for all years to generate
+ * {@code GregorianCalendar} may be used for all years to generate
* meaningful and consistent results. However, dates obtained using
- * GregorianCalendar
are historically accurate only from March 1, 4
+ * {@code GregorianCalendar} are historically accurate only from March 1, 4
* AD onward, when modern Julian calendar rules were adopted. Before this date,
* leap year rules were applied irregularly, and before 45 BC the Julian
* calendar did not even exist.
@@ -135,28 +135,28 @@
*
*
Values calculated for the WEEK_OF_MONTH
field range from 0
+ *
Values calculated for the {@code WEEK_OF_MONTH} field range from 0
* to 6. Week 1 of a month (the days with WEEK_OF_MONTH =
* 1
) is the earliest set of at least
- * getMinimalDaysInFirstWeek()
contiguous days in that month,
- * ending on the day before getFirstDayOfWeek()
. Unlike
+ * {@code getMinimalDaysInFirstWeek()} contiguous days in that month,
+ * ending on the day before {@code getFirstDayOfWeek()}. Unlike
* week 1 of a year, week 1 of a month may be shorter than 7 days, need
- * not start on getFirstDayOfWeek()
, and will not include days of
+ * not start on {@code getFirstDayOfWeek()}, and will not include days of
* the previous month. Days of a month before week 1 have a
- * WEEK_OF_MONTH
of 0.
+ * {@code WEEK_OF_MONTH} of 0.
*
- *
For example, if getFirstDayOfWeek()
is SUNDAY
- * and getMinimalDaysInFirstWeek()
is 4, then the first week of
+ *
For example, if {@code getFirstDayOfWeek()} is {@code SUNDAY}
+ * and {@code getMinimalDaysInFirstWeek()} is 4, then the first week of
* January 1998 is Sunday, January 4 through Saturday, January 10. These days
- * have a WEEK_OF_MONTH
of 1. Thursday, January 1 through
- * Saturday, January 3 have a WEEK_OF_MONTH
of 0. If
- * getMinimalDaysInFirstWeek()
is changed to 3, then January 1
- * through January 3 have a WEEK_OF_MONTH
of 1.
+ * have a {@code WEEK_OF_MONTH} of 1. Thursday, January 1 through
+ * Saturday, January 3 have a {@code WEEK_OF_MONTH} of 0. If
+ * {@code getMinimalDaysInFirstWeek()} is changed to 3, then January 1
+ * through January 3 have a {@code WEEK_OF_MONTH} of 1.
*
*
The clear
method sets calendar field(s)
- * undefined. GregorianCalendar
uses the following
+ *
The {@code clear} method sets calendar field(s) + * undefined. {@code GregorianCalendar} uses the following * default value for each calendar field if its value is undefined. * *