# HG changeset patch
# User duke
# Date 1499280291 -7200
# Node ID 620051149184fa6471707dbe55c5eeb981a5528e
# Parent 51926b23f43700a85f2b7e9fc2249b471dc4dd30# Parent 25b32379fb8d12a097baf80da7cbeb188f047355
Merge
diff -r 51926b23f437 -r 620051149184 .hgtags-top-repo
--- a/.hgtags-top-repo Thu Aug 06 11:17:57 2015 -0700
+++ b/.hgtags-top-repo Wed Jul 05 20:44:51 2017 +0200
@@ -318,3 +318,4 @@
4c2cbaae528bce970dabbb5676005d379357f4b6 jdk9-b73
57f3134853ecdd4a3ee2d4d26f22ba981d653d79 jdk9-b74
8fd6eeb878606e39c908f12535f34ebbfd225a4a jdk9-b75
+d82072b699b880a1f647a5e2d7c0f86cec958941 jdk9-b76
diff -r 51926b23f437 -r 620051149184 corba/.hgtags
--- a/corba/.hgtags Thu Aug 06 11:17:57 2015 -0700
+++ b/corba/.hgtags Wed Jul 05 20:44:51 2017 +0200
@@ -318,3 +318,4 @@
29096b78d93b01a2f8882509cd40755e3d6b8cd9 jdk9-b73
622fe934e351e89107edf3c667d6b57f543f58f1 jdk9-b74
960b56805abd8460598897481820bd6a75f979e7 jdk9-b75
+d8126bc88fa5cd1ae4e44d86a4b1280ca1c9e2aa jdk9-b76
diff -r 51926b23f437 -r 620051149184 hotspot/.hgtags
--- a/hotspot/.hgtags Thu Aug 06 11:17:57 2015 -0700
+++ b/hotspot/.hgtags Wed Jul 05 20:44:51 2017 +0200
@@ -478,3 +478,4 @@
e37d432868be0aa7cb5e0f3d7caff1e825d8ead3 jdk9-b73
fff6b54e9770ac4c12c2fb4cab5aa7672affa4bd jdk9-b74
2f354281e9915275693c4e519a959b8a6f22d3a3 jdk9-b75
+0bc8d1656d6f2b1fdfe803c1305a108bb9939f35 jdk9-b76
diff -r 51926b23f437 -r 620051149184 hotspot/agent/src/share/classes/sun/jvm/hotspot/SAGetopt.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/SAGetopt.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class SAGetopt {
+
+ private String[] _argv;
+
+ private int _optind; // index in arguments array
+ private int _optopt; // index within an argument
+ private String _optarg; // last option argument
+ private boolean _optreset; // special handling of first call
+
+ public SAGetopt(String[] args) {
+ _argv = args;
+ _optind = 0;
+ _optopt = 1;
+ _optarg = null;
+ _optreset = true;
+ }
+
+ public String getOptarg() {
+ return _optarg;
+ }
+
+ public int getOptind() {
+ return _optind;
+ }
+
+ private void extractOptarg(String opt) {
+ // Argument expected
+ if (_optind > _argv.length) {
+ throw new RuntimeException("Not enough arguments for '" + opt + "'");
+ }
+
+ if (! _argv[_optind].isEmpty() && _argv[_optind].charAt(0) == '-') {
+ throw new RuntimeException("Argument is expected for '" + opt + "'");
+ }
+
+ _optarg = _argv[_optind];
+ _optind += 1;
+ }
+
+ private String processLongOptions(String carg, String[] longOptStr) {
+ List The cipher only supports the following two operation modes:
- * Cipher.WRAP_MODE, and
- * Cipher.UNWRAP_MODE.
+ * The cipher only supports the following two operation modes:
+ * {@code Cipher.WRAP_MODE}, and {@code Cipher.UNWRAP_MODE}.
* For modes other than the above two, UnsupportedOperationException
* will be thrown.
* If this cipher requires an initialization vector (IV), it will get
@@ -192,9 +191,8 @@
* Initializes this cipher with a key, a set of algorithm parameters,
* and a source of randomness.
*
- * The cipher only supports the following two operation modes:
- * Cipher.WRAP_MODE, and
- * Cipher.UNWRAP_MODE.
+ * The cipher only supports the following two operation modes:
+ * {@code Cipher.WRAP_MODE}, and {@code Cipher.UNWRAP_MODE}.
* For modes other than the above two, UnsupportedOperationException
* will be thrown.
* If this cipher requires an initialization vector (IV), it will get
@@ -252,9 +250,8 @@
* Initializes this cipher with a key, a set of algorithm parameters,
* and a source of randomness.
*
- * The cipher only supports the following two operation modes:
- * Cipher.WRAP_MODE, and
- * Cipher.UNWRAP_MODE.
+ * The cipher only supports the following two operation modes:
+ * {@code Cipher.WRAP_MODE}, and {@code Cipher.UNWRAP_MODE}.
* For modes other than the above two, UnsupportedOperationException
* will be thrown.
* If this cipher requires an initialization vector (IV), it will get
@@ -360,15 +357,15 @@
* current Cipher.engineInit(...) implementation,
* IllegalStateException will always be thrown upon invocation.
*
- * @param in the input buffer.
- * @param inOffset the offset in A newLine() method is provided, which uses the platform's own notion of
- * line separator as defined by the system property line.separator.
+ * line separator as defined by the system property {@code line.separator}.
* Not all platforms use the newline character ('\n') to terminate lines.
* Calling this method to terminate each output line is therefore preferred to
* writing a newline character directly.
@@ -195,7 +195,7 @@
/**
* Writes a portion of a String.
*
- * If the value of the len parameter is negative then no
+ * If the value of the {@code len} parameter is negative then no
* characters are written. This is contrary to the specification of this
* method in the {@linkplain java.io.Writer#write(java.lang.String,int,int)
* superclass}, which requires that an {@link IndexOutOfBoundsException} be
@@ -225,7 +225,7 @@
/**
* Writes a line separator. The line separator string is defined by the
- * system property line.separator, and is not necessarily a single
+ * system property {@code line.separator}, and is not necessarily a single
* newline ('\n') character.
*
* @exception IOException If an I/O error occurs
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java
--- a/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ByteArrayInputStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,9 +32,9 @@
* counter keeps track of the next byte to
* be supplied by the
- * Closing a ByteArrayInputStream has no effect. The methods in
+ * Closing a {@code ByteArrayInputStream} has no effect. The methods in
* this class can be called after the stream has been closed without
- * generating an IOException.
+ * generating an {@code IOException}.
*
* @author Arthur van Hoff
* @see java.io.StringBufferInputStream
@@ -272,9 +272,9 @@
}
/**
- * Closing a ByteArrayInputStream has no effect. The methods in
+ * Closing a {@code ByteArrayInputStream} has no effect. The methods in
* this class can be called after the stream has been closed without
- * generating an IOException.
+ * generating an {@code IOException}.
*/
public void close() throws IOException {
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java
--- a/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/ByteArrayOutputStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -31,12 +31,12 @@
* This class implements an output stream in which the data is
* written into a byte array. The buffer automatically grows as data
* is written to it.
- * The data can be retrieved using
- * Closing a ByteArrayOutputStream has no effect. The methods in
+ * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
* this class can be called after the stream has been closed without
- * generating an IOException.
+ * generating an {@code IOException}.
*
* @author Arthur van Hoff
* @since 1.0
@@ -138,8 +138,8 @@
}
/**
- * Writes This method always replaces malformed-input and unmappable-character
@@ -251,14 +251,14 @@
* copied into it. Each character c in the resulting string is
* constructed from the corresponding element b in the byte
* array such that:
- * The resulting reader will start reading at the given
- * offset. The total number of char values that can be
- * read from this reader will be either length or
- * buf.length-offset, whichever is smaller.
+ * {@code offset}. The total number of {@code char} values that can be
+ * read from this reader will be either {@code length} or
+ * {@code buf.length-offset}, whichever is smaller.
*
* @throws IllegalArgumentException
- * If offset is negative or greater than
- * buf.length, or if length is negative, or if
+ * If {@code offset} is negative or greater than
+ * {@code buf.length}, or if {@code length} is negative, or if
* the sum of these two values is negative.
*
* @param buf Input buffer (not copied)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/CharArrayWriter.java
--- a/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/CharArrayWriter.java Wed Jul 05 20:44:51 2017 +0200
@@ -141,21 +141,21 @@
/**
* Appends the specified character sequence to this writer.
*
- * An invocation of this method of the form out.append(csq)
+ * An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation
*
* Depending on the specification of toString for the
- * character sequence csq, the entire sequence may not be
- * appended. For instance, invoking the toString method of a
+ * Depending on the specification of {@code toString} for the
+ * character sequence {@code csq}, the entire sequence may not be
+ * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon
* the buffer's position and limit.
*
* @param csq
- * The character sequence to append. If csq is
- * null, then the four characters "null" are
+ * The character sequence to append. If {@code csq} is
+ * {@code null}, then the four characters "{@code null}" are
* appended to this writer.
*
* @return This writer
@@ -171,8 +171,9 @@
/**
* Appends a subsequence of the specified character sequence to this writer.
*
- * An invocation of this method of the form out.append(csq, start,
- * end) when csq is not null, behaves in
+ * An invocation of this method of the form
+ * {@code out.append(csq, start, end)} when
+ * {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation
*
* An invocation of this method of the form out.append(c)
+ * An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation
*
*
* Read and write operations are synchronized to guarantee the atomic
* completion of critical operations; therefore invoking methods
@@ -56,17 +56,17 @@
* on the objects returned by {@link #reader()} and {@link #writer()} may
* block in multithreaded scenarios.
*
- * Invoking close() on the objects returned by the {@link #reader()}
+ * Invoking {@code close()} on the objects returned by the {@link #reader()}
* and the {@link #writer()} will not close the underlying stream of those
* objects.
*
- * The console-read methods return null when the end of the
+ * The console-read methods return {@code null} when the end of the
* console input stream is reached, for example by typing control-D on
* Unix or control-Z on Windows. Subsequent read operations will succeed
* if additional characters are later entered on the console's input
* device.
*
- * Unless otherwise specified, passing a null argument to any method
+ * Unless otherwise specified, passing a {@code null} argument to any method
* in this class will cause a {@link NullPointerException} to be thrown.
*
* Security note:
@@ -107,7 +107,7 @@
*
* This method is intended to be used by sophisticated applications, for
* example, a {@link java.util.Scanner} object which utilizes the rich
- * parsing/scanning functionality provided by the Scanner:
+ * parsing/scanning functionality provided by the {@code Scanner}:
*
* For simple applications requiring only line-oriented reading, use
- * {@link #readLine}.
+ * {@link #readLine}.
*
* The bulk read operations {@link java.io.Reader#read(char[]) read(char[]) },
* {@link java.io.Reader#read(char[], int, int) read(char[], int, int) } and
@@ -126,8 +126,8 @@
* bound for each invocation, even if the destination buffer has space for
* more characters. The {@code Reader}'s {@code read} methods may block if a
* line bound has not been entered or reached on the console's input device.
- * A line bound is considered to be any one of a line feed ('\n'),
- * a carriage return ('\r'), a carriage return followed immediately
+ * A line bound is considered to be any one of a line feed ({@code '\n'}),
+ * a carriage return ({@code '\r'}), a carriage return followed immediately
* by a linefeed, or an end of stream.
*
* @return The reader associated with this console
@@ -152,7 +152,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws IllegalFormatException
@@ -175,8 +175,9 @@
* A convenience method to write a formatted string to this console's
* output stream using the specified format string and arguments.
*
- * An invocation of this method of the form con.printf(format,
- * args) behaves in exactly the same way as the invocation of
+ * An invocation of this method of the form
+ * {@code con.printf(format, args)} behaves in exactly the same way
+ * as the invocation of
* The parent of an abstract pathname may be obtained by invoking
* the {@link #getParent} method of this class and consists of the pathname's
* prefix and each name in the pathname's name sequence except for the last.
- * Each directory's absolute pathname is an ancestor of any File
+ * Each directory's absolute pathname is an ancestor of any {@code File}
* object with an absolute abstract pathname which begins with the directory's
* absolute pathname. For example, the directory denoted by the abstract
- * pathname "/usr" is an ancestor of the directory denoted by the
- * pathname "/usr/local/bin".
+ * pathname {@code "/usr"} is an ancestor of the directory denoted by the
+ * pathname {@code "/usr/local/bin"}.
*
* The prefix concept is used to handle root directories on UNIX platforms,
* and drive specifiers, root directories and UNC pathnames on Microsoft Windows platforms,
@@ -217,7 +217,7 @@
/**
* The system-dependent default name-separator character, represented as a
* string for convenience. This string contains a single character, namely
- * The exact form of a file: URI is system-dependent, hence
+ * The exact form of a {@code file:} URI is system-dependent, hence
* the transformation performed by this constructor is also
* system-dependent.
*
* For a given abstract pathname f it is guaranteed that
*
- * If this abstract pathname is already absolute, then the pathname
- * string is simply returned as if by the The exact form of the URI is system-dependent. If it can be
* determined that the file denoted by this abstract pathname is a
@@ -695,15 +696,16 @@
*
* For a given abstract pathname f, it is guaranteed that
*
- * An invocation of this method of the form file.setWritable(arg)
+ * An invocation of this method of the form {@code file.setWritable(arg)}
* behaves in exactly the same way as the invocation
*
- * An invocation of this method of the form file.setReadable(arg)
+ * An invocation of this method of the form {@code file.setReadable(arg)}
* behaves in exactly the same way as the invocation
*
- * An invocation of this method of the form file.setExcutable(arg)
+ * An invocation of this method of the form {@code file.setExcutable(arg)}
* behaves in exactly the same way as the invocation
*
- * The The {@link
* java.nio.file.Files#createTempFile(String,String,java.nio.file.attribute.FileAttribute[])
@@ -2059,8 +2064,8 @@
* @throws IOException If a file could not be created
*
* @throws SecurityException
- * If a security manager exists and its {@code FileReader} is meant for reading streams of characters.
* For reading streams of raw bytes, consider using a
- * Whether or not a file is available or may be created depends upon the
* underlying platform. Some platforms, in particular, allow a file to be
- * opened for writing by only one FileWriter (or other file-writing
+ * opened for writing by only one {@code FileWriter} (or other file-writing
* object) at a time. In such situations the constructors in this class
* will fail if the file involved is already open.
*
- * {@code FileWriter} is meant for writing streams of characters.
* For writing streams of raw bytes, consider using a
- *
* The
- * Implements the abstract write method of OutputStream.
+ * Implements the abstract {@code write} method of {@code OutputStream}.
*
* @param b the By default, line numbering begins at 0. This number increments at every
* line terminator as the data is read, and can be changed
- * with a call to setLineNumber(int). Note however, that
- * setLineNumber(int) does not actually change the current position in
+ * with a call to {@code setLineNumber(int)}. Note however, that
+ * {@code setLineNumber(int)} does not actually change the current position in
* the stream; it only changes the value that will be returned by
- * getLineNumber().
+ * {@code getLineNumber()}.
*
* A line is considered to be terminated by any one of a
* line feed ('\n'), a carriage return ('\r'), or a carriage return followed
@@ -193,7 +193,7 @@
*
* @return A String containing the contents of the line, not including
* any line termination characters, or
- * null if the end of the stream has been reached
+ * {@code null} if the end of the stream has been reached
*
* @throws IOException
* If an I/O error occurs
@@ -226,7 +226,7 @@
* If an I/O error occurs
*
* @throws IllegalArgumentException
- * If n is negative
+ * If {@code n} is negative
*/
public long skip(long n) throws IOException {
if (n < 0)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/OutputStream.java
--- a/jdk/src/java.base/share/classes/java/io/OutputStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/OutputStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -94,7 +94,7 @@
*
* If A surrogate pair is a character represented by a sequence of two
- * char values: A high surrogate in the range '\uD800' to
+ * {@code char} values: A high surrogate in the range '\uD800' to
* '\uDBFF' followed by a low surrogate in the range '\uDC00' to
* '\uDFFF'.
*
@@ -161,7 +161,7 @@
* If this instance was created with the {@link
* #OutputStreamWriter(OutputStream, String)} constructor then the returned
* name, being unique for the encoding, may differ from the name passed to
- * the constructor. This method may return null if the stream has
+ * the constructor. This method may return {@code null} if the stream has
* been closed. All characters printed by a All characters printed by a {@code PrintStream} are converted into
+ * bytes using the platform's default character encoding.
+ * The {@link PrintWriter} class should be used in situations that require
+ * writing characters rather than bytes.
*
* @author Frank Yellin
* @author Mark Reinhold
@@ -142,8 +142,8 @@
* printed
* @param autoFlush A boolean; if true, the output buffer will be flushed
* whenever a byte array is written, one of the
- * This method will cause subsequent invocations of {@link
- * #checkError()} to return true until {@link
- * #clearError()} is invoked.
+ * #checkError()} to return {@code true} until
+ * {@link #clearError()} is invoked.
*
* @since 1.1
*/
@@ -414,7 +414,7 @@
* Clears the internal error state of this stream.
*
* This method will cause subsequent invocations of {@link
- * #checkError()} to return false until another write
+ * #checkError()} to return {@code false} until another write
* operation fails and invokes {@link #setError()}.
*
* @since 1.6
@@ -430,12 +430,12 @@
/**
* Writes the specified byte to this stream. If the byte is a newline and
- * automatic flushing is enabled then the Note that the byte is written as given; to write a character that
* will be translated according to the platform's default character
- * encoding, use the Note that the bytes will be written as given; to write characters
* that will be translated according to the platform's default character
- * encoding, use the An invocation of this method of the form out.printf(format,
- * args) behaves in exactly the same way as the invocation
+ * An invocation of this method of the form
+ * {@code out.printf(format, args)} behaves
+ * in exactly the same way as the invocation
*
- * An invocation of this method of the form out.printf(l, format,
- * args) behaves in exactly the same way as the invocation
+ * An invocation of this method of the form
+ * {@code out.printf(l, format, args)} behaves
+ * in exactly the same way as the invocation
*
- * An invocation of this method of the form out.append(csq)
+ * An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation
*
- * Depending on the specification of toString for the
- * character sequence csq, the entire sequence may not be
- * appended. For instance, invoking then toString method of a
+ * Depending on the specification of {@code toString} for the
+ * character sequence {@code csq}, the entire sequence may not be
+ * appended. For instance, invoking then {@code toString} method of a
* character buffer will return a subsequence whose content depends upon
* the buffer's position and limit.
*
* @param csq
- * The character sequence to append. If csq is
- * null, then the four characters "null" are
+ * The character sequence to append. If {@code csq} is
+ * {@code null}, then the four characters {@code "null"} are
* appended to this output stream.
*
* @return This output stream
@@ -1070,18 +1075,20 @@
* Appends a subsequence of the specified character sequence to this output
* stream.
*
- * An invocation of this method of the form out.append(csq, start,
- * end) when csq is not null, behaves in
+ * An invocation of this method of the form
+ * {@code out.append(csq, start, end)} when
+ * {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation
*
- * An invocation of this method of the form out.append(c)
+ * An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation
*
- * Unlike the {@link PrintStream} class, if automatic flushing is enabled
- * it will be done only when one of the println, printf, or
- * format methods is invoked, rather than whenever a newline character
+ * it will be done only when one of the {@code println}, {@code printf}, or
+ * {@code format} methods is invoked, rather than whenever a newline character
* happens to be output. These methods use the platform's own notion of line
* separator rather than the newline character.
*
@@ -57,7 +57,7 @@
/**
* The underlying character-output stream of this
- * This method will cause subsequent invocations of {@link
- * #checkError()} to return true until {@link
+ * #checkError()} to return {@code true} until {@link
* #clearError()} is invoked.
*/
protected void setError() {
@@ -372,7 +372,7 @@
* Clears the error state of this stream.
*
* This method will cause subsequent invocations of {@link
- * #checkError()} to return false until another write
+ * #checkError()} to return {@code false} until another write
* operation fails and invokes {@link #setError()}.
*
* @since 1.6
@@ -485,13 +485,13 @@
/* Methods that do not terminate lines */
/**
- * Prints a boolean value. The string produced by An invocation of this method of the form out.printf(format,
- * args) behaves in exactly the same way as the invocation
+ * An invocation of this method of the form
+ * {@code out.printf(format, args)}
+ * behaves in exactly the same way as the invocation
*
- * An invocation of this method of the form out.printf(l, format,
- * args) behaves in exactly the same way as the invocation
+ * An invocation of this method of the form
+ * {@code out.printf(l, format, args)}
+ * behaves in exactly the same way as the invocation
*
- * An invocation of this method of the form out.append(csq)
+ * An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation
*
- * Depending on the specification of toString for the
- * character sequence csq, the entire sequence may not be
- * appended. For instance, invoking the toString method of a
+ * Depending on the specification of {@code toString} for the
+ * character sequence {@code csq}, the entire sequence may not be
+ * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon
* the buffer's position and limit.
*
* @param csq
- * The character sequence to append. If csq is
- * null, then the four characters "null" are
+ * The character sequence to append. If {@code csq} is
+ * {@code null}, then the four characters {@code "null"} are
* appended to this writer.
*
* @return This writer
@@ -1000,18 +1005,20 @@
/**
* Appends a subsequence of the specified character sequence to this writer.
*
- * An invocation of this method of the form out.append(csq, start,
- * end) when csq is not null, behaves in
+ * An invocation of this method of the form
+ * {@code out.append(csq, start, end)}
+ * when {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation
*
- * An invocation of this method of the form out.append(c)
+ * An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation
*
- * The mode argument specifies the access mode with which the
+ * The {@code mode} argument specifies the access mode with which the
* file is to be opened. The permitted values and their meanings are as
* specified for the RandomAccessFile(File,String) constructor.
+ * href="#mode">{@code RandomAccessFile(File,String)} constructor.
*
*
* If there is a security manager, its {@code checkRead} method
@@ -99,19 +99,19 @@
* @param name the system-dependent filename
* @param mode the access mode
* @exception IllegalArgumentException if the mode argument is not equal
- * to one of "r", "rw", "rws", or
- * "rwd"
+ * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
+ * {@code "rwd"}
* @exception FileNotFoundException
- * if the mode is "r" but the given string does not
+ * if the mode is {@code "r"} but the given string does not
* denote an existing regular file, or if the mode begins with
- * "rw" but the given string does not denote an
+ * {@code "rw"} but the given string does not denote an
* existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs
* while opening or creating the file
- * @exception SecurityException if a security manager exists and its
- * {@code checkRead} method denies read access to the file
- * or the mode is "rw" and the security manager's
- * {@code checkWrite} method denies write access to the file
+ * @exception SecurityException if a security manager exists and its
+ * {@code checkRead} method denies read access to the file
+ * or the mode is {@code "rw"} and the security manager's
+ * {@code checkWrite} method denies write access to the file
* @see java.lang.SecurityException
* @see java.lang.SecurityManager#checkRead(java.lang.String)
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
@@ -129,33 +129,33 @@
* write to, the file specified by the {@link File} argument. A new {@link
* FileDescriptor} object is created to represent this file connection.
*
- * The mode argument specifies the access mode
+ * The {@code mode} argument specifies the access mode
* in which the file is to be opened. The permitted values and their
* meanings are:
*
* The "rwd" mode can be used to reduce the number of I/O
- * operations performed. Using "rwd" only requires updates to the
- * file's content to be written to storage; using "rws" requires
+ * The {@code "rwd"} mode can be used to reduce the number of I/O
+ * operations performed. Using {@code "rwd"} only requires updates to the
+ * file's content to be written to storage; using {@code "rws"} requires
* updates to both the file's content and its metadata to be written, which
* generally requires at least one more low-level I/O operation.
*
@@ -181,19 +181,19 @@
* @param mode the access mode, as described
* above
* @exception IllegalArgumentException if the mode argument is not equal
- * to one of "r", "rw", "rws", or
- * "rwd"
+ * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or
+ * {@code "rwd"}
* @exception FileNotFoundException
- * if the mode is "r" but the given file object does
+ * if the mode is {@code "r"} but the given file object does
* not denote an existing regular file, or if the mode begins
- * with "rw" but the given file object does not denote
+ * with {@code "rw"} but the given file object does not denote
* an existing, writable regular file and a new regular file of
* that name cannot be created, or if some other error occurs
* while opening or creating the file
- * @exception SecurityException if a security manager exists and its
- * {@code checkRead} method denies read access to the file
- * or the mode is "rw" and the security manager's
- * {@code checkWrite} method denies write access to the file
+ * @exception SecurityException if a security manager exists and its
+ * {@code checkRead} method denies read access to the file
+ * or the mode is {@code "rw"} and the security manager's
+ * {@code checkWrite} method denies write access to the file
* @see java.lang.SecurityManager#checkRead(java.lang.String)
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
* @see java.nio.channels.FileChannel#force(boolean)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/Reader.java
--- a/jdk/src/java.base/share/classes/java/io/Reader.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/Reader.java Wed Jul 05 20:44:51 2017 +0200
@@ -54,7 +54,7 @@
* The object used to synchronize operations on this stream. For
* efficiency, a character-stream object may use an object other than
* itself to protect critical sections. A subclass should therefore use
- * the object in this field rather than this or a synchronized
+ * the object in this field rather than {@code this} or a synchronized
* method.
*/
protected Object lock;
@@ -111,7 +111,7 @@
* should override this method.
*
* @return The character read, as an integer in the range 0 to 65535
- * (0x00-0xffff), or -1 if the end of the stream has
+ * ({@code 0x00-0xffff}), or -1 if the end of the stream has
* been reached
*
* @exception IOException If an I/O error occurs
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/StringWriter.java
--- a/jdk/src/java.base/share/classes/java/io/StringWriter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/StringWriter.java Wed Jul 05 20:44:51 2017 +0200
@@ -30,9 +30,9 @@
* A character stream that collects its output in a string buffer, which can
* then be used to construct a string.
*
- * Closing a StringWriter has no effect. The methods in this class
+ * Closing a {@code StringWriter} has no effect. The methods in this class
* can be called after the stream has been closed without generating an
- * IOException.
+ * {@code IOException}.
*
* @author Mark Reinhold
* @since 1.1
@@ -56,11 +56,11 @@
* size.
*
* @param initialSize
- * The number of char values that will fit into this buffer
+ * The number of {@code char} values that will fit into this buffer
* before it is automatically expanded
*
* @throws IllegalArgumentException
- * If initialSize is negative
+ * If {@code initialSize} is negative
*/
public StringWriter(int initialSize) {
if (initialSize < 0) {
@@ -115,21 +115,21 @@
/**
* Appends the specified character sequence to this writer.
*
- * An invocation of this method of the form out.append(csq)
+ * An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation
*
* Depending on the specification of toString for the
- * character sequence csq, the entire sequence may not be
- * appended. For instance, invoking the toString method of a
+ * Depending on the specification of {@code toString} for the
+ * character sequence {@code csq}, the entire sequence may not be
+ * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon
* the buffer's position and limit.
*
* @param csq
- * The character sequence to append. If csq is
- * null, then the four characters "null" are
+ * The character sequence to append. If {@code csq} is
+ * {@code null}, then the four characters "{@code null}" are
* appended to this writer.
*
* @return This writer
@@ -147,18 +147,20 @@
/**
* Appends a subsequence of the specified character sequence to this writer.
*
- * An invocation of this method of the form out.append(csq, start,
- * end) when csq is not null, behaves in
+ * An invocation of this method of the form
+ * {@code out.append(csq, start, end)} when {@code csq}
+ * is not {@code null}, behaves in
* exactly the same way as the invocation
*
- * An invocation of this method of the form out.append(c)
+ * An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation
*
* An invocation of this method of the form out.append(csq)
+ * An invocation of this method of the form {@code out.append(csq)}
* behaves in exactly the same way as the invocation
*
* Depending on the specification of toString for the
- * character sequence csq, the entire sequence may not be
- * appended. For instance, invoking the toString method of a
+ * Depending on the specification of {@code toString} for the
+ * character sequence {@code csq}, the entire sequence may not be
+ * appended. For instance, invoking the {@code toString} method of a
* character buffer will return a subsequence whose content depends upon
* the buffer's position and limit.
*
* @param csq
- * The character sequence to append. If csq is
- * null, then the four characters "null" are
+ * The character sequence to append. If {@code csq} is
+ * {@code null}, then the four characters "{@code null}" are
* appended to this writer.
*
* @return This writer
@@ -230,20 +230,22 @@
/**
* Appends a subsequence of the specified character sequence to this writer.
- * Appendable.
+ * {@code Appendable}.
*
- * An invocation of this method of the form out.append(csq, start,
- * end) when csq is not null behaves in exactly the
+ * An invocation of this method of the form
+ * {@code out.append(csq, start, end)} when {@code csq}
+ * is not {@code null} behaves in exactly the
* same way as the invocation
*
- * An invocation of this method of the form out.append(c)
+ * An invocation of this method of the form {@code out.append(c)}
* behaves in exactly the same way as the invocation
*
* The characters to be appended should be valid Unicode characters as
* described in Unicode Character
* Representation. Note that supplementary characters may be composed of
- * multiple 16-bit char values.
+ * multiple 16-bit {@code char} values.
*
* Appendables are not necessarily safe for multithreaded access. Thread
* safety is the responsibility of classes that extend and implement this
@@ -51,19 +51,19 @@
public interface Appendable {
/**
- * Appends the specified character sequence to this Appendable.
+ * Appends the specified character sequence to this {@code Appendable}.
*
* Depending on which class implements the character sequence
- * csq, the entire sequence may not be appended. For
- * instance, if csq is a {@link java.nio.CharBuffer} then
+ * {@code csq}, the entire sequence may not be appended. For
+ * instance, if {@code csq} is a {@link java.nio.CharBuffer} then
* the subsequence to append is defined by the buffer's position and limit.
*
* @param csq
- * The character sequence to append. If csq is
- * null, then the four characters "null" are
+ * The character sequence to append. If {@code csq} is
+ * {@code null}, then the four characters {@code "null"} are
* appended to this Appendable.
*
- * @return A reference to this Appendable
+ * @return A reference to this {@code Appendable}
*
* @throws IOException
* If an I/O error occurs
@@ -72,10 +72,10 @@
/**
* Appends a subsequence of the specified character sequence to this
- * Appendable.
+ * {@code Appendable}.
*
- * An invocation of this method of the form out.append(csq, start,
- * end) when csq is not null, behaves in
+ * An invocation of this method of the form {@code out.append(csq, start, end)}
+ * when {@code csq} is not {@code null}, behaves in
* exactly the same way as the invocation
*
* In the case of conflicting directives for the same class, the
* last directive for a given class wins. In other words, if a string
- * s appears multiple times in the classes array
- * and i is the highest integer for which
- * classes[i].equals(s), then classEnabled[i]
- * indicates whether assertions are to be enabled in class s.
+ * {@code s} appears multiple times in the {@code classes} array
+ * and {@code i} is the highest integer for which
+ * {@code classes[i].equals(s)}, then {@code classEnabled[i]}
+ * indicates whether assertions are to be enabled in class {@code s}.
*/
boolean[] classEnabled;
@@ -68,21 +68,21 @@
String[] packages;
/**
- * A parallel array to packages, indicating whether each
+ * A parallel array to {@code packages}, indicating whether each
* package-tree is to have assertions enabled or disabled. A value of
- * true for packageEnabled[i] indicates that the
- * package-tree named by packages[i] should have assertions
- * enabled; a value of false indicates that it should have
+ * {@code true} for {@code packageEnabled[i]} indicates that the
+ * package-tree named by {@code packages[i]} should have assertions
+ * enabled; a value of {@code false} indicates that it should have
* assertions disabled. This array must have the same number of
- * elements as packages.
+ * elements as {@code packages}.
*
* In the case of conflicting directives for the same package-tree, the
* last directive for a given package-tree wins. In other words, if a
- * string s appears multiple times in the packages array
- * and i is the highest integer for which
- * packages[i].equals(s), then packageEnabled[i]
+ * string {@code s} appears multiple times in the {@code packages} array
+ * and {@code i} is the highest integer for which
+ * {@code packages[i].equals(s)}, then {@code packageEnabled[i]}
* indicates whether assertions are to be enabled in package-tree
- * s.
+ * {@code s}.
*/
boolean[] packageEnabled;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/CharSequence.java
--- a/jdk/src/java.base/share/classes/java/lang/CharSequence.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/CharSequence.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,21 +34,21 @@
import java.util.stream.StreamSupport;
/**
- * A CharSequence is a readable sequence of This interface does not refine the general contracts of the {@link
* java.lang.Object#equals(java.lang.Object) equals} and {@link
* java.lang.Object#hashCode() hashCode} methods. The result of comparing two
- * objects that implement CharSequence is therefore, in general,
+ * objects that implement {@code CharSequence} is therefore, in general,
* undefined. Each object may be implemented by a different class, and there
* is no guarantee that each class will be capable of testing its instances
* for equality with those of the other. It is therefore inappropriate to use
- * arbitrary CharSequence instances as elements in a set or as keys in
+ * arbitrary {@code CharSequence} instances as elements in a set or as keys in
* a map. If the If the {@code char} value specified by the index is a
* surrogate, the surrogate
* value is returned.
*
- * @param index the index of the
@@ -7195,8 +7195,8 @@
/**
* Returns the UnicodeScript constant with the given Unicode script
* name or the script name alias. Script names and their aliases are
- * determined by The Unicode Standard. The files Scripts<version>.txt
- * and PropertyValueAliases<version>.txt define script names
+ * determined by The Unicode Standard. The files {@code Scripts This method predates the general-purpose exception chaining facility.
* The {@link Throwable#getCause()} method is now the preferred means of
@@ -114,7 +114,7 @@
/**
* Returns the cause of this exception (the exception that was raised
* if an error occurred while attempting to load the class; otherwise
- * null).
+ * {@code null}).
*
* @return the cause of this exception.
* @since 1.4
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Cloneable.java
--- a/jdk/src/java.base/share/classes/java/lang/Cloneable.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Cloneable.java Wed Jul 05 20:44:51 2017 +0200
@@ -36,11 +36,11 @@
*
* By convention, classes that implement this interface should override
- * Object.clone (which is protected) with a public method.
+ * {@code Object.clone} (which is protected) with a public method.
* See {@link java.lang.Object#clone()} for details on overriding this
* method.
*
- * Note that this interface does not contain the clone method.
+ * Note that this interface does not contain the {@code clone} method.
* Therefore, it is not possible to clone an object merely by virtue of the
* fact that it implements this interface. Even if the clone method is invoked
* reflectively, there is no guarantee that it will succeed.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Comparable.java
--- a/jdk/src/java.base/share/classes/java/lang/Comparable.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Comparable.java Wed Jul 05 20:44:51 2017 +0200
@@ -29,7 +29,7 @@
/**
* This interface imposes a total ordering on the objects of each class that
* implements it. This ordering is referred to as the class's natural
- * ordering, and the class's compareTo method is referred to as
+ * ordering, and the class's {@code compareTo} method is referred to as
* its natural comparison method.
*
* Lists (and arrays) of objects that implement this interface can be sorted
@@ -39,45 +39,45 @@
* elements in a {@linkplain SortedSet sorted set}, without the need to
* specify a {@linkplain Comparator comparator}.
*
- * The natural ordering for a class C is said to be consistent
- * with equals if and only if e1.compareTo(e2) == 0 has
- * the same boolean value as e1.equals(e2) for every
- * e1 and e2 of class C. Note that null
- * is not an instance of any class, and e.compareTo(null) should
- * throw a NullPointerException even though e.equals(null)
- * returns false.
+ * The natural ordering for a class {@code C} is said to be consistent
+ * with equals if and only if {@code e1.compareTo(e2) == 0} has
+ * the same boolean value as {@code e1.equals(e2)} for every
+ * {@code e1} and {@code e2} of class {@code C}. Note that {@code null}
+ * is not an instance of any class, and {@code e.compareTo(null)} should
+ * throw a {@code NullPointerException} even though {@code e.equals(null)}
+ * returns {@code false}.
*
* It is strongly recommended (though not required) that natural orderings be
* consistent with equals. This is so because sorted sets (and sorted maps)
* without explicit comparators behave "strangely" when they are used with
* elements (or keys) whose natural ordering is inconsistent with equals. In
* particular, such a sorted set (or sorted map) violates the general contract
- * for set (or map), which is defined in terms of the equals
+ * for set (or map), which is defined in terms of the {@code equals}
* method.
*
- * For example, if one adds two keys a and b such that
+ * For example, if one adds two keys {@code a} and {@code b} such that
* {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted
- * set that does not use an explicit comparator, the second add
+ * set that does not use an explicit comparator, the second {@code add}
* operation returns false (and the size of the sorted set does not increase)
- * because a and b are equivalent from the sorted set's
+ * because {@code a} and {@code b} are equivalent from the sorted set's
* perspective.
*
- * Virtually all Java core classes that implement Comparable have natural
+ * Virtually all Java core classes that implement {@code Comparable} have natural
* orderings that are consistent with equals. One exception is
- * java.math.BigDecimal, whose natural ordering equates
- * BigDecimal objects with equal values and different precisions
+ * {@code java.math.BigDecimal}, whose natural ordering equates
+ * {@code BigDecimal} objects with equal values and different precisions
* (such as 4.0 and 4.00).
*
* For the mathematically inclined, the relation that defines
- * the natural ordering on a given class C is: The implementor must ensure sgn(x.compareTo(y)) ==
- * -sgn(y.compareTo(x)) for all x and y. (This
- * implies that x.compareTo(y) must throw an exception iff
- * y.compareTo(x) throws an exception.)
+ * The implementor must ensure
+ * {@code sgn(x.compareTo(y)) == -sgn(y.compareTo(x))}
+ * for all {@code x} and {@code y}. (This
+ * implies that {@code x.compareTo(y)} must throw an exception iff
+ * {@code y.compareTo(x)} throws an exception.)
*
* The implementor must also ensure that the relation is transitive:
- * (x.compareTo(y)>0 && y.compareTo(z)>0) implies
- * x.compareTo(z)>0.
+ * {@code (x.compareTo(y) > 0 && y.compareTo(z) > 0)} implies
+ * {@code x.compareTo(z) > 0}.
*
- * Finally, the implementor must ensure that x.compareTo(y)==0
- * implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for
- * all z.
+ * Finally, the implementor must ensure that {@code x.compareTo(y)==0}
+ * implies that {@code sgn(x.compareTo(z)) == sgn(y.compareTo(z))}, for
+ * all {@code z}.
*
* It is strongly recommended, but not strictly required that
- * (x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any
- * class that implements the Comparable interface and violates
+ * {@code (x.compareTo(y)==0) == (x.equals(y))}. Generally speaking, any
+ * class that implements the {@code Comparable} interface and violates
* this condition should clearly indicate this fact. The recommended
* language is "Note: this class has a natural ordering that is
* inconsistent with equals."
*
* In the foregoing description, the notation
- * sgn(expression) designates the mathematical
- * signum function, which is defined to return one of -1,
- * 0, or 1 according to whether the value of
+ * {@code sgn(}expression{@code )} designates the mathematical
+ * signum function, which is defined to return one of {@code -1},
+ * {@code 0}, or {@code 1} according to whether the value of
* expression is negative, zero or positive.
*
* @param o the object to be compared.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java
--- a/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/EnumConstantNotPresentException.java Wed Jul 05 20:44:51 2017 +0200
@@ -51,7 +51,7 @@
private String constantName;
/**
- * Constructs an EnumConstantNotPresentException for the
+ * Constructs an {@code EnumConstantNotPresentException} for the
* specified constant.
*
* @param enumType the type of the missing enum constant
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Exception.java
--- a/jdk/src/java.base/share/classes/java/lang/Exception.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Exception.java Wed Jul 05 20:44:51 2017 +0200
@@ -75,7 +75,7 @@
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A null value is
+ * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
@@ -86,14 +86,14 @@
/**
* Constructs a new exception with the specified cause and a detail
- * message of (cause==null ? null : cause.toString()) (which
- * typically contains the class and detail message of cause).
+ * message of {@code (cause==null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}).
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A null value is
+ * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java
--- a/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/IllegalArgumentException.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,7 +63,7 @@
* @param message the detail message (which is saved for later retrieval
* by the {@link Throwable#getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link Throwable#getCause()} method). (A null value
+ * {@link Throwable#getCause()} method). (A {@code null} value
* is permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.5
@@ -74,14 +74,14 @@
/**
* Constructs a new exception with the specified cause and a detail
- * message of (cause==null ? null : cause.toString()) (which
- * typically contains the class and detail message of cause).
+ * message of {@code (cause==null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}).
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link Throwable#getCause()} method). (A null value is
+ * {@link Throwable#getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.5
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/IllegalStateException.java
--- a/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/IllegalStateException.java Wed Jul 05 20:44:51 2017 +0200
@@ -66,7 +66,7 @@
* @param message the detail message (which is saved for later retrieval
* by the {@link Throwable#getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link Throwable#getCause()} method). (A null value
+ * {@link Throwable#getCause()} method). (A {@code null} value
* is permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.5
@@ -77,14 +77,14 @@
/**
* Constructs a new exception with the specified cause and a detail
- * message of (cause==null ? null : cause.toString()) (which
- * typically contains the class and detail message of cause).
+ * message of {@code (cause==null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}).
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link Throwable#getCause()} method). (A null value is
+ * {@link Throwable#getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.5
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java
--- a/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/InheritableThreadLocal.java Wed Jul 05 20:44:51 2017 +0200
@@ -27,12 +27,12 @@
import java.lang.ref.*;
/**
- * This class extends ThreadLocal to provide inheritance of values
+ * This class extends {@code ThreadLocal} to provide inheritance of values
* from parent thread to child thread: when a child thread is created, the
* child receives initial values for all inheritable thread-local variables
* for which the parent has values. Normally the child's values will be
* identical to the parent's; however, the child's value can be made an
- * arbitrary function of the parent's by overriding the childValue
+ * arbitrary function of the parent's by overriding the {@code childValue}
* method in this class.
*
* Inheritable thread-local variables are used in preference to
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Readable.java
--- a/jdk/src/java.base/share/classes/java/lang/Readable.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Readable.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,8 +28,8 @@
import java.io.IOException;
/**
- * A Readable is a source of characters. Characters from
- * a Readable are made available to callers of the read
+ * A {@code Readable} is a source of characters. Characters from
+ * a {@code Readable} are made available to callers of the read
* method via a {@link java.nio.CharBuffer CharBuffer}.
*
* @since 1.5
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/RuntimeException.java
--- a/jdk/src/java.base/share/classes/java/lang/RuntimeException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/RuntimeException.java Wed Jul 05 20:44:51 2017 +0200
@@ -71,7 +71,7 @@
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A null value is
+ * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
@@ -81,13 +81,13 @@
}
/** Constructs a new runtime exception with the specified cause and a
- * detail message of (cause==null ? null : cause.toString())
+ * detail message of {@code (cause==null ? null : cause.toString())}
* (which typically contains the class and detail message of
- * cause). This constructor is useful for runtime exceptions
+ * {@code cause}). This constructor is useful for runtime exceptions
* that are little more than wrappers for other throwables.
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A null value is
+ * {@link #getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/RuntimePermission.java
--- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java Wed Jul 05 20:44:51 2017 +0200
@@ -172,9 +172,8 @@
* Unless otherwise noted, passing a null argument to a constructor
+ * Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in this class will cause a {@link NullPointerException} to be
* thrown.
*
@@ -1135,7 +1135,7 @@
* or both. If they have different characters at one or more index
* positions, let k be the smallest such index; then the string
* whose character at position k has the smaller value, as
- * determined by using the < operator, lexicographically precedes the
+ * determined by using the {@code <} operator, lexicographically precedes the
* other string. In this case, {@code compareTo} returns the
* difference of the two character values at position {@code k} in
* the two string -- that is, the value:
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/System.java
--- a/jdk/src/java.base/share/classes/java/lang/System.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/System.java Wed Jul 05 20:44:51 2017 +0200
@@ -205,7 +205,7 @@
* Returns the unique {@link java.io.Console Console} object associated
* with the current Java virtual machine, if any.
*
- * @return The system console, if any, otherwise null.
+ * @return The system console, if any, otherwise {@code null}.
*
* @since 1.6
*/
@@ -232,7 +232,7 @@
* inheritedChannel}, this method may return other kinds of
* channels in the future.
*
- * @return The inherited channel, if any, otherwise null.
+ * @return The inherited channel, if any, otherwise {@code null}.
*
* @throws IOException
* If an I/O error occurs
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Thread.java
--- a/jdk/src/java.base/share/classes/java/lang/Thread.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java Wed Jul 05 20:44:51 2017 +0200
@@ -616,7 +616,7 @@
* Similarly, specifying a lower value may allow a greater number of
* threads to exist concurrently without throwing an {@link
* OutOfMemoryError} (or other internal error). The details of
- * the relationship between the value of the stackSize parameter
+ * the relationship between the value of the {@code stackSize} parameter
* and the maximum recursion depth and concurrency level are
* platform-dependent. On some platforms, the value of the
* {@code stackSize} parameter may have no effect whatsoever.
@@ -1476,7 +1476,7 @@
}
/**
- * Returns true if and only if the current thread holds the
+ * Returns {@code true} if and only if the current thread holds the
* monitor lock on the specified object.
*
* This method is designed to allow a program to assert that
@@ -1486,8 +1486,8 @@
*
*
* @param obj the object on which to test lock ownership
- * @throws NullPointerException if obj is null
- * @return true if the current thread holds the monitor lock on
+ * @throws NullPointerException if obj is {@code null}
+ * @return {@code true} if the current thread holds the monitor lock on
* the specified object.
* @since 1.4
*/
@@ -1509,8 +1509,8 @@
*
* If there is a security manager, and this thread is not
* the current thread, then the security manager's
- * checkPermission method is called with a
- * RuntimePermission("getStackTrace") permission
+ * {@code checkPermission} method is called with a
+ * {@code RuntimePermission("getStackTrace")} permission
* to see if it's ok to get the stack trace.
*
* Some virtual machines may, under some circumstances, omit one
@@ -1519,12 +1519,12 @@
* this thread is permitted to return a zero-length array from this
* method.
*
- * @return an array of StackTraceElement,
+ * @return an array of {@code StackTraceElement},
* each represents one stack frame.
*
* @throws SecurityException
* if a security manager exists and its
- * checkPermission method doesn't allow
+ * {@code checkPermission} method doesn't allow
* getting the stack trace of thread.
* @see SecurityManager#checkPermission
* @see RuntimePermission
@@ -1562,8 +1562,8 @@
/**
* Returns a map of stack traces for all live threads.
* The map keys are threads and each map value is an array of
- * StackTraceElement that represents the stack dump
- * of the corresponding Thread.
+ * {@code StackTraceElement} that represents the stack dump
+ * of the corresponding {@code Thread}.
* The returned stack traces are in the format specified for
* the {@link #getStackTrace getStackTrace} method.
*
@@ -1574,18 +1574,18 @@
* no stack trace information about a thread.
*
* If there is a security manager, then the security manager's
- * checkPermission method is called with a
- * RuntimePermission("getStackTrace") permission as well as
- * RuntimePermission("modifyThreadGroup") permission
+ * {@code checkPermission} method is called with a
+ * {@code RuntimePermission("getStackTrace")} permission as well as
+ * {@code RuntimePermission("modifyThreadGroup")} permission
* to see if it is ok to get the stack trace of all threads.
*
- * @return a Map from Thread to an array of
- * StackTraceElement that represents the stack trace of
+ * @return a {@code Map} from {@code Thread} to an array of
+ * {@code StackTraceElement} that represents the stack trace of
* the corresponding thread.
*
* @throws SecurityException
* if a security manager exists and its
- * checkPermission method doesn't allow
+ * {@code checkPermission} method doesn't allow
* getting the stack trace of thread.
* @see #getStackTrace
* @see SecurityManager#checkPermission
@@ -1693,7 +1693,7 @@
/**
* Returns the identifier of this Thread. The thread ID is a positive
- * long number generated when this thread was created.
+ * {@code long} number generated when this thread was created.
* The thread ID is unique and remains unchanged during its lifetime.
* When a thread is terminated, this thread ID may be reused.
*
@@ -1774,10 +1774,10 @@
* A thread in the waiting state is waiting for another thread to
* perform a particular action.
*
- * For example, a thread that has called Object.wait()
+ * For example, a thread that has called {@code Object.wait()}
* on an object is waiting for another thread to call
- * Object.notify() or Object.notifyAll() on
- * that object. A thread that has called Thread.join()
+ * {@code Object.notify()} or {@code Object.notifyAll()} on
+ * that object. A thread that has called {@code Thread.join()}
* is waiting for a specified thread to terminate.
*/
WAITING,
@@ -1819,17 +1819,17 @@
// Added in JSR-166
/**
- * Interface for handlers invoked when a Thread abruptly
+ * Interface for handlers invoked when a {@code Thread} abruptly
* terminates due to an uncaught exception.
* When a thread is about to terminate due to an uncaught exception
* the Java Virtual Machine will query the thread for its
- * UncaughtExceptionHandler using
+ * {@code UncaughtExceptionHandler} using
* {@link #getUncaughtExceptionHandler} and will invoke the handler's
- * uncaughtException method, passing the thread and the
+ * {@code uncaughtException} method, passing the thread and the
* exception as arguments.
- * If a thread has not had its UncaughtExceptionHandler
- * explicitly set, then its ThreadGroup object acts as its
- * UncaughtExceptionHandler. If the ThreadGroup object
+ * If a thread has not had its {@code UncaughtExceptionHandler}
+ * explicitly set, then its {@code ThreadGroup} object acts as its
+ * {@code UncaughtExceptionHandler}. If the {@code ThreadGroup} object
* has no
* special requirements for dealing with the exception, it can forward
* the invocation to the {@linkplain #getDefaultUncaughtExceptionHandler
@@ -1869,8 +1869,8 @@
* uncaught exception handler. If the thread does not have an explicit
* uncaught exception handler set, and the thread's thread group
* (including parent thread groups) does not specialize its
- * uncaughtException method, then the default handler's
- * uncaughtException method will be invoked.
+ * {@code uncaughtException} method, then the default handler's
+ * {@code uncaughtException} method will be invoked.
* By setting the default uncaught exception handler, an application
* can change the way in which uncaught exceptions are handled (such as
* logging to a specific device, or file) for those threads that would
@@ -1878,15 +1878,14 @@
* provided.
*
* Note that the default uncaught exception handler should not usually
- * defer to the thread's ThreadGroup object, as that could cause
+ * defer to the thread's {@code ThreadGroup} object, as that could cause
* infinite recursion.
*
* @param eh the object to use as the default uncaught exception handler.
- * If null then there is no default handler.
+ * If {@code null} then there is no default handler.
*
- * @throws SecurityException if a security manager is present and it
- * denies {@link RuntimePermission}
- * ("setDefaultUncaughtExceptionHandler")
+ * @throws SecurityException if a security manager is present and it denies
+ * {@link RuntimePermission}{@code ("setDefaultUncaughtExceptionHandler")}
*
* @see #setUncaughtExceptionHandler
* @see #getUncaughtExceptionHandler
@@ -1906,7 +1905,7 @@
/**
* Returns the default handler invoked when a thread abruptly terminates
- * due to an uncaught exception. If the returned value is null,
+ * due to an uncaught exception. If the returned value is {@code null},
* there is no default.
* @since 1.5
* @see #setDefaultUncaughtExceptionHandler
@@ -1920,8 +1919,8 @@
* Returns the handler invoked when this thread abruptly terminates
* due to an uncaught exception. If this thread has not had an
* uncaught exception handler explicitly set then this thread's
- * ThreadGroup object is returned, unless this thread
- * has terminated, in which case null is returned.
+ * {@code ThreadGroup} object is returned, unless this thread
+ * has terminated, in which case {@code null} is returned.
* @since 1.5
* @return the uncaught exception handler for this thread
*/
@@ -1935,10 +1934,10 @@
* due to an uncaught exception.
* A thread can take full control of how it responds to uncaught
* exceptions by having its uncaught exception handler explicitly set.
- * If no such handler is set then the thread's ThreadGroup
+ * If no such handler is set then the thread's {@code ThreadGroup}
* object acts as its handler.
* @param eh the object to use as this thread's uncaught exception
- * handler. If null then this thread has no explicit handler.
+ * handler. If {@code null} then this thread has no explicit handler.
* @throws SecurityException if the current thread is not allowed to
* modify this thread.
* @see #setDefaultUncaughtExceptionHandler
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/ThreadGroup.java
--- a/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ThreadGroup.java Wed Jul 05 20:44:51 2017 +0200
@@ -728,7 +728,7 @@
* @see java.lang.ThreadGroup#checkAccess()
* @since 1.0
* @deprecated This method is used solely in conjunction with
- * Thread.suspend and ThreadGroup.suspend,
+ * {@code Thread.suspend} and {@code ThreadGroup.suspend},
* both of which have been deprecated, as they are inherently
* deadlock-prone. See {@link Thread#suspend} for details.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java
--- a/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java Wed Jul 05 20:44:51 2017 +0200
@@ -29,7 +29,7 @@
* Thrown when an application tries to access a type using a string
* representing the type's name, but no definition for the type with
* the specified name can be found. This exception differs from
- * {@link ClassNotFoundException} in that ClassNotFoundException is a
+ * {@link ClassNotFoundException} in that {@code ClassNotFoundException} is a
* checked exception, whereas this exception is unchecked.
*
* Note that this exception may be used when undefined type variables
@@ -49,12 +49,12 @@
private String typeName;
/**
- * Constructs a TypeNotPresentException for the named type
+ * Constructs a {@code TypeNotPresentException} for the named type
* with the specified cause.
*
* @param typeName the fully qualified name of the unavailable type
* @param cause the exception that was thrown when the system attempted to
- * load the named type, or null if unavailable or inapplicable
+ * load the named type, or {@code null} if unavailable or inapplicable
*/
public TypeNotPresentException(String typeName, Throwable cause) {
super("Type " + typeName + " not present", cause);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java
--- a/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/UnsupportedOperationException.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,7 +63,7 @@
* @param message the detail message (which is saved for later retrieval
* by the {@link Throwable#getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link Throwable#getCause()} method). (A null value
+ * {@link Throwable#getCause()} method). (A {@code null} value
* is permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.5
@@ -74,14 +74,14 @@
/**
* Constructs a new exception with the specified cause and a detail
- * message of (cause==null ? null : cause.toString()) (which
- * typically contains the class and detail message of cause).
+ * message of {@code (cause==null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link
* java.security.PrivilegedActionException}).
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link Throwable#getCause()} method). (A null value is
+ * {@link Throwable#getCause()} method). (A {@code null} value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.5
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java
--- a/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/annotation/Annotation.java Wed Jul 05 20:44:51 2017 +0200
@@ -50,28 +50,28 @@
* to the corresponding member of this annotation, as defined below:
* The hash code of a member-value depends on its type:
* In order to ensure that a reclaimable object remains so, the referent of
- * a phantom reference may not be retrieved: The Unlike soft and weak references, phantom references are not
* automatically cleared by the garbage collector as they are enqueued. An
@@ -55,9 +55,9 @@
/**
* Returns this reference object's referent. Because the referent of a
* phantom reference is always inaccessible, this method always returns
- * It is possible to create a phantom reference with a null
- * queue, but such a reference is completely useless: Its get
+ * It is possible to create a phantom reference with a {@code null}
+ * queue, but such a reference is completely useless: Its {@code get}
* method will always return null and, since it does not have a queue, it
* will never be enqueued.
*
* @param referent the object the new phantom reference will refer to
* @param q the queue with which the reference is to be registered,
- * or null if registration is not required
+ * or {@code null} if registration is not required
*/
public PhantomReference(T referent, ReferenceQueue super T> q) {
super(referent, q);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java
--- a/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java Wed Jul 05 20:44:51 2017 +0200
@@ -96,10 +96,10 @@
/**
* Polls this queue to see if a reference object is available. If one is
* available without further delay then it is removed from the queue and
- * returned. Otherwise this method immediately returns null.
+ * returned. Otherwise this method immediately returns {@code null}.
*
* @return A reference object, if one was immediately available,
- * otherwise This method does not offer real-time guarantees: It schedules the
* timeout as if by invoking the {@link Object#wait(long)} method.
*
- * @param timeout If positive, block for up to All soft references to softly-reachable objects are guaranteed to have
* been cleared before the virtual machine throws an
- * The only possible modifiers for constructors are the access
* modifiers {@code public}, {@code protected} or
@@ -322,8 +322,8 @@
*
* If this constructor was declared to take a variable number of
* arguments, instead of denoting the last parameter as
- * "Type[]", it is denoted as
- * "Type...".
+ * " The {@code BigDecimal} class provides operations for
* arithmetic, scale manipulation, rounding, comparison, hashing, and
@@ -709,8 +709,8 @@
/**
* Translates the string representation of a {@code BigDecimal}
* into a {@code BigDecimal}. The string representation consists
- * of an optional sign, {@code '+'} ( '\u002B') or
- * {@code '-'} ('\u002D'), followed by a sequence of
+ * of an optional sign, {@code '+'} ( The exponent consists of the character {@code 'e'}
- * ('\u0065') or {@code 'E'} ('\u0045')
+ * (
* Notes:
* The results of this constructor can be somewhat unpredictable
* and its use is generally not recommended; see the notes under
@@ -1010,7 +1010,7 @@
* Translates a {@code BigInteger} unscaled value and an
* {@code int} scale into a {@code BigDecimal}. The value of
* the {@code BigDecimal} is
- * (unscaledVal × 10-scale).
+ * The parameter {@code n} must be in the range 0 through
@@ -2006,7 +2006,7 @@
* range of this method.
*
* @param n power to raise this {@code BigDecimal} to.
- * @return thisn
+ * @return Note that since BigDecimal objects are immutable, calls of
* this method do not result in the original object being
* modified, contrary to the usual convention of having methods
- * named setX mutate field {@code X}.
+ * named Note that since BigDecimal objects are immutable, calls of
* this method do not result in the original object being
* modified, contrary to the usual convention of having methods
- * named setX mutate field {@code X}.
+ * named Note that since {@code BigDecimal} objects are immutable,
* calls of this method do not result in the original
* object being modified, contrary to the usual convention of
- * having methods named setX mutate field
+ * having methods named Finally, the entire string is prefixed by a minus sign
- * character {@code '-'} ('\u002D') if the unscaled
+ * character {@code '-'} (
+ * If {@code KeyStore.LoadStoreParameter} is {@code null} then
+ * the password parameter will also be {@code null}.
+ * Otherwise the {@code KeyStore.ProtectionParameter} of
+ * {@code KeyStore.LoadStoreParameter} must be either a
+ * {@code KeyStore.PasswordProtection} or a
+ * {@code KeyStore.CallbackHandlerProtection} that supports
+ * {@code PasswordCallback} so that the password parameter can be
+ * extracted. If the {@code KeyStore.ProtectionParameter} is neither
+ * of those classes then a {@code NoSuchAlgorithmException} is thrown.
+ *
* @exception IllegalArgumentException if the given
* {@code KeyStore.LoadStoreParameter}
* input is not recognized
@@ -385,37 +401,32 @@
return;
}
- if (param instanceof KeyStore.SimpleLoadStoreParameter) {
- ProtectionParameter protection = param.getProtectionParameter();
- char[] password;
- if (protection instanceof PasswordProtection) {
- password = ((PasswordProtection)protection).getPassword();
- } else if (protection instanceof CallbackHandlerProtection) {
- CallbackHandler handler =
- ((CallbackHandlerProtection)protection).getCallbackHandler();
- PasswordCallback callback =
- new PasswordCallback("Password: ", false);
- try {
- handler.handle(new Callback[] {callback});
- } catch (UnsupportedCallbackException e) {
- throw new NoSuchAlgorithmException
- ("Could not obtain password", e);
- }
- password = callback.getPassword();
- callback.clearPassword();
- if (password == null) {
- throw new NoSuchAlgorithmException
- ("No password provided");
- }
- } else {
- throw new NoSuchAlgorithmException("ProtectionParameter must"
- + " be PasswordProtection or CallbackHandlerProtection");
+ ProtectionParameter protection = param.getProtectionParameter();
+ char[] password;
+ if (protection instanceof PasswordProtection) {
+ password = ((PasswordProtection)protection).getPassword();
+ } else if (protection instanceof CallbackHandlerProtection) {
+ CallbackHandler handler =
+ ((CallbackHandlerProtection)protection).getCallbackHandler();
+ PasswordCallback callback =
+ new PasswordCallback("Password: ", false);
+ try {
+ handler.handle(new Callback[] {callback});
+ } catch (UnsupportedCallbackException e) {
+ throw new NoSuchAlgorithmException
+ ("Could not obtain password", e);
}
- engineLoad(null, password);
- return;
+ password = callback.getPassword();
+ callback.clearPassword();
+ if (password == null) {
+ throw new NoSuchAlgorithmException("No password provided");
+ }
+ } else {
+ throw new NoSuchAlgorithmException("ProtectionParameter must"
+ + " be PasswordProtection or CallbackHandlerProtection");
}
-
- throw new UnsupportedOperationException();
+ engineLoad(null, password);
+ return;
}
/**
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/time/Instant.java
--- a/jdk/src/java.base/share/classes/java/time/Instant.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/time/Instant.java Wed Jul 05 20:44:51 2017 +0200
@@ -1232,10 +1232,10 @@
if (seconds < 0 && nanos > 0) {
long millis = Math.multiplyExact(seconds+1, 1000);
long adjustment = nanos / 1000_000 - 1000;
- return millis + adjustment;
+ return Math.addExact(millis, adjustment);
} else {
long millis = Math.multiplyExact(seconds, 1000);
- return millis + nanos / 1000_000;
+ return Math.addExact(millis, nanos / 1000_000);
}
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/Formatter.java
--- a/jdk/src/java.base/share/classes/java/util/Formatter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/Formatter.java Wed Jul 05 20:44:51 2017 +0200
@@ -1772,7 +1772,7 @@
*
* Unless otherwise noted, passing a null argument to a constructor
+ * Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in this class will cause a {@link NullPointerException} to be
* thrown.
*
@@ -91,8 +91,8 @@
public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
/**
- * Creates a new
- * Unless otherwise noted, passing a null argument to a constructor or
+ * Unless otherwise noted, passing a {@code null} argument to a constructor or
* method in this class will cause a {@link NullPointerException} to be thrown.
*
* @author John Rose
@@ -109,7 +109,7 @@
/**
* Obtain new instance of a class that implements Packer.
* If the system property java.util.jar.Pack200.Packer
+ * If the system property {@code java.util.jar.Pack200.Packer}
* is defined, then the value is taken to be the fully-qualified name
* of a concrete implementation class, which must implement Packer.
* This class is loaded and instantiated. If this process fails
@@ -135,7 +135,7 @@
/**
* Obtain new instance of a class that implements Unpacker.
* If the system property java.util.jar.Pack200.Unpacker
+ * If the system property {@code java.util.jar.Pack200.Unpacker}
* is defined, then the value is taken to be the fully-qualified
* name of a concrete implementation class, which must implement Unpacker.
* The class is loaded and instantiated. If this process fails
@@ -220,7 +220,7 @@
* If the input JAR-files contains a 1.6 class file, then the pack file
* version will be set to 1.6.
*
- * Note: Unless otherwise noted, passing a null argument to a
+ * Note: Unless otherwise noted, passing a {@code null} argument to a
* constructor or method in this class will cause a {@link NullPointerException}
* to be thrown.
*
@@ -367,7 +367,7 @@
* {@link #STRIP}, and {@link #PASS}.
*
* The string {@link #ERROR} means that the pack operation
- * as a whole will fail, with an exception of type
* For example, the effect of this option is built in:
- *
* The special strings {@link #ERROR}, {@link #STRIP}, and {@link #PASS} are
* also allowed, with the same meaning as {@link #UNKNOWN_ATTRIBUTE}.
@@ -399,21 +399,21 @@
* refused, stripped, or passed bitwise (with no class compression).
*
* Code like this might be used to support attributes for JCOV:
- *
* Code like this might be used to strip debugging attributes:
- *
* Implementation specific properties are prefixed with a
* package name associated with the implementor, beginning
- * with com. or a similar prefix.
- * All property names beginning with pack. and
- * unpack. are reserved for use by this API.
+ * with {@code com.} or a similar prefix.
+ * All property names beginning with {@code pack.} and
+ * {@code unpack.} are reserved for use by this API.
*
* Unknown properties may be ignored or rejected with an
* unspecified error, and invalid entries may cause an
@@ -575,10 +575,10 @@
* using {@link #newUnpacker}.
*
* Every JAR file produced by this engine will include the string
- * "PACK200" as a zip file comment.
+ * "{@code PACK200}" as a zip file comment.
* This allows a deployer to detect if a JAR archive was packed and unpacked.
*
- * Note: Unless otherwise noted, passing a null argument to a
+ * Note: Unless otherwise noted, passing a {@code null} argument to a
* constructor or method in this class will cause a {@link NullPointerException}
* to be thrown.
*
@@ -641,9 +641,9 @@
*
* Implementation specific properties are prefixed with a
* package name associated with the implementor, beginning
- * with com. or a similar prefix.
- * All property names beginning with pack. and
- * unpack. are reserved for use by this API.
+ * with {@code com.} or a similar prefix.
+ * All property names beginning with {@code pack.} and
+ * {@code unpack.} are reserved for use by this API.
*
* Unknown properties may be ignored or rejected with an
* unspecified error, and invalid entries may cause an
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/regex/Matcher.java
--- a/jdk/src/java.base/share/classes/java/util/regex/Matcher.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/regex/Matcher.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,7 +63,7 @@
*
* A matcher finds matches in a subset of its input called the
* region. By default, the region contains all of the matcher's input.
- * The region can be modified via the{@link #region region} method and queried
+ * The region can be modified via the {@link #region region} method and queried
* via the {@link #regionStart regionStart} and {@link #regionEnd regionEnd}
* methods. The way that the region boundaries interact with some pattern
* constructs can be changed. See {@link #useAnchoringBounds
@@ -1639,15 +1639,15 @@
*/
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("java.util.regex.Matcher");
- sb.append("[pattern=" + pattern());
- sb.append(" region=");
- sb.append(regionStart() + "," + regionEnd());
- sb.append(" lastmatch=");
+ sb.append("java.util.regex.Matcher")
+ .append("[pattern=").append(pattern())
+ .append(" region=")
+ .append(regionStart()).append(',').append(regionEnd())
+ .append(" lastmatch=");
if ((first >= 0) && (group() != null)) {
sb.append(group());
}
- sb.append("]");
+ sb.append(']');
return sb.toString();
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/regex/Pattern.java
--- a/jdk/src/java.base/share/classes/java/util/regex/Pattern.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/regex/Pattern.java Wed Jul 05 20:44:51 2017 +0200
@@ -565,7 +565,7 @@
*
* Scripts are specified either with the prefix {@code Is}, as in
* {@code IsHiragana}, or by using the {@code script} keyword (or its short
- * form {@code sc})as in {@code script=Hiragana} or {@code sc=Hiragana}.
+ * form {@code sc}) as in {@code script=Hiragana} or {@code sc=Hiragana}.
*
* The script names supported by If the characteristic {@code IDENTITY_TRANSFORM} is
+ * If the characteristic {@code IDENTITY_FINISH} is
* set, this function may be presumed to be an identity transform with an
* unchecked cast from {@code A} to {@code R}.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java
--- a/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/DoubleStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -293,7 +293,7 @@
*
* Independent of whether this stream is ordered or unordered if all
* elements of this stream match the given predicate then this operation
- * takes all elements (the result is the same is the input), or if no
+ * takes all elements (the result is the same as the input), or if no
* elements of the stream match the given predicate then no elements are
* taken (the result is an empty stream).
*
@@ -329,6 +329,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default DoubleStream takeWhile(DoublePredicate predicate) {
Objects.requireNonNull(predicate);
@@ -361,7 +362,7 @@
* elements of this stream match the given predicate then this operation
* drops all elements (the result is an empty stream), or if no elements of
* the stream match the given predicate then no elements are dropped (the
- * result is the same is the input).
+ * result is the same as the input).
*
* This is a stateful
* intermediate operation.
@@ -395,6 +396,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default DoubleStream dropWhile(DoublePredicate predicate) {
Objects.requireNonNull(predicate);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/IntStream.java
--- a/jdk/src/java.base/share/classes/java/util/stream/IntStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/IntStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -291,7 +291,7 @@
*
* Independent of whether this stream is ordered or unordered if all
* elements of this stream match the given predicate then this operation
- * takes all elements (the result is the same is the input), or if no
+ * takes all elements (the result is the same as the input), or if no
* elements of the stream match the given predicate then no elements are
* taken (the result is an empty stream).
*
@@ -326,6 +326,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default IntStream takeWhile(IntPredicate predicate) {
Objects.requireNonNull(predicate);
@@ -358,7 +359,7 @@
* elements of this stream match the given predicate then this operation
* drops all elements (the result is an empty stream), or if no elements of
* the stream match the given predicate then no elements are dropped (the
- * result is the same is the input).
+ * result is the same as the input).
*
* This is a stateful
* intermediate operation.
@@ -391,6 +392,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default IntStream dropWhile(IntPredicate predicate) {
Objects.requireNonNull(predicate);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/LongStream.java
--- a/jdk/src/java.base/share/classes/java/util/stream/LongStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/LongStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -291,7 +291,7 @@
*
* Independent of whether this stream is ordered or unordered if all
* elements of this stream match the given predicate then this operation
- * takes all elements (the result is the same is the input), or if no
+ * takes all elements (the result is the same as the input), or if no
* elements of the stream match the given predicate then no elements are
* taken (the result is an empty stream).
*
@@ -327,6 +327,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default LongStream takeWhile(LongPredicate predicate) {
Objects.requireNonNull(predicate);
@@ -359,7 +360,7 @@
* elements of this stream match the given predicate then this operation
* drops all elements (the result is an empty stream), or if no elements of
* the stream match the given predicate then no elements are dropped (the
- * result is the same is the input).
+ * result is the same as the input).
*
* This is a stateful
* intermediate operation.
@@ -393,6 +394,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default LongStream dropWhile(LongPredicate predicate) {
Objects.requireNonNull(predicate);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/SliceOps.java
--- a/jdk/src/java.base/share/classes/java/util/stream/SliceOps.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/SliceOps.java Wed Jul 05 20:44:51 2017 +0200
@@ -138,7 +138,7 @@
skip, limit, size);
}
else {
- // @@@ OOMEs will occur for LongStream.longs().filter(i -> true).limit(n)
+ // @@@ OOMEs will occur for LongStream.range(0, Long.MAX_VALUE).filter(i -> true).limit(n)
// regardless of the value of n
// Need to adjust the target size of splitting for the
// SliceTask from say (size / k) to say min(size / k, 1 << 14)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/Stream.java
--- a/jdk/src/java.base/share/classes/java/util/stream/Stream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/Stream.java Wed Jul 05 20:44:51 2017 +0200
@@ -498,7 +498,7 @@
*
* Independent of whether this stream is ordered or unordered if all
* elements of this stream match the given predicate then this operation
- * takes all elements (the result is the same is the input), or if no
+ * takes all elements (the result is the same as the input), or if no
* elements of the stream match the given predicate then no elements are
* taken (the result is an empty stream).
*
@@ -533,6 +533,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default Stream This is a stateful
* intermediate operation.
@@ -598,6 +599,7 @@
* predicate to apply to elements to determine the longest
* prefix of elements.
* @return the new stream
+ * @since 1.9
*/
default Stream Subsequent changes to the sequential/parallel execution mode of the
+ * returned stream are not guaranteed to be propagated to the input streams.
+ *
* @param This is optimized for cases such as IntStream.ints() that is
- * implemented as range of 0 to Integer.MAX_VALUE but is likely to be
- * augmented with a limit operation that limits the number of elements
- * to a count lower than this threshold.
+ * This is optimized for cases such as IntStream.range(0, Integer.MAX_VALUE)
+ * that is likely to be augmented with a limit operation that limits the
+ * number of elements to a count lower than this threshold.
*/
private static final int BALANCED_SPLIT_THRESHOLD = 1 << 24;
@@ -280,10 +279,9 @@
* than a balanced tree at the expense of a higher-depth for the right
* side of the range.
*
- * This is optimized for cases such as LongStream.longs() that is
- * implemented as range of 0 to Long.MAX_VALUE but is likely to be
- * augmented with a limit operation that limits the number of elements
- * to a count lower than this threshold.
+ * This is optimized for cases such as LongStream.range(0, Long.MAX_VALUE)
+ * that is likely to be augmented with a limit operation that limits the
+ * number of elements to a count lower than this threshold.
*/
private static final long BALANCED_SPLIT_THRESHOLD = 1 << 24;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/package-info.java
--- a/jdk/src/java.base/share/classes/java/util/stream/package-info.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/package-info.java Wed Jul 05 20:44:51 2017 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -159,7 +159,7 @@
* is a necessary, but not sufficient, condition for the processing of an infinite
* stream to terminate normally in finite time.
*
- * Processing elements with an explicit {@code for-}loop is inherently serial.
* Streams facilitate parallel execution by reframing the computation as a pipeline of
@@ -184,15 +184,15 @@
*
* The only difference between the serial and parallel versions of this
* example is the creation of the initial stream, using "{@code parallelStream()}"
- * instead of "{@code stream()}". When the terminal operation is initiated,
- * the stream pipeline is executed sequentially or in parallel depending on the
- * orientation of the stream on which it is invoked. Whether a stream will execute in serial or
- * parallel can be determined with the {@code isParallel()} method, and the
- * orientation of a stream can be modified with the
+ * instead of "{@code stream()}". The stream pipeline is executed sequentially or
+ * in parallel depending on the mode of the stream on which the terminal operation
+ * is invoked. The sequential or parallel mode of a stream can be determined with the
+ * {@link java.util.stream.BaseStream#isParallel()} method, and the
+ * stream's mode can be modified with the
* {@link java.util.stream.BaseStream#sequential()} and
- * {@link java.util.stream.BaseStream#parallel()} operations. When the terminal
- * operation is initiated, the stream pipeline is executed sequentially or in
- * parallel depending on the mode of the stream on which it is invoked.
+ * {@link java.util.stream.BaseStream#parallel()} operations.
+ * The most recent sequential or parallel mode setting applies to the
+ * execution of the entire stream pipeline.
*
* Except for operations identified as explicitly nondeterministic, such
* as {@code findAny()}, whether a stream executes sequentially or in parallel
@@ -280,7 +280,7 @@
* parameters to stream operations entirely; there is usually a way to
* restructure the stream pipeline to avoid statefulness.
*
- * The following code fragment demonstrates a trivial compression
- * and decompression of a string using Deflater and
- * Inflater.
+ * and decompression of a string using {@code Deflater} and
+ * {@code Inflater}.
*
* The following code fragment demonstrates a trivial compression
- * and decompression of a string using Deflater and
- * Inflater.
+ * and decompression of a string using {@code Deflater} and
+ * {@code Inflater}.
*
* Unless otherwise noted, passing a null argument to a constructor
+ * Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in this class will cause a {@link NullPointerException} to be
* thrown.
*
@@ -76,7 +76,7 @@
* Mode flag to open a zip file and mark it for deletion. The file will be
* deleted some time between the moment that it is opened and the moment
* that it is closed, but its contents will remain accessible via the
- * ZipFile object until either the close method is invoked or the
+ * {@code ZipFile} object until either the close method is invoked or the
* virtual machine exits.
*/
public static final int OPEN_DELETE = 0x4;
@@ -101,8 +101,8 @@
/**
* Opens a zip file for reading.
*
- * First, if there is a security manager, its First, if there is a security manager, its {@code checkRead}
+ * method is called with the {@code name} argument as its argument
* to ensure the read is allowed.
*
* The UTF-8 {@link java.nio.charset.Charset charset} is used to
@@ -112,7 +112,7 @@
* @throws ZipException if a ZIP format error has occurred
* @throws IOException if an I/O error has occurred
* @throws SecurityException if a security manager exists and its
- * First, if there is a security manager, its First, if there is a security manager, its {@code checkRead}
+ * method is called with the {@code name} argument as its argument to
* ensure the read is allowed.
*
* The UTF-8 {@link java.nio.charset.Charset charset} is used to
@@ -137,11 +137,11 @@
* @throws ZipException if a ZIP format error has occurred
* @throws IOException if an I/O error has occurred
* @throws SecurityException if a security manager exists and
- * its First, if there is a security manager, its First, if there is a security manager, its {@code checkRead}
+ * method is called with the {@code name} argument as its argument to
* ensure the read is allowed.
*
* @param file the ZIP file to be opened for reading
@@ -186,12 +186,12 @@
* @throws IOException if an I/O error has occurred
*
* @throws SecurityException
- * if a security manager exists and its First, if there is a security manager, its First, if there is a security manager, its {@code checkRead}
+ * method is called with the {@code name} argument as its argument
* to ensure the read is allowed.
*
* @param name the name of the zip file
@@ -241,7 +241,7 @@
* @throws ZipException if a ZIP format error has occurred
* @throws IOException if an I/O error has occurred
* @throws SecurityException
- * if a security manager exists and its
* Since the time when GC would invoke this method is undetermined,
- * it is strongly recommended that applications invoke the
+ * This method only applies to certificate-based server
+ * authentication. An {@link X509ExtendedTrustManager} will use the
+ * returned value for server certificate validation.
+ *
+ * @implSpec This method throws UnsupportedOperationException by default.
+ * Classes derived from ExtendedSSLSession must implement
+ * this method.
+ *
+ * @return a non-null unmodifiable list of byte arrays, each entry
+ * containing a DER-encoded OCSP response (using the
+ * ASN.1 type OCSPResponse defined in RFC 6960). The order
+ * of the responses must match the order of the certificates
+ * presented by the server in its Certificate message (See
+ * {@link SSLSession#getLocalCertificates()} for server mode,
+ * and {@link SSLSession#getPeerCertificates()} for client mode).
+ * It is possible that fewer response entries may be returned than
+ * the number of presented certificates. If an entry in the list
+ * is a zero-length byte array, it should be treated by the
+ * caller as if the OCSP entry for the corresponding certificate
+ * is missing. The returned list may be empty if no OCSP responses
+ * were presented during handshaking or if OCSP stapling is not
+ * supported by either endpoint for this handshake.
+ *
+ * @throws UnsupportedOperationException if the underlying provider
+ * does not implement the operation
+ *
+ * @see X509ExtendedTrustManager
+ *
+ * @since 9
+ */
+ public List
+ * The RFC 6960 defines a ResponderID structure as:
+ *
* Configuration:
- * By default each ConsoleHandler is initialized using the following
- * LogManager configuration properties where {@code
- * The ConsoleHandler is configured based on
- * LogManager properties (or their default values).
+ * The {@code ConsoleHandler} is configured based on
+ * {@code LogManager} properties (or their default values).
*
*/
public ConsoleHandler() {
@@ -82,10 +82,10 @@
}
/**
- * Publish a LogRecord.
+ * Publish a {@code LogRecord}.
*
- * The logging request was made initially to a Logger object,
- * which initialized the LogRecord and forwarded it here.
+ * The logging request was made initially to a {@code Logger} object,
+ * which initialized the {@code LogRecord} and forwarded it here.
*
* @param record description of the log event. A null record is
* silently ignored and is not published
@@ -97,9 +97,9 @@
}
/**
- * Override StreamHandler.close to do a flush but not
+ * Override {@code StreamHandler.close} to do a flush but not
* to close the output stream. That is, we do not
- * close System.err.
+ * close {@code System.err}.
*/
@Override
public void close() {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/FileHandler.java Wed Jul 05 20:44:51 2017 +0200
@@ -48,9 +48,9 @@
import java.util.Set;
/**
- * Simple file logging Handler.
+ * Simple file logging {@code Handler}.
*
- * The FileHandler can either write to a specified file,
+ * The {@code FileHandler} can either write to a specified file,
* or it can write to a rotating set of files.
*
* For a rotating set of files, as each file reaches a given size
@@ -61,24 +61,24 @@
* By default buffering is enabled in the IO libraries but each log
* record is flushed out when it is complete.
*
- * By default the XMLFormatter class is used for formatting.
+ * By default the {@code XMLFormatter} class is used for formatting.
*
* Configuration:
- * By default each FileHandler is initialized using the following
- * LogManager configuration properties where <handler-name>
+ * By default each {@code FileHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code
* Generation numbers follow the sequence 0, 1, 2, etc.
*
- * Normally the "%u" unique field is set to 0. However, if the FileHandler
+ * Normally the "%u" unique field is set to 0. However, if the {@code FileHandler}
* tries to open the filename and finds the file is currently in use by
* another process it will increment the unique number field and try
- * again. This will be repeated until FileHandler finds a file name that
+ * again. This will be repeated until {@code FileHandler} finds a file name that
* is not currently in use. If there is a conflict and no "%u" field has
* been specified, it will be added at the end of the filename after a dot.
* (This will be after any automatically added generation number.)
@@ -249,12 +249,12 @@
/**
- * Construct a default FileHandler. This will be configured
- * entirely from LogManager properties (or their default values).
+ * Construct a default {@code FileHandler}. This will be configured
+ * entirely from {@code LogManager} properties (or their default values).
*
* @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control")).
+ * the caller does not have {@code LoggingPermission("control"))}.
* @exception NullPointerException if pattern property is an empty String.
*/
public FileHandler() throws IOException, SecurityException {
@@ -269,9 +269,9 @@
}
/**
- * Initialize a FileHandler to write to the given filename.
+ * Initialize a {@code FileHandler} to write to the given filename.
*
- * The FileHandler is configured based on LogManager
+ * The {@code FileHandler} is configured based on {@code LogManager}
* properties (or their default values) except that the given pattern
* argument is used as the filename pattern, the file limit is
* set to no limit, and the file count is set to one.
@@ -282,7 +282,7 @@
* @param pattern the name of the output file
* @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
* @exception IllegalArgumentException if pattern is an empty string
*/
public FileHandler(String pattern) throws IOException, SecurityException {
@@ -298,14 +298,14 @@
}
/**
- * Initialize a FileHandler to write to the given filename,
+ * Initialize a {@code FileHandler} to write to the given filename,
* with optional append.
*
- * The FileHandler is configured based on LogManager
+ * The {@code FileHandler} is configured based on {@code LogManager}
* properties (or their default values) except that the given pattern
* argument is used as the filename pattern, the file limit is
* set to no limit, the file count is set to one, and the append
- * mode is set to the given append argument.
+ * mode is set to the given {@code append} argument.
*
* There is no limit on the amount of data that may be written,
* so use this with care.
@@ -314,7 +314,7 @@
* @param append specifies append mode
* @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
* @exception IllegalArgumentException if pattern is an empty string
*/
public FileHandler(String pattern, boolean append) throws IOException,
@@ -332,12 +332,12 @@
}
/**
- * Initialize a FileHandler to write to a set of files. When
+ * Initialize a {@code FileHandler} to write to a set of files. When
* (approximately) the given limit has been written to one file,
* another file will be opened. The output will cycle through a set
* of count files.
*
- * The FileHandler is configured based on LogManager
+ * The {@code FileHandler} is configured based on {@code LogManager}
* properties (or their default values) except that the given pattern
* argument is used as the filename pattern, the file limit is
* set to the limit argument, and the file count is set to the
@@ -350,7 +350,7 @@
* @param count the number of files to use
* @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
* @exception IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
* @exception IllegalArgumentException if pattern is an empty string
*/
@@ -368,17 +368,17 @@
}
/**
- * Initialize a FileHandler to write to a set of files
+ * Initialize a {@code FileHandler} to write to a set of files
* with optional append. When (approximately) the given limit has
* been written to one file, another file will be opened. The
* output will cycle through a set of count files.
*
- * The FileHandler is configured based on LogManager
+ * The {@code FileHandler} is configured based on {@code LogManager}
* properties (or their default values) except that the given pattern
* argument is used as the filename pattern, the file limit is
* set to the limit argument, and the file count is set to the
* given count argument, and the append mode is set to the given
- * append argument.
+ * {@code append} argument.
*
* The count must be at least 1.
*
@@ -388,7 +388,7 @@
* @param append specifies append mode
* @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
* @exception IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
* @exception IllegalArgumentException if pattern is an empty string
*
@@ -711,7 +711,7 @@
}
/**
- * Format and publish a LogRecord.
+ * Format and publish a {@code LogRecord}.
*
* @param record description of the log event. A null record is
* silently ignored and is not published
@@ -743,7 +743,7 @@
* Close all the files.
*
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
@Override
public synchronized void close() throws SecurityException {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/Handler.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/Handler.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Handler.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,18 +32,18 @@
import java.security.PrivilegedAction;
/**
- * A Handler object takes log messages from a Logger and
+ * A {@code Handler} object takes log messages from a {@code Logger} and
* exports them. It might for example, write them to a console
* or write them to a file, or send them to a network logging service,
* or forward them to an OS log, or whatever.
*
- * A Handler can be disabled by doing a setLevel(Level.OFF)
- * and can be re-enabled by doing a setLevel with an appropriate level.
+ * A {@code Handler} can be disabled by doing a {@code setLevel(Level.OFF)}
+ * and can be re-enabled by doing a {@code setLevel} with an appropriate level.
*
- * Handler classes typically use LogManager properties to set
- * default values for the Handler's Filter, Formatter,
- * and Level. See the specific documentation for each concrete
- * Handler class.
+ * {@code Handler} classes typically use {@code LogManager} properties to set
+ * default values for the {@code Handler}'s {@code Filter}, {@code Formatter},
+ * and {@code Level}. See the specific documentation for each concrete
+ * {@code Handler} class.
*
*
* @since 1.4
@@ -67,10 +67,10 @@
private volatile String encoding;
/**
- * Default constructor. The resulting Handler has a log
- * level of Level.ALL, no Formatter, and no
- * Filter. A default ErrorManager instance is installed
- * as the ErrorManager.
+ * Default constructor. The resulting {@code Handler} has a log
+ * level of {@code Level.ALL}, no {@code Formatter}, and no
+ * {@code Filter}. A default {@code ErrorManager} instance is installed
+ * as the {@code ErrorManager}.
*/
protected Handler() {
}
@@ -122,12 +122,12 @@
}
/**
- * Publish a LogRecord.
+ * Publish a {@code LogRecord}.
*
- * The logging request was made initially to a Logger object,
- * which initialized the LogRecord and forwarded it here.
+ * The logging request was made initially to a {@code Logger} object,
+ * which initialized the {@code LogRecord} and forwarded it here.
*
- * The Handler is responsible for formatting the message, when and
+ * The {@code Handler} is responsible for formatting the message, when and
* if necessary. The formatting should include localization.
*
* @param record description of the log event. A null record is
@@ -141,28 +141,28 @@
public abstract void flush();
/**
- * Close the Handler and free all associated resources.
+ * Close the {@code Handler} and free all associated resources.
*
- * The close method will perform a flush and then close the
- * Handler. After close has been called this Handler
+ * The close method will perform a {@code flush} and then close the
+ * {@code Handler}. After close has been called this {@code Handler}
* should no longer be used. Method calls may either be silently
* ignored or may throw runtime exceptions.
*
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public abstract void close() throws SecurityException;
/**
- * Set a Formatter. This Formatter will be used
- * to format LogRecords for this Handler.
+ * Set a {@code Formatter}. This {@code Formatter} will be used
+ * to format {@code LogRecords} for this {@code Handler}.
*
- * Some Handlers may not use Formatters, in
- * which case the Formatter will be remembered, but not used.
+ * Some {@code Handlers} may not use {@code Formatters}, in
+ * which case the {@code Formatter} will be remembered, but not used.
*
- * @param newFormatter the Formatter to use (may not be null)
+ * @param newFormatter the {@code Formatter} to use (may not be null)
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public synchronized void setFormatter(Formatter newFormatter) throws SecurityException {
checkPermission();
@@ -170,23 +170,23 @@
}
/**
- * Return the Formatter for this Handler.
- * @return the Formatter (may be null).
+ * Return the {@code Formatter} for this {@code Handler}.
+ * @return the {@code Formatter} (may be null).
*/
public Formatter getFormatter() {
return formatter;
}
/**
- * Set the character encoding used by this Handler.
+ * Set the character encoding used by this {@code Handler}.
*
- * The encoding should be set before any LogRecords are written
- * to the Handler.
+ * The encoding should be set before any {@code LogRecords} are written
+ * to the {@code Handler}.
*
* @param encoding The name of a supported character encoding.
* May be null, to indicate the default platform encoding.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
* @exception UnsupportedEncodingException if the named encoding is
* not supported.
*/
@@ -206,7 +206,7 @@
}
/**
- * Return the character encoding for this Handler.
+ * Return the character encoding for this {@code Handler}.
*
* @return The encoding name. May be null, which indicates the
* default encoding should be used.
@@ -216,15 +216,15 @@
}
/**
- * Set a Filter to control output on this Handler.
+ * Set a {@code Filter} to control output on this {@code Handler}.
*
- * For each call of publish the Handler will call
- * this Filter (if it is non-null) to check if the
- * LogRecord should be published or discarded.
+ * For each call of {@code publish} the {@code Handler} will call
+ * this {@code Filter} (if it is non-null) to check if the
+ * {@code LogRecord} should be published or discarded.
*
- * @param newFilter a Filter object (may be null)
+ * @param newFilter a {@code Filter} object (may be null)
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public synchronized void setFilter(Filter newFilter) throws SecurityException {
checkPermission();
@@ -232,9 +232,9 @@
}
/**
- * Get the current Filter for this Handler.
+ * Get the current {@code Filter} for this {@code Handler}.
*
- * @return a Filter object (may be null)
+ * @return a {@code Filter} object (may be null)
*/
public Filter getFilter() {
return filter;
@@ -248,7 +248,7 @@
*
* @param em the new ErrorManager
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public synchronized void setErrorManager(ErrorManager em) {
checkPermission();
@@ -263,7 +263,7 @@
*
* @return the ErrorManager for this Handler
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public ErrorManager getErrorManager() {
checkPermission();
@@ -291,16 +291,16 @@
/**
* Set the log level specifying which message levels will be
- * logged by this Handler. Message levels lower than this
+ * logged by this {@code Handler}. Message levels lower than this
* value will be discarded.
*
* The intention is to allow developers to turn on voluminous
* logging, but to limit the messages that are sent to certain
- * Handlers.
+ * {@code Handlers}.
*
* @param newLevel the new value for the log level
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public synchronized void setLevel(Level newLevel) throws SecurityException {
if (newLevel == null) {
@@ -312,7 +312,7 @@
/**
* Get the log level specifying which messages will be
- * logged by this Handler. Message levels lower
+ * logged by this {@code Handler}. Message levels lower
* than this level will be discarded.
* @return the level of messages being logged.
*/
@@ -321,16 +321,16 @@
}
/**
- * Check if this Handler would actually log a given LogRecord.
+ * Check if this {@code Handler} would actually log a given {@code LogRecord}.
*
- * This method checks if the LogRecord has an appropriate
- * Level and whether it satisfies any Filter. It also
- * may make other Handler specific checks that might prevent a
- * handler from logging the LogRecord. It will return false if
- * the LogRecord is null.
+ * This method checks if the {@code LogRecord} has an appropriate
+ * {@code Level} and whether it satisfies any {@code Filter}. It also
+ * may make other {@code Handler} specific checks that might prevent a
+ * handler from logging the {@code LogRecord}. It will return false if
+ * the {@code LogRecord} is null.
*
- * @param record a LogRecord
- * @return true if the LogRecord would be logged.
+ * @param record a {@code LogRecord}
+ * @return true if the {@code LogRecord} would be logged.
*
*/
public boolean isLoggable(LogRecord record) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/LogManager.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java Wed Jul 05 20:44:51 2017 +0200
@@ -72,7 +72,7 @@
* loaded, an object will be instantiated, and that object's constructor
* is responsible for reading in the initial configuration. (That object
* may use other system properties to control its configuration.) The
- * alternate configuration class can use readConfiguration(InputStream)
+ * alternate configuration class can use {@code readConfiguration(InputStream)}
* to define properties in the LogManager.
*
* If "java.util.logging.config.class" property is not set,
@@ -353,7 +353,8 @@
// see that initializationDone is still false, and perform the
// initialization.
//
- synchronized(this) {
+ configurationLock.lock();
+ try {
// If initializedCalled is true it means that we're already in
// the process of initializing the LogManager in this thread.
// There has been a recursive call to ensureLogManagerInitialized().
@@ -409,6 +410,8 @@
} finally {
initializationDone = true;
}
+ } finally {
+ configurationLock.unlock();
}
}
@@ -423,33 +426,22 @@
return manager;
}
- private void readPrimordialConfiguration() {
+ private void readPrimordialConfiguration() { // must be called while holding configurationLock
if (!readPrimordialConfiguration) {
- synchronized (this) {
- if (!readPrimordialConfiguration) {
- // If System.in/out/err are null, it's a good
- // indication that we're still in the
- // bootstrapping phase
- if (System.out == null) {
- return;
- }
- readPrimordialConfiguration = true;
+ // If System.in/out/err are null, it's a good
+ // indication that we're still in the
+ // bootstrapping phase
+ if (System.out == null) {
+ return;
+ }
+ readPrimordialConfiguration = true;
+ try {
+ readConfiguration();
- try {
- AccessController.doPrivileged(new PrivilegedExceptionAction
* Each Logger has a "Level" associated with it. This reflects
* a minimum Level that this logger cares about. If a Logger's
- * level is set to null, then its effective level is inherited
+ * level is set to {@code null}, then its effective level is inherited
* from its parent, which may in turn obtain it recursively from its
* parent, and so on up the tree.
*
@@ -74,7 +74,7 @@
* of the LogManager class. However it may also be dynamically changed
* by calls on the Logger.setLevel method. If a logger's level is
* changed the change may also affect child loggers, since any child
- * logger that has null as its level will inherit its
+ * logger that has {@code null} as its level will inherit its
* effective level from its parent.
*
* On each logging call the Logger initially performs a cheap
@@ -116,25 +116,25 @@
* unnecessary message construction. For example, if the developer wants to
* log system health status for diagnosis, with the String-accepting version,
* the code would look like:
-
* When looking for a {@code ResourceBundle}, the logger will first look at
* whether a bundle was specified using {@link
@@ -345,11 +345,11 @@
* which may cause deadlocks with the LogManager class initialization.
* In such cases two class initialization wait for each other to complete.
* The preferred way to get the global logger object is via the call
- * There is a single global instance of the LoggingMXBean.
+ * There is a single global instance of the {@code LoggingMXBean}.
* This instance is an {@link javax.management.MXBean MXBean} that
* can be obtained by calling the {@link LogManager#getLoggingMXBean}
* method or from the
* {@linkplain java.lang.management.ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer}.
+ * platform MBeanServer}.
*
* The {@link javax.management.ObjectName ObjectName} that uniquely identifies
* the management interface for logging within the {@code MBeanServer} is:
@@ -65,14 +65,14 @@
* calls {@link LogManager#getLoggerNames} and returns a list
* of the logger names.
*
- * @return A list of String each of which is a
- * currently registered Logger name.
+ * @return A list of {@code String} each of which is a
+ * currently registered {@code Logger} name.
*/
public java.util.List
- * If the Level of the specified logger is null,
+ * If the {@code Level} of the specified logger is {@code null},
* which means that this logger's effective level is inherited
* from its parent, an empty string will be returned.
*
- * @param loggerName The name of the Logger to be retrieved.
+ * @param loggerName The name of the {@code Logger} to be retrieved.
*
* @return The name of the log level of the specified logger; or
* an empty string if the log level of the specified logger
- * is null. If the specified logger does not
- * exist, null is returned.
+ * is {@code null}. If the specified logger does not
+ * exist, {@code null} is returned.
*
* @see Logger#getLevel
*/
@@ -98,22 +98,22 @@
/**
* Sets the specified logger to the specified new level.
- * If the levelName is not null, the level
- * of the specified logger is set to the parsed Level
- * matching the levelName.
- * If the levelName is null, the level
- * of the specified logger is set to null and
+ * If the {@code levelName} is not {@code null}, the level
+ * of the specified logger is set to the parsed {@code Level}
+ * matching the {@code levelName}.
+ * If the {@code levelName} is {@code null}, the level
+ * of the specified logger is set to {@code null} and
* the effective level of the logger is inherited from
* its nearest ancestor with a specific (non-null) level value.
*
- * @param loggerName The name of the Logger to be set.
+ * @param loggerName The name of the {@code Logger} to be set.
* Must be non-null.
* @param levelName The name of the level to set on the specified logger,
- * or null if setting the level to inherit
+ * or {@code null} if setting the level to inherit
* from its nearest ancestor.
*
* @throws IllegalArgumentException if the specified logger
- * does not exist, or levelName is not a valid level name.
+ * does not exist, or {@code levelName} is not a valid level name.
*
* @throws SecurityException if a security manager exists and if
* the caller does not have LoggingPermission("control").
@@ -124,15 +124,15 @@
/**
* Returns the name of the parent for the specified logger.
- * If the specified logger does not exist, null is returned.
- * If the specified logger is the root Logger in the namespace,
+ * If the specified logger does not exist, {@code null} is returned.
+ * If the specified logger is the root {@code Logger} in the namespace,
* the result will be an empty string.
*
- * @param loggerName The name of a Logger.
+ * @param loggerName The name of a {@code Logger}.
*
* @return the name of the nearest existing parent logger;
* an empty string if the specified logger is the root logger.
- * If the specified logger does not exist, null
+ * If the specified logger does not exist, {@code null}
* is returned.
*/
public String getParentLoggerName(String loggerName);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/MemoryHandler.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/MemoryHandler.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/MemoryHandler.java Wed Jul 05 20:44:51 2017 +0200
@@ -26,48 +26,48 @@
package java.util.logging;
/**
- * Handler that buffers requests in a circular buffer in memory.
+ * {@code Handler} that buffers requests in a circular buffer in memory.
*
- * Normally this Handler simply stores incoming LogRecords
+ * Normally this {@code Handler} simply stores incoming {@code LogRecords}
* into its memory buffer and discards earlier records. This buffering
* is very cheap and avoids formatting costs. On certain trigger
- * conditions, the MemoryHandler will push out its current buffer
- * contents to a target Handler, which will typically publish
+ * conditions, the {@code MemoryHandler} will push out its current buffer
+ * contents to a target {@code Handler}, which will typically publish
* them to the outside world.
*
* There are three main models for triggering a push of the buffer:
*
* Configuration:
- * By default each MemoryHandler is initialized using the following
- * LogManager configuration properties where <handler-name>
+ * By default each {@code MemoryHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code
@@ -95,8 +95,8 @@
int start, count;
/**
- * Create a MemoryHandler and configure it based on
- * LogManager configuration properties.
+ * Create a {@code MemoryHandler} and configure it based on
+ * {@code LogManager} configuration properties.
*/
public MemoryHandler() {
// configure with specific defaults for MemoryHandler
@@ -132,10 +132,10 @@
}
/**
- * Create a MemoryHandler.
+ * Create a {@code MemoryHandler}.
*
- * The MemoryHandler is configured based on LogManager
- * properties (or their default values) except that the given pushLevel
+ * The {@code MemoryHandler} is configured based on {@code LogManager}
+ * properties (or their default values) except that the given {@code pushLevel}
* argument and buffer size argument are used.
*
* @param target the Handler to which to publish output.
@@ -161,16 +161,16 @@
}
/**
- * Store a LogRecord in an internal buffer.
+ * Store a {@code LogRecord} in an internal buffer.
*
- * If there is a Filter, its isLoggable
+ * If there is a {@code Filter}, its {@code isLoggable}
* method is called to check if the given log record is loggable.
* If not we return. Otherwise the given record is copied into
* an internal circular buffer. Then the record's level property is
- * compared with the pushLevel. If the given level is
- * greater than or equal to the pushLevel then push
+ * compared with the {@code pushLevel}. If the given level is
+ * greater than or equal to the {@code pushLevel} then {@code push}
* is called to write all buffered records to the target output
- * Handler.
+ * {@code Handler}.
*
* @param record description of the log event. A null record is
* silently ignored and is not published
@@ -194,7 +194,7 @@
}
/**
- * Push any buffered output to the target Handler.
+ * Push any buffered output to the target {@code Handler}.
*
* The buffer is then cleared.
*/
@@ -210,9 +210,9 @@
}
/**
- * Causes a flush on the target Handler.
+ * Causes a flush on the target {@code Handler}.
*
- * Note that the current contents of the MemoryHandler
+ * Note that the current contents of the {@code MemoryHandler}
* buffer are not written out. That requires a "push".
*/
@Override
@@ -221,11 +221,11 @@
}
/**
- * Close the Handler and free all associated resources.
- * This will also close the target Handler.
+ * Close the {@code Handler} and free all associated resources.
+ * This will also close the target {@code Handler}.
*
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
@Override
public void close() throws SecurityException {
@@ -234,13 +234,13 @@
}
/**
- * Set the pushLevel. After a LogRecord is copied
+ * Set the {@code pushLevel}. After a {@code LogRecord} is copied
* into our internal buffer, if its level is greater than or equal to
- * the pushLevel, then push will be called.
+ * the {@code pushLevel}, then {@code push} will be called.
*
- * @param newLevel the new value of the pushLevel
+ * @param newLevel the new value of the {@code pushLevel}
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
public synchronized void setPushLevel(Level newLevel) throws SecurityException {
if (newLevel == null) {
@@ -251,25 +251,25 @@
}
/**
- * Get the pushLevel.
+ * Get the {@code pushLevel}.
*
- * @return the value of the pushLevel
+ * @return the value of the {@code pushLevel}
*/
public Level getPushLevel() {
return pushLevel;
}
/**
- * Check if this Handler would actually log a given
- * LogRecord into its internal buffer.
+ * Check if this {@code Handler} would actually log a given
+ * {@code LogRecord} into its internal buffer.
*
- * This method checks if the LogRecord has an appropriate level and
- * whether it satisfies any Filter. However it does not
- * check whether the LogRecord would result in a "push" of the
- * buffer contents. It will return false if the LogRecord is null.
+ * This method checks if the {@code LogRecord} has an appropriate level and
+ * whether it satisfies any {@code Filter}. However it does not
+ * check whether the {@code LogRecord} would result in a "push" of the
+ * buffer contents. It will return false if the {@code LogRecord} is null.
*
- * @param record a LogRecord
- * @return true if the LogRecord would be logged.
+ * @param record a {@code LogRecord}
+ * @return true if the {@code LogRecord} would be logged.
*
*/
@Override
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/SocketHandler.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/SocketHandler.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/SocketHandler.java Wed Jul 05 20:44:51 2017 +0200
@@ -30,27 +30,27 @@
import java.net.*;
/**
- * Simple network logging Handler.
+ * Simple network logging {@code Handler}.
*
- * LogRecords are published to a network stream connection. By default
- * the XMLFormatter class is used for formatting.
+ * {@code LogRecords} are published to a network stream connection. By default
+ * the {@code XMLFormatter} class is used for formatting.
*
* Configuration:
- * By default each SocketHandler is initialized using the following
- * LogManager configuration properties where <handler-name>
+ * By default each {@code SocketHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code
* The output IO stream is buffered, but is flushed after each
- * LogRecord is written.
+ * {@code LogRecord} is written.
*
* @since 1.4
*/
@@ -84,7 +84,7 @@
private int port;
/**
- * Create a SocketHandler, using only LogManager properties
+ * Create a {@code SocketHandler}, using only {@code LogManager} properties
* (or their defaults).
* @throws IllegalArgumentException if the host or port are invalid or
* are not specified as LogManager properties.
@@ -109,9 +109,9 @@
}
/**
- * Construct a SocketHandler using a specified host and port.
+ * Construct a {@code SocketHandler} using a specified host and port.
*
- * The SocketHandler is configured based on LogManager
+ * The {@code SocketHandler} is configured based on {@code LogManager}
* properties (or their default values) except that the given target host
* and port arguments are used. If the host argument is empty, but not
* null String then the localhost is used.
@@ -153,7 +153,7 @@
* Close this output stream.
*
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
@Override
public synchronized void close() throws SecurityException {
@@ -169,7 +169,7 @@
}
/**
- * Format and publish a LogRecord.
+ * Format and publish a {@code LogRecord}.
*
* @param record description of the log event. A null record is
* silently ignored and is not published
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/StreamHandler.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/StreamHandler.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/StreamHandler.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,29 +32,29 @@
import java.util.Objects;
/**
- * Stream based logging Handler.
+ * Stream based logging {@code Handler}.
*
* This is primarily intended as a base class or support class to
- * be used in implementing other logging Handlers.
+ * be used in implementing other logging {@code Handlers}.
*
- * LogRecords are published to a given java.io.OutputStream.
+ * {@code LogRecords} are published to a given {@code java.io.OutputStream}.
*
* Configuration:
- * By default each StreamHandler is initialized using the following
- * LogManager configuration properties where <handler-name>
+ * By default each {@code StreamHandler} is initialized using the following
+ * {@code LogManager} configuration properties where {@code
- * If there is a current output stream then the Formatter's
+ * If there is a current output stream then the {@code Formatter}'s
* tail string is written and the stream is flushed and closed.
* Then the output stream is replaced with the new output stream.
*
* @param out New output stream. May not be null.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
*/
protected synchronized void setOutputStream(OutputStream out) throws SecurityException {
if (out == null) {
@@ -144,15 +144,15 @@
}
/**
- * Set (or change) the character encoding used by this Handler.
+ * Set (or change) the character encoding used by this {@code Handler}.
*
- * The encoding should be set before any LogRecords are written
- * to the Handler.
+ * The encoding should be set before any {@code LogRecords} are written
+ * to the {@code Handler}.
*
* @param encoding The name of a supported character encoding.
* May be null, to indicate the default platform encoding.
* @exception SecurityException if a security manager exists and if
- * the caller does not have LoggingPermission("control").
+ * the caller does not have {@code LoggingPermission("control")}.
* @exception UnsupportedEncodingException if the named encoding is
* not supported.
*/
@@ -173,18 +173,18 @@
}
/**
- * Format and publish a LogRecord.
+ * Format and publish a {@code LogRecord}.
*
- * The StreamHandler first checks if there is an OutputStream
- * and if the given LogRecord has at least the required log level.
+ * The {@code StreamHandler} first checks if there is an {@code OutputStream}
+ * and if the given {@code LogRecord} has at least the required log level.
* If not it silently returns. If so, it calls any associated
- * Filter to check if the record should be published. If so,
- * it calls its Formatter to format the record and then writes
+ * {@code Filter} to check if the record should be published. If so,
+ * it calls its {@code Formatter} to format the record and then writes
* the result to the current output stream.
*
- * If this is the first LogRecord to be written to a given
- * OutputStream, the Formatter's "head" string is
- * written to the stream before the LogRecord is written.
+ * If this is the first {@code LogRecord} to be written to a given
+ * {@code OutputStream}, the {@code Formatter}'s "head" string is
+ * written to the stream before the {@code LogRecord} is written.
*
* @param record description of the log event. A null record is
* silently ignored and is not published
@@ -219,14 +219,14 @@
/**
- * Check if this Handler would actually log a given LogRecord.
+ * Check if this {@code Handler} would actually log a given {@code LogRecord}.
*
- * This method checks if the LogRecord has an appropriate level and
- * whether it satisfies any Filter. It will also return false if
+ * This method checks if the {@code LogRecord} has an appropriate level and
+ * whether it satisfies any {@code Filter}. It will also return false if
* no output stream has been assigned yet or the LogRecord is null.
*
- * @param record a LogRecord
- * @return true if the LogRecord would be logged.
+ * @param record a {@code LogRecord}
+ * @return true if the {@code LogRecord} would be logged.
*
*/
@Override
@@ -277,8 +277,8 @@
/**
* Close the current output stream.
*
- * The Formatter's "tail" string is written to the stream before it
- * is closed. In addition, if the Formatter's "head" string has not
+ * The {@code Formatter}'s "tail" string is written to the stream before it
+ * is closed. In addition, if the {@code Formatter}'s "head" string has not
* yet been written to the stream, it will be written before the
* "tail" string.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/GetPropertyAction.java
--- a/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/GetPropertyAction.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/GetPropertyAction.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
import java.security.PrivilegedAction;
/**
- * Utility class to be used by the method AccessControler.doPrivileged
+ * Utility class to be used by the method {@code AccessControler.doPrivileged}
* to get a system property.
*
* @since 1.5
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java
--- a/jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/com/sun/jmx/remote/util/EnvHelp.java Wed Jul 05 20:44:51 2017 +0200
@@ -177,7 +177,7 @@
* The ClassLoader object found in env for
* The ObjectName for uniquely identifying the MXBean for
- * the class loading system within an MBeanServer is:
+ * The {@code ObjectName} for uniquely identifying the MXBean for
+ * the class loading system within an {@code MBeanServer} is:
* The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* the compilation system within an MBeanServer is:
* The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* a garbage collector within an MBeanServer is:
*
* The Java virtual machine implementation may use a high resolution
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/LockInfo.java
--- a/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/LockInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -43,7 +43,7 @@
* two examples of ownable synchronizers provided by the platform.
*
* This method is equivalent to:
*
@@ -516,12 +516,12 @@
* The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* the memory system within an MBeanServer is:
* This MemoryMXBean is a
+ * This {@code MemoryMXBean} is a
* {@link javax.management.NotificationEmitter NotificationEmitter}
* that emits two types of memory {@link javax.management.Notification
* notifications} if any one of the memory pools
@@ -164,20 +164,20 @@
* user data} is set to a {@link CompositeData CompositeData}
* that represents a {@link MemoryNotificationInfo} object
* containing information about the memory pool when the notification
- * was constructed. The CompositeData contains the attributes
+ * was constructed. The {@code CompositeData} contains the attributes
* as described in {@link MemoryNotificationInfo#from
* MemoryNotificationInfo}.
*
*
* MBeanServer access:
* MBeanServer access: The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* a memory manager within an MBeanServer is:
*
* A {@link CompositeData CompositeData} representing
- * the MemoryNotificationInfo object
+ * the {@code MemoryNotificationInfo} object
* is stored in the
* {@link javax.management.Notification#setUserData user data}
* of a {@link javax.management.Notification notification}.
* The {@link #from from} method is provided to convert from
- * a CompositeData to a MemoryNotificationInfo
+ * a {@code CompositeData} to a {@code MemoryNotificationInfo}
* object. For example:
*
*
- * The types of notifications emitted by MemoryMXBean are:
+ * The types of notifications emitted by {@code MemoryMXBean} are:
* The ObjectName for uniquely identifying the MXBean for
- * a memory pool within an MBeanServer is:
+ * The {@code ObjectName} for uniquely identifying the MXBean for
+ * a memory pool within an {@code MBeanServer} is:
*
- * There is no guarantee about when the MemoryMXBean will emit
+ * There is no guarantee about when the {@code MemoryMXBean} will emit
* a threshold notification and when the notification will be delivered.
* When a notification listener is invoked, the memory usage of
* the memory pool may have crossed the usage threshold more
@@ -374,8 +374,8 @@
*
*
* MBeanServer access:
@@ -399,11 +399,11 @@
*
*
* MBeanServer access:
* MBeanServer access:
* MBeanServer access: A MemoryUsage object contains four values:
+ * A {@code MemoryUsage} object contains four values:
* This amount of memory is not guaranteed to be available
@@ -227,7 +227,7 @@
* maximum size.
*
* @return the maximum amount of memory in bytes;
- * -1 if undefined.
+ * {@code -1} if undefined.
*/
public long getMax() {
return max;
@@ -247,8 +247,8 @@
}
/**
- * Returns a MemoryUsage object represented by the
- * given CompositeData. The given CompositeData
+ * Returns a {@code MemoryUsage} object represented by the
+ * given {@code CompositeData}. The given {@code CompositeData}
* must contain the following attributes:
*
* The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* the operating system within an MBeanServer is:
* There is a single global instance of the PlatformLoggingMXBean.
+ * There is a single global instance of the {@code PlatformLoggingMXBean}.
* The {@link java.lang.management.ManagementFactory#getPlatformMXBean(Class)
* ManagementFactory.getPlatformMXBean} method can be used to obtain
* the {@code PlatformLoggingMXBean} object as follows:
@@ -44,7 +44,7 @@
* {@link java.util.logging.LogManager#LOGGING_MXBEAN_NAME java.util.logging:type=Logging}
*
*
- * The instance registered in the platform MBeanServer with
+ * The instance registered in the platform {@code MBeanServer} with
* this {@code ObjectName} implements all attributes defined by
* {@link java.util.logging.LoggingMXBean}.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,13 +35,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getRuntimeMXBean} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer} method.
+ * platform MBeanServer} method.
*
- * The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* the runtime system within an MBeanServer is:
*
@@ -272,9 +272,9 @@
*
*
* MBeanServer access:
* MBeanServer access: The ObjectName for uniquely identifying the MXBean for
+ * The {@code ObjectName} for uniquely identifying the MXBean for
* the thread system within an MBeanServer is:
*
* The {@link #isThreadContentionMonitoringSupported} method can be used to
* determine if a Java virtual machine supports thread contention monitoring.
@@ -106,7 +106,7 @@
* {@linkplain LockInfo lock} a thread is blocked to
* acquire or waiting on and which locks the thread currently owns.
*
- * The ThreadMXBean interface provides the
+ * The {@code ThreadMXBean} interface provides the
* {@link #findMonitorDeadlockedThreads} and
* {@link #findDeadlockedThreads} methods to find deadlocks in
* the running application.
@@ -158,7 +158,7 @@
* Some threads included in the returned array
* may have been terminated when this method returns.
*
- * @return an array of long, each is a thread ID.
+ * @return an array of {@code long}, each is a thread ID.
*
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
@@ -168,34 +168,34 @@
/**
* Returns the thread info for a thread of the specified
- * id with no stack trace.
+ * {@code id} with no stack trace.
* This method is equivalent to calling:
*
- * This method returns a ThreadInfo object representing
+ * This method returns a {@code ThreadInfo} object representing
* the thread information for the thread of the specified ID.
* The stack trace, locked monitors, and locked synchronizers
- * in the returned ThreadInfo object will
+ * in the returned {@code ThreadInfo} object will
* be empty.
*
* If a thread of the given ID is not alive or does not exist,
- * this method will return null. A thread is alive if
+ * this method will return {@code null}. A thread is alive if
* it has been started and has not yet died.
*
*
* MBeanServer access:
- * This method returns an array of the ThreadInfo objects.
+ * This method returns an array of the {@code ThreadInfo} objects.
* The stack trace, locked monitors, and locked synchronizers
- * in each ThreadInfo object will be empty.
+ * in each {@code ThreadInfo} object will be empty.
*
* If a thread of a given ID is not alive or does not exist,
* the corresponding element in the returned array will
- * contain null. A thread is alive if
+ * contain {@code null}. A thread is alive if
* it has been started and has not yet died.
*
*
* MBeanServer access:
* When the Java virtual machine has no stack trace information
- * about a thread or maxDepth == 0,
+ * about a thread or {@code maxDepth == 0},
* the stack trace in the
- * ThreadInfo object will be an empty array of
- * StackTraceElement.
+ * {@code ThreadInfo} object will be an empty array of
+ * {@code StackTraceElement}.
*
*
* If a thread of the given ID is not alive or does not exist,
- * this method will return null. A thread is alive if
+ * this method will return {@code null}. A thread is alive if
* it has been started and has not yet died.
*
*
* MBeanServer access:
* When the Java virtual machine has no stack trace information
- * about a thread or maxDepth == 0,
+ * about a thread or {@code maxDepth == 0},
* the stack trace in the
- * ThreadInfo object will be an empty array of
- * StackTraceElement.
+ * {@code ThreadInfo} object will be an empty array of
+ * {@code StackTraceElement}.
*
- * This method returns an array of the ThreadInfo objects,
+ * This method returns an array of the {@code ThreadInfo} objects,
* each is the thread information about the thread with the same index
- * as in the ids array.
+ * as in the {@code ids} array.
* If a thread of the given ID is not alive or does not exist,
- * null will be set in the corresponding element
+ * {@code null} will be set in the corresponding element
* in the returned array. A thread is alive if
* it has been started and has not yet died.
*
*
* MBeanServer access:
* If the thread of the specified ID is not alive or does not exist,
- * this method returns -1. If CPU time measurement
- * is disabled, this method returns -1.
+ * this method returns {@code -1}. If CPU time measurement
+ * is disabled, this method returns {@code -1}.
* A thread is alive if it has been started and has not yet died.
*
* If CPU time measurement is enabled after the thread has started,
@@ -464,7 +464,7 @@
* @return the total CPU time for a thread of the specified ID
* if the thread of the specified ID exists, the thread is alive,
* and CPU time measurement is enabled;
- * -1 otherwise.
+ * {@code -1} otherwise.
*
* @throws IllegalArgumentException if {@code id <= 0}.
* @throws java.lang.UnsupportedOperationException if the Java
@@ -486,8 +486,8 @@
*
*
* If the thread of the specified ID is not alive or does not exist,
- * this method returns -1. If CPU time measurement
- * is disabled, this method returns -1.
+ * this method returns {@code -1}. If CPU time measurement
+ * is disabled, this method returns {@code -1}.
* A thread is alive if it has been started and has not yet died.
*
* If CPU time measurement is enabled after the thread has started,
@@ -499,7 +499,7 @@
* @return the user-level CPU time for a thread of the specified ID
* if the thread of the specified ID exists, the thread is alive,
* and CPU time measurement is enabled;
- * -1 otherwise.
+ * {@code -1} otherwise.
*
* @throws IllegalArgumentException if {@code id <= 0}.
* @throws java.lang.UnsupportedOperationException if the Java
@@ -521,32 +521,32 @@
* measurement for the current thread.
*
* @return
- * true
+ * {@code true}
* if the Java virtual machine supports CPU time
* measurement for any thread;
- * false otherwise.
+ * {@code false} otherwise.
*/
public boolean isThreadCpuTimeSupported();
/**
* Tests if the Java virtual machine supports CPU time
* measurement for the current thread.
- * This method returns true if {@link #isThreadCpuTimeSupported}
- * returns true.
+ * This method returns {@code true} if {@link #isThreadCpuTimeSupported}
+ * returns {@code true}.
*
* @return
- * true
+ * {@code true}
* if the Java virtual machine supports CPU time
* measurement for current thread;
- * false otherwise.
+ * {@code false} otherwise.
*/
public boolean isCurrentThreadCpuTimeSupported();
/**
* Tests if thread CPU time measurement is enabled.
*
- * @return true if thread CPU time measurement is enabled;
- * false otherwise.
+ * @return {@code true} if thread CPU time measurement is enabled;
+ * {@code false} otherwise.
*
* @throws java.lang.UnsupportedOperationException if the Java virtual
* machine does not support CPU time measurement for other threads
@@ -561,8 +561,8 @@
* Enables or disables thread CPU time measurement. The default
* is platform dependent.
*
- * @param enable true to enable;
- * false to disable.
+ * @param enable {@code true} to enable;
+ * {@code false} to disable.
*
* @throws java.lang.UnsupportedOperationException if the Java
* virtual machine does not support CPU time measurement for
@@ -602,7 +602,7 @@
* should be used.
*
* @return an array of IDs of the threads that are monitor
- * deadlocked, if any; null otherwise.
+ * deadlocked, if any; {@code null} otherwise.
*
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
@@ -640,7 +640,7 @@
*
* @return an array of IDs of the threads that are
* deadlocked waiting for object monitors or ownable synchronizers, if any;
- * null otherwise.
+ * {@code null} otherwise.
*
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
@@ -659,10 +659,10 @@
* object monitor usage.
*
* @return
- * true
+ * {@code true}
* if the Java virtual machine supports monitoring of
* object monitor usage;
- * false otherwise.
+ * {@code false} otherwise.
*
* @see #dumpAllThreads
* @since 1.6
@@ -675,10 +675,10 @@
* ownable synchronizer usage.
*
* @return
- * true
+ * {@code true}
* if the Java virtual machine supports monitoring of ownable
* synchronizer usage;
- * false otherwise.
+ * {@code false} otherwise.
*
* @see #dumpAllThreads
* @since 1.6
@@ -687,7 +687,7 @@
/**
* Returns the thread info for each thread
- * whose ID is in the input array ids, with stack trace
+ * whose ID is in the input array {@code ids}, with stack trace
* and synchronization information.
*
*
@@ -696,30 +696,30 @@
*
- * This method returns an array of the ThreadInfo objects,
+ * This method returns an array of the {@code ThreadInfo} objects,
* each is the thread information about the thread with the same index
- * as in the ids array.
+ * as in the {@code ids} array.
* If a thread of the given ID is not alive or does not exist,
- * null will be set in the corresponding element
+ * {@code null} will be set in the corresponding element
* in the returned array. A thread is alive if
* it has been started and has not yet died.
*
- * If a thread does not lock any object monitor or lockedMonitors
- * is false, the returned ThreadInfo object will have an
- * empty MonitorInfo array. Similarly, if a thread does not
- * lock any synchronizer or lockedSynchronizers is false,
- * the returned ThreadInfo object
- * will have an empty LockInfo array.
+ * If a thread does not lock any object monitor or {@code lockedMonitors}
+ * is {@code false}, the returned {@code ThreadInfo} object will have an
+ * empty {@code MonitorInfo} array. Similarly, if a thread does not
+ * lock any synchronizer or {@code lockedSynchronizers} is {@code false},
+ * the returned {@code ThreadInfo} object
+ * will have an empty {@code LockInfo} array.
*
*
- * When both lockedMonitors and lockedSynchronizers
- * parameters are false, it is equivalent to calling:
+ * When both {@code lockedMonitors} and {@code lockedSynchronizers}
+ * parameters are {@code false}, it is equivalent to calling:
*
* MBeanServer access:
@@ -205,7 +205,7 @@
-2) Access the Oracle-specific MXBean interface via MBeanServer
+2) Access the Oracle-specific MXBean interface via Unless otherwise noted, passing a null argument to a constructor
+ Unless otherwise noted, passing a Returns a shallow clone of this instance.
- * The clone is obtained by simply calling super.clone(),
+ * The clone is obtained by simply calling {@code super.clone()},
* thus calling the default native shallow cloning mechanism
- * implemented by Object.clone().
+ * implemented by {@code Object.clone()}.
* No deeper cloning of any internal field is made. Since this class is immutable, cloning is chiefly of
@@ -274,7 +274,7 @@
*
* @param o the object to compare to.
*
- * @return true if and only if Returns a shallow clone of this instance. The clone is
- * obtained by simply calling super.clone(), thus calling
+ * obtained by simply calling {@code super.clone()}, thus calling
* the default native shallow cloning mechanism implemented by
- * Object.clone(). No deeper cloning of any internal
+ * {@code Object.clone()}. No deeper cloning of any internal
* field is made. Since this class is immutable, cloning is chiefly of
@@ -137,16 +137,16 @@
/**
* Returns the list of parameters for this constructor. Each
- * parameter is described by an The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
- * references to the CBC
mode and NoPadding
padding
@@ -159,9 +159,8 @@
/**
* Initializes this cipher with a key and a source of randomness.
*
- * in
where the input
+ * @param input the input buffer.
+ * @param inputOffset the offset in {@code input} where the input
* starts.
- * @param inLen the input length.
- * @param out the buffer for the result.
- * @param outOffset the ofset in out
where the result
+ * @param inputLen the input length.
+ * @param output the buffer for the result.
+ * @param outputOffset the ofset in {@code output} where the result
* is stored.
*
- * @return the number of bytes stored in out
.
+ * @return the number of bytes stored in {@code out}.
*
* @exception IllegalStateException upon invocation of this method.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java Wed Jul 05 20:44:51 2017 +0200
@@ -100,7 +100,7 @@
* generator, and optionally the requested size in bits of the random
* exponent (private value).
*
- * @param params the parameter set used to generate the key pair
+ * @param algParams the parameter set used to generate the key pair
* @param random the source of randomness
*
* @exception InvalidAlgorithmParameterException if the given parameters
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/com/sun/crypto/provider/DHParameterGenerator.java
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/DHParameterGenerator.java Wed Jul 05 20:44:51 2017 +0200
@@ -92,7 +92,7 @@
* generation values, which specify the size of the prime modulus and
* the size of the random exponent, both in bits.
*
- * @param params the set of parameter generation values
+ * @param genParamSpec the set of parameter generation values
* @param random the source of randomness
*
* @exception InvalidAlgorithmParameterException if the given parameter
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEWithMD5AndDESCipher.java
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEWithMD5AndDESCipher.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEWithMD5AndDESCipher.java Wed Jul 05 20:44:51 2017 +0200
@@ -80,7 +80,7 @@
* Sets the padding mechanism of this cipher. This algorithm only uses
* PKCS #5 padding.
*
- * @param padding the padding mechanism
+ * @param paddingScheme the padding mechanism
*
* @exception NoSuchPaddingException if the requested padding mechanism
* is invalid
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.java
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBEWithMD5AndTripleDESCipher.java Wed Jul 05 20:44:51 2017 +0200
@@ -92,7 +92,7 @@
* Sets the padding mechanism of this cipher. This algorithm only uses
* PKCS #5 padding.
*
- * @param padding the padding mechanism
+ * @param paddingScheme the padding mechanism
*
* @exception NoSuchPaddingException if the requested padding mechanism
* is invalid
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2HmacSHA1Factory.java
--- a/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2HmacSHA1Factory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/com/sun/crypto/provider/PBKDF2HmacSHA1Factory.java Wed Jul 05 20:44:51 2017 +0200
@@ -75,7 +75,7 @@
*
* @param key the key
*
- * @param keySpec the requested format in which the key material shall be
+ * @param keySpecCl the requested format in which the key material shall be
* returned
*
* @return the underlying key specification (key material) in the
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java
--- a/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/BufferedOutputStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,8 +42,8 @@
/**
* The number of valid bytes in the buffer. This value is always
- * in the range 0 through buf.length; elements
- * buf[0] through buf[count-1] contain valid
+ * in the range {@code 0} through {@code buf.length}; elements
+ * {@code buf[0]} through {@code buf[count-1]} contain valid
* byte data.
*/
protected int count;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/BufferedReader.java
--- a/jdk/src/java.base/share/classes/java/io/BufferedReader.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/BufferedReader.java Wed Jul 05 20:44:51 2017 +0200
@@ -170,7 +170,7 @@
* Reads a single character.
*
* @return The character read, as an integer in the range
- * 0 to 65535 (0x00-0xffff), or -1 if the
+ * 0 to 65535 ({@code 0x00-0xffff}), or -1 if the
* end of the stream has been reached
* @exception IOException If an I/O error occurs
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/BufferedWriter.java
--- a/jdk/src/java.base/share/classes/java/io/BufferedWriter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/BufferedWriter.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,7 +34,7 @@
* The default is large enough for most purposes.
*
* read
method.
* toByteArray()
and
- * toString()
.
+ * The data can be retrieved using {@code toByteArray()} and
+ * {@code toString()}.
* len
bytes from the specified byte array
- * starting at offset off
to this byte array output stream.
+ * Writes {@code len} bytes from the specified byte array
+ * starting at offset {@code off} to this byte array output stream.
*
* @param b the data.
* @param off the start offset in the data.
@@ -158,7 +158,7 @@
/**
* Writes the complete contents of this byte array output stream to
* the specified output stream argument, as if by calling the output
- * stream's write method using out.write(buf, 0, count)
.
+ * stream's write method using {@code out.write(buf, 0, count)}.
*
* @param out the output stream to which to write the data.
* @exception IOException if an I/O error occurs.
@@ -168,7 +168,7 @@
}
/**
- * Resets the count
field of this byte array output
+ * Resets the {@code count} field of this byte array output
* stream to zero, so that all currently accumulated output in the
* output stream is discarded. The output stream can be used again,
* reusing the already allocated buffer space.
@@ -194,7 +194,7 @@
/**
* Returns the current size of the buffer.
*
- * @return the value of the count
field, which is the number
+ * @return the value of the {@code count} field, which is the number
* of valid bytes in this output stream.
* @see java.io.ByteArrayOutputStream#count
*/
@@ -204,7 +204,7 @@
/**
* Converts the buffer's contents into a string decoding bytes using the
- * platform's default character set. The length of the new String
+ * platform's default character set. The length of the new {@code String}
* is a function of the character set, and hence may not be equal to the
* size of the buffer.
*
@@ -224,7 +224,7 @@
/**
* Converts the buffer's contents into a string by decoding the bytes using
* the named {@link java.nio.charset.Charset charset}. The length of the new
- * String is a function of the charset, and hence may not be equal
+ * {@code String} is a function of the charset, and hence may not be equal
* to the length of the byte array.
*
*
+ *
- * c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
- *
*
* @deprecated This method does not properly convert bytes into characters.
* As of JDK 1.1, the preferred way to do this is via the
- * {@code
+ * c == (char)(((hibyte & 0xff) << 8) | (b & 0xff))
+ * }
toString(String enc)
method, which takes an encoding-name
- * argument, or the toString()
method, which uses the
+ * {@code toString(String enc)} method, which takes an encoding-name
+ * argument, or the {@code toString()} method, which uses the
* platform's default character encoding.
*
* @param hibyte the high byte of each resulting Unicode character.
@@ -273,9 +273,9 @@
}
/**
- * Closing a ByteArrayOutputStream has no effect. The methods in
+ * Closing a {@code ByteArrayOutputStream} has no effect. The methods in
* this class can be called after the stream has been closed without
- * generating an IOException.
+ * generating an {@code IOException}.
*/
public void close() throws IOException {
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/CharArrayReader.java
--- a/jdk/src/java.base/share/classes/java/io/CharArrayReader.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/CharArrayReader.java Wed Jul 05 20:44:51 2017 +0200
@@ -62,13 +62,13 @@
* Creates a CharArrayReader from the specified array of chars.
*
*
* out.write(csq.toString())
*
- *
@@ -180,9 +181,9 @@
*
* @param csq
* The character sequence from which a subsequence will be
- * appended. If csq is null, then characters
- * will be appended as if csq contained the four
- * characters "null".
+ * appended. If {@code csq} is {@code null}, then characters
+ * will be appended as if {@code csq} contained the four
+ * characters "{@code null}".
*
* @param start
* The index of the first character in the subsequence
@@ -194,9 +195,9 @@
* @return This writer
*
* @throws IndexOutOfBoundsException
- * If start or end are negative, start
- * is greater than end, or end is greater than
- * csq.length()
+ * If {@code start} or {@code end} are negative, {@code start}
+ * is greater than {@code end}, or {@code end} is greater than
+ * {@code csq.length()}
*
* @since 1.5
*/
@@ -209,7 +210,7 @@
/**
* Appends the specified character to this writer.
*
- *
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/Console.java
--- a/jdk/src/java.base/share/classes/java/io/Console.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/Console.java Wed Jul 05 20:44:51 2017 +0200
@@ -47,7 +47,7 @@
* If this virtual machine has a console then it is represented by a
* unique instance of this class which can be obtained by invoking the
* {@link java.lang.System#console()} method. If no console device is
- * available then an invocation of that method will return null.
+ * available then an invocation of that method will return {@code null}.
*
*
*
*
* Console con = System.console();
* if (con != null) {
@@ -117,7 +117,7 @@
*
con.format(format, args)
.
*
* @param format
@@ -191,7 +192,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws IllegalFormatException
@@ -237,7 +238,7 @@
* If an I/O error occurs.
*
* @return A string containing the line read from the console, not
- * including any line-termination characters, or null
+ * including any line-termination characters, or {@code null}
* if an end of stream has been reached.
*/
public String readLine(String fmt, Object ... args) {
@@ -265,7 +266,7 @@
* If an I/O error occurs.
*
* @return A string containing the line read from the console, not
- * including any line-termination characters, or null
+ * including any line-termination characters, or {@code null}
* if an end of stream has been reached.
*/
public String readLine() {
@@ -302,7 +303,7 @@
*
* @return A character array containing the password or passphrase read
* from the console, not including any line-termination characters,
- * or null if an end of stream has been reached.
+ * or {@code null} if an end of stream has been reached.
*/
public char[] readPassword(String fmt, Object ... args) {
char[] passwd = null;
@@ -346,7 +347,7 @@
*
* @return A character array containing the password or passphrase read
* from the console, not including any line-termination characters,
- * or null if an end of stream has been reached.
+ * or {@code null} if an end of stream has been reached.
*/
public char[] readPassword() {
return readPassword("");
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/File.java
--- a/jdk/src/java.base/share/classes/java/io/File.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/File.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,8 +63,8 @@
* pathname string, each name is separated from the next by a single copy of
* the default separator character. The default name-separator
* character is defined by the system property file.separator
, and
- * is made available in the public static fields {@link
- * #separator}
and {@link #separatorChar}
of this class.
+ * is made available in the public static fields {@link
+ * #separator} and {@link #separatorChar} of this class.
* When a pathname string is converted into an abstract pathname, the names
* within it may be separated by the default name-separator character or by any
* other name-separator character that is supported by the underlying system.
@@ -82,11 +82,11 @@
* {@link #separatorChar}
.
+ * {@link #separatorChar}.
*/
public static final String separator = "" + separatorChar;
@@ -236,7 +236,7 @@
/**
* The system-dependent path-separator character, represented as a string
* for convenience. This string contains a single character, namely
- * {@link #pathSeparatorChar}
.
+ * {@link #pathSeparatorChar}.
*/
public static final String pathSeparator = "" + pathSeparatorChar;
@@ -374,33 +374,34 @@
}
/**
- * Creates a new File instance by converting the given
- * file: URI into an abstract pathname.
+ * Creates a new {@code File} instance by converting the given
+ * {@code file:} URI into an abstract pathname.
*
- *
- * new File( f.{@link #toURI() toURI}()).equals( f.{@link #getAbsoluteFile() getAbsoluteFile}())
- *
+ *
*
* so long as the original abstract pathname, the URI, and the new abstract
* pathname are all created in (possibly different invocations of) the same
* Java virtual machine. This relationship typically does not hold,
- * however, when a file: URI that is created in a virtual machine
+ * however, when a {@code file:} URI that is created in a virtual machine
* on one operating system is converted into an abstract pathname in a
* virtual machine on a different operating system.
*
* @param uri
* An absolute, hierarchical URI with a scheme equal to
- * "file", a non-empty path component, and undefined
+ * {@code "file"}, a non-empty path component, and undefined
* authority, query, and fragment components
*
* @throws NullPointerException
- * If uri is null
+ * If {@code uri} is {@code null}
*
* @throws IllegalArgumentException
* If the preconditions on the parameter do not hold
@@ -533,7 +534,7 @@
* Returns the absolute pathname string of this abstract pathname.
*
*
+ * new File(
f.{@link #toURI()
+ * toURI}()).equals(
f.{@link #getAbsoluteFile() getAbsoluteFile}())
+ *
{@link #getPath}
+ * string is simply returned as if by the {@link #getPath}
* method. If this abstract pathname is the empty abstract pathname then
* the pathname string of the current user directory, which is named by the
* system property user.dir
, is returned. Otherwise this
@@ -581,7 +582,7 @@
* converts this pathname to absolute form if necessary, as if by invoking the
* {@link #getAbsolutePath} method, and then maps it to its unique form in a
* system-dependent way. This typically involves removing redundant names
- * such as "." and ".." from the pathname, resolving
+ * such as {@code "."} and {@code ".."} from the pathname, resolving
* symbolic links (on UNIX platforms), and converting drive letters to a
* standard case (on Microsoft Windows platforms).
*
@@ -604,8 +605,8 @@
*
* @throws SecurityException
* If a required system property value cannot be accessed, or
- * if a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead}
method denies
+ * if a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead} method denies
* read access to the file
*
* @since 1.1
@@ -632,8 +633,8 @@
*
* @throws SecurityException
* If a required system property value cannot be accessed, or
- * if a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead}
method denies
+ * if a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead} method denies
* read access to the file
*
* @since 1.2
@@ -687,7 +688,7 @@
}
/**
- * Constructs a file: URI that represents this abstract pathname.
+ * Constructs a {@code file:} URI that represents this abstract pathname.
*
*
- * new {@link #File(java.net.URI) File}( f.toURI()).equals( f.{@link #getAbsoluteFile() getAbsoluteFile}())
- *
+ *
*
* so long as the original abstract pathname, the URI, and the new abstract
* pathname are all created in (possibly different invocations of) the same
* Java virtual machine. Due to the system-dependent nature of abstract
* pathnames, however, this relationship typically does not hold when a
- * file: URI that is created in a virtual machine on one operating
+ * {@code file:} URI that is created in a virtual machine on one operating
* system is converted into an abstract pathname in a virtual machine on a
* different operating system.
*
@@ -716,7 +718,7 @@
* may be used to obtain a {@code Path} representing this abstract pathname.
*
* @return An absolute, hierarchical URI with a scheme equal to
- * "file", a path representing this abstract pathname,
+ * {@code "file"}, a path representing this abstract pathname,
* and undefined authority, query, and fragment components
* @throws SecurityException If a required system property value cannot
* be accessed.
@@ -753,8 +755,8 @@
* application;
+ * new {@link #File(java.net.URI) File}(
f.toURI()).equals(
+ *
f.{@link #getAbsoluteFile() getAbsoluteFile}())
+ *
false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public boolean canRead() {
@@ -781,8 +783,8 @@
* false
otherwise.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*/
public boolean canWrite() {
@@ -804,8 +806,8 @@
* by this abstract pathname exists; false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file or directory
*/
public boolean exists() {
@@ -834,8 +836,8 @@
* false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public boolean isDirectory() {
@@ -867,8 +869,8 @@
* false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public boolean isFile() {
@@ -894,8 +896,8 @@
* underlying platform
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*
* @since 1.2
@@ -928,8 +930,8 @@
* file does not exist or if an I/O error occurs
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public long lastModified() {
@@ -959,8 +961,8 @@
* denoting system-dependent entities such as devices or pipes.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method denies read access to the file
*/
public long length() {
@@ -997,8 +999,8 @@
* If an I/O error occurred
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.2
@@ -1026,8 +1028,8 @@
* successfully deleted; false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkDelete}
method denies
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkDelete} method denies
* delete access to the file
*/
public boolean delete() {
@@ -1060,8 +1062,8 @@
* facility should be used instead.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkDelete}
method denies
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkDelete} method denies
* delete access to the file
*
* @see #delete
@@ -1301,8 +1303,8 @@
* created; false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not permit the named directory to be created
*/
public boolean mkdir() {
@@ -1327,12 +1329,12 @@
* otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkRead(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkRead(java.lang.String)}
* method does not permit verification of the existence of the
* named directory and all necessary parent directories; or if
- * the {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * the {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not permit the named directory and all necessary
* parent directories to be created
*/
@@ -1375,8 +1377,8 @@
* false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to either the old or new pathnames
*
* @throws NullPointerException
@@ -1405,7 +1407,7 @@
* but some provide more precision. The argument will be truncated to fit
* the supported precision. If the operation succeeds and no intervening
* operations on the file take place, then the next invocation of the
- * {@link #lastModified}
method will return the (possibly
+ * {@link #lastModified} method will return the (possibly
* truncated) time
argument that was passed to this method.
*
* @param time The new last-modified time, measured in milliseconds since
@@ -1417,8 +1419,8 @@
* @throws IllegalArgumentException If the argument is negative
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file
*
* @since 1.2
@@ -1448,8 +1450,8 @@
* false
otherwise
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file
*
* @since 1.2
@@ -1491,8 +1493,8 @@
* the access permissions of this abstract pathname.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the named file
*
* @since 1.6
@@ -1514,11 +1516,12 @@
* machine with special privileges that allow it to modify files that
* disallow write operations.
*
- *
- * file.setWritable(arg, true)
+ * {@code
+ * file.setWritable(arg, true)
+ * }
*
* @param writable
* If true
, sets the access permission to allow write
@@ -1529,8 +1532,8 @@
* change the access permissions of this abstract pathname.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1568,8 +1571,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1591,11 +1594,12 @@
* machine with special privileges that allow it to read files that are
* marked as unreadable.
*
- *
- * file.setReadable(arg, true)
+ * {@code
+ * file.setReadable(arg, true)
+ * }
*
* @param readable
* If true
, sets the access permission to allow read
@@ -1609,8 +1613,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1648,8 +1652,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1671,11 +1675,12 @@
* virtual machine with special privileges that allow it to execute files
* that are not marked executable.
*
- *
- * file.setExecutable(arg, true)
+ * {@code
+ * file.setExecutable(arg, true)
+ * }
*
* @param executable
* If true
, sets the access permission to allow execute
@@ -1689,8 +1694,8 @@
* operation will fail.
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method denies write access to the file
*
* @since 1.6
@@ -1710,8 +1715,8 @@
* and the application is allowed to execute the file
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkExec(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkExec(java.lang.String)}
* method denies execute access to the file
*
* @since 1.6
@@ -1783,12 +1788,12 @@
* Returns the size of the partition named by this
* abstract pathname.
*
- * @return The size, in bytes, of the partition or 0L if this
+ * @return The size, in bytes, of the partition or {@code 0L} if this
* abstract pathname does not name a partition
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link RuntimePermission}("getFileSystemAttributes")
+ * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname
*
@@ -1819,14 +1824,14 @@
* makes no guarantee that write operations to this file system
* will succeed.
*
- * @return The number of unallocated bytes on the partition or 0L
+ * @return The number of unallocated bytes on the partition or {@code 0L}
* if the abstract pathname does not name a partition. This
* value will be less than or equal to the total file system size
* returned by {@link #getTotalSpace}.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link RuntimePermission}("getFileSystemAttributes")
+ * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname
*
@@ -1860,14 +1865,14 @@
* virtual machine. This method makes no guarantee that write operations
* to this file system will succeed.
*
- * @return The number of available bytes on the partition or 0L
+ * @return The number of available bytes on the partition or {@code 0L}
* if the abstract pathname does not name a partition. On
* systems where this information is not available, this method
* will be equivalent to a call to {@link #getFreeSpace}.
*
* @throws SecurityException
* If a security manager has been installed and it denies
- * {@link RuntimePermission}("getFileSystemAttributes")
+ * {@link RuntimePermission}{@code ("getFileSystemAttributes")}
* or its {@link SecurityManager#checkRead(String)} method denies
* read access to the file named by this abstract pathname
*
@@ -1939,7 +1944,7 @@
*
* This method provides only part of a temporary-file facility. To arrange
* for a file created by this method to be deleted automatically, use the
- * {@link #deleteOnExit}
method.
+ * {@link #deleteOnExit} method.
*
* prefix
argument must be at least three characters
* long. It is recommended that the prefix be a short, meaningful string
@@ -1987,8 +1992,8 @@
* @throws IOException If a file could not be created
*
* @throws SecurityException
- * If a security manager exists and its {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not allow a file to be created
*
* @since 1.2
@@ -2032,9 +2037,9 @@
/**
* Creates an empty file in the default temporary-file directory, using
* the given prefix and suffix to generate its name. Invoking this method
- * is equivalent to invoking {@link #createTempFile(java.lang.String,
+ * is equivalent to invoking {@link #createTempFile(java.lang.String,
* java.lang.String, java.io.File)
- * createTempFile(prefix, suffix, null)}
.
+ * createTempFile(prefix, suffix, null)}.
*
* {@link
- * java.lang.SecurityManager#checkWrite(java.lang.String)}
+ * If a security manager exists and its {@link
+ * java.lang.SecurityManager#checkWrite(java.lang.String)}
* method does not allow a file to be created
*
* @since 1.2
@@ -2136,7 +2141,7 @@
/**
* Returns the pathname string of this abstract pathname. This is just the
- * string returned by the {@link #getPath}
method.
+ * string returned by the {@link #getPath} method.
*
* @return The string form of this abstract pathname
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/FileOutputStream.java
--- a/jdk/src/java.base/share/classes/java/io/FileOutputStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FileOutputStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -37,7 +37,7 @@
* File
or to a FileDescriptor
. Whether or not
* a file is available or may be created depends upon the underlying
* platform. Some platforms, in particular, allow a file to be opened
- * for writing by only one FileOutputStream (or other
+ * for writing by only one {@code FileOutputStream} (or other
* file-writing object) at a time. In such situations the constructors in
* this class will fail if the file involved is already open.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/FileReader.java
--- a/jdk/src/java.base/share/classes/java/io/FileReader.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FileReader.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,9 +32,9 @@
* size are appropriate. To specify these values yourself, construct an
* InputStreamReader on a FileInputStream.
*
- * FileReader
is meant for reading streams of characters.
+ * FileInputStream
.
+ * {@code FileInputStream}.
*
* @see InputStreamReader
* @see FileInputStream
@@ -45,7 +45,7 @@
public class FileReader extends InputStreamReader {
/**
- * Creates a new FileReader, given the name of the
+ * Creates a new {@code FileReader}, given the name of the
* file to read from.
*
* @param fileName the name of the file to read from
@@ -59,10 +59,10 @@
}
/**
- * Creates a new FileReader, given the File
+ * Creates a new {@code FileReader}, given the {@code File}
* to read from.
*
- * @param file the File to read from
+ * @param file the {@code File} to read from
* @exception FileNotFoundException if the file does not exist,
* is a directory rather than a regular file,
* or for some other reason cannot be opened for
@@ -73,8 +73,8 @@
}
/**
- * Creates a new FileReader, given the
- * FileDescriptor to read from.
+ * Creates a new {@code FileReader}, given the
+ * {@code FileDescriptor} to read from.
*
* @param fd the FileDescriptor to read from
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/FileWriter.java
--- a/jdk/src/java.base/share/classes/java/io/FileWriter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FileWriter.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,13 +34,13 @@
*
* FileWriter
is meant for writing streams of characters.
+ * FileOutputStream
.
+ * {@code FileOutputStream}.
*
* @see OutputStreamWriter
* @see FileOutputStream
@@ -68,7 +68,7 @@
* indicating whether or not to append the data written.
*
* @param fileName String The system-dependent filename.
- * @param append boolean if true
, then data will be written
+ * @param append boolean if {@code true}, then data will be written
* to the end of the file rather than the beginning.
* @throws IOException if the named file exists but is a directory rather
* than a regular file, does not exist but cannot be
@@ -92,11 +92,11 @@
/**
* Constructs a FileWriter object given a File object. If the second
- * argument is true
, then bytes will be written to the end
+ * argument is {@code true}, then bytes will be written to the end
* of the file rather than the beginning.
*
* @param file a File object to write to
- * @param append if true
, then bytes will be written
+ * @param append if {@code true}, then bytes will be written
* to the end of the file rather than the beginning
* @throws IOException if the file exists but is a directory rather than
* a regular file, does not exist but cannot be created,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/FilterOutputStream.java
--- a/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/FilterOutputStream.java Wed Jul 05 20:44:51 2017 +0200
@@ -57,7 +57,7 @@
* underlying output stream.
*
* @param out the underlying output stream to be assigned to
- * the field this.out for later use, or
+ * the field {@code this.out} for later use, or
* null
if this instance is to be
* created without an underlying stream.
*/
@@ -70,9 +70,9 @@
* write
method of FilterOutputStream
* calls the write
method of its underlying output stream,
- * that is, it performs out.write(b).
+ * that is, it performs {@code out.write(b)}.
* byte
.
* @exception IOException if an I/O error occurs.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/Flushable.java
--- a/jdk/src/java.base/share/classes/java/io/Flushable.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/Flushable.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
import java.io.IOException;
/**
- * A Flushable is a destination of data that can be flushed. The
+ * A {@code Flushable} is a destination of data that can be flushed. The
* flush method is invoked to write any buffered output to the underlying
* stream.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/IOError.java
--- a/jdk/src/java.base/share/classes/java/io/IOError.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/IOError.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,11 +35,11 @@
/**
* Constructs a new instance of IOError with the specified cause. The
* IOError is created with the detail message of
- * (cause==null ? null : cause.toString()) (which typically
+ * {@code (cause==null ? null : cause.toString())} (which typically
* contains the class and detail message of cause).
*
* @param cause
- * The cause of this error, or null if the cause
+ * The cause of this error, or {@code null} if the cause
* is not known
*/
public IOError(Throwable cause) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/LineNumberReader.java
--- a/jdk/src/java.base/share/classes/java/io/LineNumberReader.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/LineNumberReader.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,10 +34,10 @@
*
* off
is negative, or len
is negative, or
* off+len
is greater than the length of the array
- * b
, then an IndexOutOfBoundsException is thrown.
+ * {@code b}, then an {@code IndexOutOfBoundsException} is thrown.
*
* @param b the data.
* @param off the start offset in the data.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java
--- a/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/OutputStreamWriter.java Wed Jul 05 20:44:51 2017 +0200
@@ -53,7 +53,7 @@
* PrintStream
adds functionality to another output stream,
+ * A {@code PrintStream} adds functionality to another output stream,
* namely the ability to print representations of various data values
* conveniently. Two other features are provided as well. Unlike other output
- * streams, a PrintStream
never throws an
- * IOException
; instead, exceptional situations merely set an
- * internal flag that can be tested via the checkError
method.
- * Optionally, a PrintStream
can be created so as to flush
- * automatically; this means that the flush
method is
+ * streams, a {@code PrintStream} never throws an
+ * {@code IOException}; instead, exceptional situations merely set an
+ * internal flag that can be tested via the {@code checkError} method.
+ * Optionally, a {@code PrintStream} can be created so as to flush
+ * automatically; this means that the {@code flush} method is
* automatically invoked after a byte array is written, one of the
- * println
methods is invoked, or a newline character or byte
- * ('\n'
) is written.
+ * {@code println} methods is invoked, or a newline character or byte
+ * ({@code '\n'}) is written.
*
- * PrintStream
are converted into
- * bytes using the platform's default character encoding. The {@link
- * PrintWriter}
class should be used in situations that require writing
- * characters rather than bytes.
+ * println
methods is invoked, or a newline
- * character or byte ('\n'
) is written
+ * {@code println} methods is invoked, or a newline
+ * character or byte ({@code '\n'}) is written
*
* @see java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean)
*/
@@ -158,8 +158,8 @@
* printed
* @param autoFlush A boolean; if true, the output buffer will be flushed
* whenever a byte array is written, one of the
- * println
methods is invoked, or a newline
- * character or byte ('\n'
) is written
+ * {@code println} methods is invoked, or a newline
+ * character or byte ({@code '\n'}) is written
* @param encoding The name of a supported
*
* character encoding
@@ -371,21 +371,21 @@
/**
* Flushes the stream and checks its error state. The internal error state
- * is set to true
when the underlying output stream throws an
- * IOException
other than InterruptedIOException
,
- * and when the setError
method is invoked. If an operation
+ * is set to {@code true} when the underlying output stream throws an
+ * {@code IOException} other than {@code InterruptedIOException},
+ * and when the {@code setError} method is invoked. If an operation
* on the underlying output stream throws an
- * InterruptedIOException
, then the PrintStream
+ * {@code InterruptedIOException}, then the {@code PrintStream}
* converts the exception back into an interrupt by doing:
- *
+ *
* or the equivalent.
*
- * @return {@code
* Thread.currentThread().interrupt();
- *
+ * }true
if and only if this stream has encountered an
- * IOException
other than
- * InterruptedIOException
, or the
- * setError
method has been invoked
+ * @return {@code true} if and only if this stream has encountered an
+ * {@code IOException} other than
+ * {@code InterruptedIOException}, or the
+ * {@code setError} method has been invoked
*/
public boolean checkError() {
if (out != null)
@@ -398,11 +398,11 @@
}
/**
- * Sets the error state of the stream to true
.
+ * Sets the error state of the stream to {@code true}.
*
* flush
method will be
+ * automatic flushing is enabled then the {@code flush} method will be
* invoked.
*
* print(char)
or println(char)
+ * encoding, use the {@code print(char)} or {@code println(char)}
* methods.
*
* @param b The byte to be written
@@ -460,13 +460,13 @@
}
/**
- * Writes len
bytes from the specified byte array starting at
- * offset off
to this stream. If automatic flushing is
- * enabled then the flush
method will be invoked.
+ * Writes {@code len} bytes from the specified byte array starting at
+ * offset {@code off} to this stream. If automatic flushing is
+ * enabled then the {@code flush} method will be invoked.
*
* print(char)
or println(char)
+ * encoding, use the {@code print(char)} or {@code println(char)}
* methods.
*
* @param buf A byte array
@@ -559,13 +559,13 @@
/* Methods that do not terminate lines */
/**
- * Prints a boolean value. The string produced by {@link
- * java.lang.String#valueOf(boolean)}
is translated into bytes
+ * Prints a boolean value. The string produced by {@link
+ * java.lang.String#valueOf(boolean)} is translated into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param b The boolean
to be printed
+ * @param b The {@code boolean} to be printed
*/
public void print(boolean b) {
write(b ? "true" : "false");
@@ -575,22 +575,22 @@
* Prints a character. The character is translated into one or more bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param c The char
to be printed
+ * @param c The {@code char} to be printed
*/
public void print(char c) {
write(String.valueOf(c));
}
/**
- * Prints an integer. The string produced by {@link
- * java.lang.String#valueOf(int)}
is translated into bytes
+ * Prints an integer. The string produced by {@link
+ * java.lang.String#valueOf(int)} is translated into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param i The int
to be printed
+ * @param i The {@code int} to be printed
* @see java.lang.Integer#toString(int)
*/
public void print(int i) {
@@ -598,13 +598,13 @@
}
/**
- * Prints a long integer. The string produced by {@link
- * java.lang.String#valueOf(long)}
is translated into bytes
+ * Prints a long integer. The string produced by {@link
+ * java.lang.String#valueOf(long)} is translated into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param l The long
to be printed
+ * @param l The {@code long} to be printed
* @see java.lang.Long#toString(long)
*/
public void print(long l) {
@@ -612,13 +612,13 @@
}
/**
- * Prints a floating-point number. The string produced by {@link
- * java.lang.String#valueOf(float)}
is translated into bytes
+ * Prints a floating-point number. The string produced by {@link
+ * java.lang.String#valueOf(float)} is translated into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param f The float
to be printed
+ * @param f The {@code float} to be printed
* @see java.lang.Float#toString(float)
*/
public void print(float f) {
@@ -627,12 +627,12 @@
/**
* Prints a double-precision floating-point number. The string produced by
- * {@link java.lang.String#valueOf(double)}
is translated into
+ * {@link java.lang.String#valueOf(double)} is translated into
* bytes according to the platform's default character encoding, and these
- * bytes are written in exactly the manner of the {@link
- * #write(int)}
method.
+ * bytes are written in exactly the manner of the {@link
+ * #write(int)} method.
*
- * @param d The double
to be printed
+ * @param d The {@code double} to be printed
* @see java.lang.Double#toString(double)
*/
public void print(double d) {
@@ -643,24 +643,24 @@
* Prints an array of characters. The characters are converted into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
* @param s The array of chars to be printed
*
- * @throws NullPointerException If s
is null
+ * @throws NullPointerException If {@code s} is {@code null}
*/
public void print(char s[]) {
write(s);
}
/**
- * Prints a string. If the argument is null
then the string
- * "null"
is printed. Otherwise, the string's characters are
+ * Prints a string. If the argument is {@code null} then the string
+ * {@code "null"} is printed. Otherwise, the string's characters are
* converted into bytes according to the platform's default character
* encoding, and these bytes are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param s The String
to be printed
+ * @param s The {@code String} to be printed
*/
public void print(String s) {
if (s == null) {
@@ -670,13 +670,13 @@
}
/**
- * Prints an object. The string produced by the {@link
- * java.lang.String#valueOf(Object)}
method is translated into bytes
+ * Prints an object. The string produced by the {@link
+ * java.lang.String#valueOf(Object)} method is translated into bytes
* according to the platform's default character encoding, and these bytes
* are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param obj The Object
to be printed
+ * @param obj The {@code Object} to be printed
* @see java.lang.Object#toString()
*/
public void print(Object obj) {
@@ -689,8 +689,8 @@
/**
* Terminates the current line by writing the line separator string. The
* line separator string is defined by the system property
- * line.separator
, and is not necessarily a single newline
- * character ('\n'
).
+ * {@code line.separator}, and is not necessarily a single newline
+ * character ({@code '\n'}).
*/
public void println() {
newLine();
@@ -698,10 +698,10 @@
/**
* Prints a boolean and then terminate the line. This method behaves as
- * though it invokes {@link #print(boolean)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(boolean)} and then
+ * {@link #println()}.
*
- * @param x The boolean
to be printed
+ * @param x The {@code boolean} to be printed
*/
public void println(boolean x) {
synchronized (this) {
@@ -712,10 +712,10 @@
/**
* Prints a character and then terminate the line. This method behaves as
- * though it invokes {@link #print(char)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(char)} and then
+ * {@link #println()}.
*
- * @param x The char
to be printed.
+ * @param x The {@code char} to be printed.
*/
public void println(char x) {
synchronized (this) {
@@ -726,10 +726,10 @@
/**
* Prints an integer and then terminate the line. This method behaves as
- * though it invokes {@link #print(int)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(int)} and then
+ * {@link #println()}.
*
- * @param x The int
to be printed.
+ * @param x The {@code int} to be printed.
*/
public void println(int x) {
synchronized (this) {
@@ -740,10 +740,10 @@
/**
* Prints a long and then terminate the line. This method behaves as
- * though it invokes {@link #print(long)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(long)} and then
+ * {@link #println()}.
*
- * @param x a The long
to be printed.
+ * @param x a The {@code long} to be printed.
*/
public void println(long x) {
synchronized (this) {
@@ -754,10 +754,10 @@
/**
* Prints a float and then terminate the line. This method behaves as
- * though it invokes {@link #print(float)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(float)} and then
+ * {@link #println()}.
*
- * @param x The float
to be printed.
+ * @param x The {@code float} to be printed.
*/
public void println(float x) {
synchronized (this) {
@@ -768,10 +768,10 @@
/**
* Prints a double and then terminate the line. This method behaves as
- * though it invokes {@link #print(double)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(double)} and then
+ * {@link #println()}.
*
- * @param x The double
to be printed.
+ * @param x The {@code double} to be printed.
*/
public void println(double x) {
synchronized (this) {
@@ -782,8 +782,8 @@
/**
* Prints an array of characters and then terminate the line. This method
- * behaves as though it invokes {@link #print(char[])}
and
- * then {@link #println()}
.
+ * behaves as though it invokes {@link #print(char[])} and
+ * then {@link #println()}.
*
* @param x an array of chars to print.
*/
@@ -796,10 +796,10 @@
/**
* Prints a String and then terminate the line. This method behaves as
- * though it invokes {@link #print(String)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(String)} and then
+ * {@link #println()}.
*
- * @param x The String
to be printed.
+ * @param x The {@code String} to be printed.
*/
public void println(String x) {
synchronized (this) {
@@ -812,10 +812,10 @@
* Prints an Object and then terminate the line. This method calls
* at first String.valueOf(x) to get the printed object's string value,
* then behaves as
- * though it invokes {@link #print(String)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(String)} and then
+ * {@link #println()}.
*
- * @param x The Object
to be printed.
+ * @param x The {@code Object} to be printed.
*/
public void println(Object x) {
String s = String.valueOf(x);
@@ -830,11 +830,13 @@
* A convenience method to write a formatted string to this output stream
* using the specified format string and arguments.
*
- *
- * out.format(format, args)
+ * {@code
+ * out.format(format, args)
+ * }
*
* @param format
* A format string as described in The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -861,7 +863,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This output stream
*
@@ -875,15 +877,17 @@
* A convenience method to write a formatted string to this output stream
* using the specified format string and arguments.
*
- *
- * out.format(l, format, args)
+ * {@code
+ * out.format(l, format, args)
+ * }
*
* @param l
* The {@linkplain java.util.Locale locale} to apply during
- * formatting. If l is null then no localization
+ * formatting. If {@code l} is {@code null} then no localization
* is applied.
*
* @param format
@@ -898,7 +902,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -911,7 +915,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This output stream
*
@@ -941,7 +945,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -954,7 +958,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This output stream
*
@@ -983,7 +987,7 @@
*
* @param l
* The {@linkplain java.util.Locale locale} to apply during
- * formatting. If l is null then no localization
+ * formatting. If {@code l} is {@code null} then no localization
* is applied.
*
* @param format
@@ -998,7 +1002,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -1011,7 +1015,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This output stream
*
@@ -1037,21 +1041,22 @@
/**
* Appends the specified character sequence to this output stream.
*
- *
- * out.print(csq.toString())
+ * {@code
+ * out.print(csq.toString())
+ * }
*
- *
- * out.print(csq.subSequence(start, end).toString())
+ * {@code
+ * out.print(csq.subSequence(start, end).toString())
+ * }
*
* @param csq
* The character sequence from which a subsequence will be
- * appended. If csq is null, then characters
- * will be appended as if csq contained the four
- * characters "null".
+ * appended. If {@code csq} is {@code null}, then characters
+ * will be appended as if {@code csq} contained the four
+ * characters {@code "null"}.
*
* @param start
* The index of the first character in the subsequence
@@ -1093,9 +1100,9 @@
* @return This output stream
*
* @throws IndexOutOfBoundsException
- * If start or end are negative, start
- * is greater than end, or end is greater than
- * csq.length()
+ * If {@code start} or {@code end} are negative, {@code start}
+ * is greater than {@code end}, or {@code end} is greater than
+ * {@code csq.length()}
*
* @since 1.5
*/
@@ -1108,11 +1115,12 @@
/**
* Appends the specified character to this output stream.
*
- *
- * out.print(c)
+ * {@code
+ * out.print(c)
+ * }
*
* @param c
* The 16-bit character to append
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/PrintWriter.java
--- a/jdk/src/java.base/share/classes/java/io/PrintWriter.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/PrintWriter.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,13 +34,13 @@
/**
* Prints formatted representations of objects to a text-output stream. This
- * class implements all of the print methods found in {@link
+ * class implements all of the {@code print} methods found in {@link
* PrintStream}. It does not contain methods for writing raw bytes, for which
* a program should use unencoded byte streams.
*
* PrintWriter
.
+ * {@code PrintWriter}.
*
* @since 1.2
*/
@@ -98,8 +98,8 @@
* Creates a new PrintWriter.
*
* @param out A character-output stream
- * @param autoFlush A boolean; if true, the println,
- * printf, or format methods will
+ * @param autoFlush A boolean; if true, the {@code println},
+ * {@code printf}, or {@code format} methods will
* flush the output buffer
*/
public PrintWriter(Writer out,
@@ -130,8 +130,8 @@
* default character encoding.
*
* @param out An output stream
- * @param autoFlush A boolean; if true, the println,
- * printf, or format methods will
+ * @param autoFlush A boolean; if true, the {@code println},
+ * {@code printf}, or {@code format} methods will
* flush the output buffer
*
* @see java.io.OutputStreamWriter#OutputStreamWriter(java.io.OutputStream)
@@ -340,7 +340,7 @@
/**
* Flushes the stream if it's not closed and checks its error state.
*
- * @return true
if the print stream has encountered an error,
+ * @return {@code true} if the print stream has encountered an error,
* either on the underlying output stream or during a format
* conversion.
*/
@@ -361,7 +361,7 @@
* Indicates that an error has occurred.
*
* {@link
- * java.lang.String#valueOf(boolean)}
is translated into bytes
+ * Prints a boolean value. The string produced by {@link
+ * java.lang.String#valueOf(boolean)} is translated into bytes
* according to the platform's default character encoding, and these bytes
- * are written in exactly the manner of the {@link
- * #write(int)}
method.
+ * are written in exactly the manner of the {@link
+ * #write(int)} method.
*
- * @param b The boolean
to be printed
+ * @param b The {@code boolean} to be printed
*/
public void print(boolean b) {
write(b ? "true" : "false");
@@ -500,23 +500,23 @@
/**
* Prints a character. The character is translated into one or more bytes
* according to the platform's default character encoding, and these bytes
- * are written in exactly the manner of the {@link
- * #write(int)}
method.
+ * are written in exactly the manner of the {@link
+ * #write(int)} method.
*
- * @param c The char
to be printed
+ * @param c The {@code char} to be printed
*/
public void print(char c) {
write(c);
}
/**
- * Prints an integer. The string produced by {@link
- * java.lang.String#valueOf(int)}
is translated into bytes according
+ * Prints an integer. The string produced by {@link
+ * java.lang.String#valueOf(int)} is translated into bytes according
* to the platform's default character encoding, and these bytes are
- * written in exactly the manner of the {@link #write(int)}
+ * written in exactly the manner of the {@link #write(int)}
* method.
*
- * @param i The int
to be printed
+ * @param i The {@code int} to be printed
* @see java.lang.Integer#toString(int)
*/
public void print(int i) {
@@ -524,13 +524,13 @@
}
/**
- * Prints a long integer. The string produced by {@link
- * java.lang.String#valueOf(long)}
is translated into bytes
+ * Prints a long integer. The string produced by {@link
+ * java.lang.String#valueOf(long)} is translated into bytes
* according to the platform's default character encoding, and these bytes
- * are written in exactly the manner of the {@link #write(int)}
+ * are written in exactly the manner of the {@link #write(int)}
* method.
*
- * @param l The long
to be printed
+ * @param l The {@code long} to be printed
* @see java.lang.Long#toString(long)
*/
public void print(long l) {
@@ -538,13 +538,13 @@
}
/**
- * Prints a floating-point number. The string produced by {@link
- * java.lang.String#valueOf(float)}
is translated into bytes
+ * Prints a floating-point number. The string produced by {@link
+ * java.lang.String#valueOf(float)} is translated into bytes
* according to the platform's default character encoding, and these bytes
- * are written in exactly the manner of the {@link #write(int)}
+ * are written in exactly the manner of the {@link #write(int)}
* method.
*
- * @param f The float
to be printed
+ * @param f The {@code float} to be printed
* @see java.lang.Float#toString(float)
*/
public void print(float f) {
@@ -553,12 +553,12 @@
/**
* Prints a double-precision floating-point number. The string produced by
- * {@link java.lang.String#valueOf(double)}
is translated into
+ * {@link java.lang.String#valueOf(double)} is translated into
* bytes according to the platform's default character encoding, and these
- * bytes are written in exactly the manner of the {@link
- * #write(int)}
method.
+ * bytes are written in exactly the manner of the {@link
+ * #write(int)} method.
*
- * @param d The double
to be printed
+ * @param d The {@code double} to be printed
* @see java.lang.Double#toString(double)
*/
public void print(double d) {
@@ -568,25 +568,25 @@
/**
* Prints an array of characters. The characters are converted into bytes
* according to the platform's default character encoding, and these bytes
- * are written in exactly the manner of the {@link #write(int)}
+ * are written in exactly the manner of the {@link #write(int)}
* method.
*
* @param s The array of chars to be printed
*
- * @throws NullPointerException If s
is null
+ * @throws NullPointerException If {@code s} is {@code null}
*/
public void print(char s[]) {
write(s);
}
/**
- * Prints a string. If the argument is null
then the string
- * "null"
is printed. Otherwise, the string's characters are
+ * Prints a string. If the argument is {@code null} then the string
+ * {@code "null"} is printed. Otherwise, the string's characters are
* converted into bytes according to the platform's default character
* encoding, and these bytes are written in exactly the manner of the
- * {@link #write(int)}
method.
+ * {@link #write(int)} method.
*
- * @param s The String
to be printed
+ * @param s The {@code String} to be printed
*/
public void print(String s) {
if (s == null) {
@@ -596,13 +596,13 @@
}
/**
- * Prints an object. The string produced by the {@link
- * java.lang.String#valueOf(Object)}
method is translated into bytes
+ * Prints an object. The string produced by the {@link
+ * java.lang.String#valueOf(Object)} method is translated into bytes
* according to the platform's default character encoding, and these bytes
- * are written in exactly the manner of the {@link #write(int)}
+ * are written in exactly the manner of the {@link #write(int)}
* method.
*
- * @param obj The Object
to be printed
+ * @param obj The {@code Object} to be printed
* @see java.lang.Object#toString()
*/
public void print(Object obj) {
@@ -614,8 +614,8 @@
/**
* Terminates the current line by writing the line separator string. The
* line separator string is defined by the system property
- * line.separator
, and is not necessarily a single newline
- * character ('\n'
).
+ * {@code line.separator}, and is not necessarily a single newline
+ * character ({@code '\n'}).
*/
public void println() {
newLine();
@@ -623,10 +623,10 @@
/**
* Prints a boolean value and then terminates the line. This method behaves
- * as though it invokes {@link #print(boolean)}
and then
- * {@link #println()}
.
+ * as though it invokes {@link #print(boolean)} and then
+ * {@link #println()}.
*
- * @param x the boolean
value to be printed
+ * @param x the {@code boolean} value to be printed
*/
public void println(boolean x) {
synchronized (lock) {
@@ -637,10 +637,10 @@
/**
* Prints a character and then terminates the line. This method behaves as
- * though it invokes {@link #print(char)}
and then {@link
- * #println()}
.
+ * though it invokes {@link #print(char)} and then {@link
+ * #println()}.
*
- * @param x the char
value to be printed
+ * @param x the {@code char} value to be printed
*/
public void println(char x) {
synchronized (lock) {
@@ -651,10 +651,10 @@
/**
* Prints an integer and then terminates the line. This method behaves as
- * though it invokes {@link #print(int)}
and then {@link
- * #println()}
.
+ * though it invokes {@link #print(int)} and then {@link
+ * #println()}.
*
- * @param x the int
value to be printed
+ * @param x the {@code int} value to be printed
*/
public void println(int x) {
synchronized (lock) {
@@ -665,10 +665,10 @@
/**
* Prints a long integer and then terminates the line. This method behaves
- * as though it invokes {@link #print(long)}
and then
- * {@link #println()}
.
+ * as though it invokes {@link #print(long)} and then
+ * {@link #println()}.
*
- * @param x the long
value to be printed
+ * @param x the {@code long} value to be printed
*/
public void println(long x) {
synchronized (lock) {
@@ -679,10 +679,10 @@
/**
* Prints a floating-point number and then terminates the line. This method
- * behaves as though it invokes {@link #print(float)}
and then
- * {@link #println()}
.
+ * behaves as though it invokes {@link #print(float)} and then
+ * {@link #println()}.
*
- * @param x the float
value to be printed
+ * @param x the {@code float} value to be printed
*/
public void println(float x) {
synchronized (lock) {
@@ -693,10 +693,10 @@
/**
* Prints a double-precision floating-point number and then terminates the
- * line. This method behaves as though it invokes {@link
- * #print(double)}
and then {@link #println()}
.
+ * line. This method behaves as though it invokes {@link
+ * #print(double)} and then {@link #println()}.
*
- * @param x the double
value to be printed
+ * @param x the {@code double} value to be printed
*/
public void println(double x) {
synchronized (lock) {
@@ -707,10 +707,10 @@
/**
* Prints an array of characters and then terminates the line. This method
- * behaves as though it invokes {@link #print(char[])}
and then
- * {@link #println()}
.
+ * behaves as though it invokes {@link #print(char[])} and then
+ * {@link #println()}.
*
- * @param x the array of char
values to be printed
+ * @param x the array of {@code char} values to be printed
*/
public void println(char x[]) {
synchronized (lock) {
@@ -721,10 +721,10 @@
/**
* Prints a String and then terminates the line. This method behaves as
- * though it invokes {@link #print(String)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(String)} and then
+ * {@link #println()}.
*
- * @param x the String
value to be printed
+ * @param x the {@code String} value to be printed
*/
public void println(String x) {
synchronized (lock) {
@@ -737,10 +737,10 @@
* Prints an Object and then terminates the line. This method calls
* at first String.valueOf(x) to get the printed object's string value,
* then behaves as
- * though it invokes {@link #print(String)}
and then
- * {@link #println()}
.
+ * though it invokes {@link #print(String)} and then
+ * {@link #println()}.
*
- * @param x The Object
to be printed.
+ * @param x The {@code Object} to be printed.
*/
public void println(Object x) {
String s = String.valueOf(x);
@@ -755,11 +755,13 @@
* the specified format string and arguments. If automatic flushing is
* enabled, calls to this method will flush the output buffer.
*
- *
- * out.format(format, args)
+ * {@code
+ * out.format(format, args)
+ * }
*
* @param format
* A format string as described in The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -786,7 +788,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This writer
*
@@ -801,15 +803,17 @@
* the specified format string and arguments. If automatic flushing is
* enabled, calls to this method will flush the output buffer.
*
- *
- * out.format(l, format, args)
+ * {@code
+ * out.format(l, format, args)
+ * }
*
* @param l
* The {@linkplain java.util.Locale locale} to apply during
- * formatting. If l is null then no localization
+ * formatting. If {@code l} is {@code null} then no localization
* is applied.
*
* @param format
@@ -824,7 +828,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -837,7 +841,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This writer
*
@@ -868,7 +872,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -881,7 +885,7 @@
* Formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This writer
*
@@ -913,7 +917,7 @@
*
* @param l
* The {@linkplain java.util.Locale locale} to apply during
- * formatting. If l is null then no localization
+ * formatting. If {@code l} is {@code null} then no localization
* is applied.
*
* @param format
@@ -928,7 +932,7 @@
* limited by the maximum dimension of a Java array as defined by
* The Java™ Virtual Machine Specification.
* The behaviour on a
- * null argument depends on the conversion.
*
* @throws java.util.IllegalFormatException
@@ -941,7 +945,7 @@
* formatter class specification.
*
* @throws NullPointerException
- * If the format is null
+ * If the {@code format} is {@code null}
*
* @return This writer
*
@@ -968,21 +972,22 @@
/**
* Appends the specified character sequence to this writer.
*
- *
- * out.write(csq.toString())
+ * {@code
+ * out.write(csq.toString())
+ * }
*
- *
- * out.write(csq.subSequence(start, end).toString())
+ * {@code
+ * out.write(csq.subSequence(start, end).toString())
+ * }
*
* @param csq
* The character sequence from which a subsequence will be
- * appended. If csq is null, then characters
- * will be appended as if csq contained the four
- * characters "null".
+ * appended. If {@code csq} is {@code null}, then characters
+ * will be appended as if {@code csq} contained the four
+ * characters {@code "null"}.
*
* @param start
* The index of the first character in the subsequence
@@ -1023,9 +1030,9 @@
* @return This writer
*
* @throws IndexOutOfBoundsException
- * If start or end are negative, start
- * is greater than end, or end is greater than
- * csq.length()
+ * If {@code start} or {@code end} are negative, {@code start}
+ * is greater than {@code end}, or {@code end} is greater than
+ * {@code csq.length()}
*
* @since 1.5
*/
@@ -1038,11 +1045,12 @@
/**
* Appends the specified character to this writer.
*
- *
- * out.write(c)
+ * {@code
+ * out.write(c)
+ * }
*
* @param c
* The 16-bit character to append
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/RandomAccessFile.java
--- a/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/RandomAccessFile.java Wed Jul 05 20:44:51 2017 +0200
@@ -82,10 +82,10 @@
* {@link FileDescriptor} object is created to represent the
* connection to the file.
*
- *
*
*
- * The "rws" and "rwd" modes work much like the {@link
+ * The {@code "rws"} and {@code "rwd"} modes work much like the {@link
* java.nio.channels.FileChannel#force(boolean) force(boolean)} method of
* the {@link java.nio.channels.FileChannel} class, passing arguments of
- * true and false, respectively, except that they always
+ * {@code true} and {@code false}, respectively, except that they always
* apply to every I/O operation and are therefore often more efficient. If
* the file resides on a local storage device then when an invocation of a
* method of this class returns it is guaranteed that all changes made to
@@ -164,9 +164,9 @@
* event of a system crash. If the file does not reside on a local device
* then no such guarantee is made.
*
- *
- * Value Meaning
- * "r"
- * Open for reading only. Invoking any of the write
- * methods of the resulting object will cause an {@link
- * java.io.IOException} to be thrown. "rw"
+ *
+ * {@code "r"}
+ * Open for reading only. Invoking any of the {@code write}
+ * methods of the resulting object will cause an
+ * {@link java.io.IOException} to be thrown.
- * {@code "rw"}
* Open for reading and writing. If the file does not already
- * exist then an attempt will be made to create it.
+ * "rws"
- * Open for reading and writing, as with "rw", and also
+ * exist then an attempt will be made to create it.
- * {@code "rws"}
+ * Open for reading and writing, as with {@code "rw"}, and also
* require that every update to the file's content or metadata be
- * written synchronously to the underlying storage device.
+ * "rwd"
- * Open for reading and writing, as with "rw", and also
+ * written synchronously to the underlying storage device.
+ * synchronously to the underlying storage device.
* {@code "rwd"}
+ * Open for reading and writing, as with {@code "rw"}, and also
* require that every update to the file's content be written
- * synchronously to the underlying storage device.
* out.write(csq.toString())
*
- *
- * out.write(csq.subSequence(start, end).toString())
+ * {@code
+ * out.write(csq.subSequence(start, end).toString())
+ * }
*
* @param csq
* The character sequence from which a subsequence will be
- * appended. If csq is null, then characters
- * will be appended as if csq contained the four
- * characters "null".
+ * appended. If {@code csq} is {@code null}, then characters
+ * will be appended as if {@code csq} contained the four
+ * characters "{@code null}".
*
* @param start
* The index of the first character in the subsequence
@@ -170,9 +172,9 @@
* @return This writer
*
* @throws IndexOutOfBoundsException
- * If start or end are negative, start
- * is greater than end, or end is greater than
- * csq.length()
+ * If {@code start} or {@code end} are negative, {@code start}
+ * is greater than {@code end}, or {@code end} is greater than
+ * {@code csq.length()}
*
* @since 1.5
*/
@@ -185,7 +187,7 @@
/**
* Appends the specified character to this writer.
*
- *
@@ -226,9 +228,9 @@
}
/**
- * Closing a StringWriter has no effect. The methods in this
+ * Closing a {@code StringWriter} has no effect. The methods in this
* class can be called after the stream has been closed without generating
- * an IOException.
+ * an {@code IOException}.
*/
public void close() throws IOException {
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/io/Writer.java
--- a/jdk/src/java.base/share/classes/java/io/Writer.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/io/Writer.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,7 +63,7 @@
* The object used to synchronize operations on this stream. For
* efficiency, a character-stream object may use an object other than
* itself to protect critical sections. A subclass should therefore use
- * the object in this field rather than this or a synchronized
+ * the object in this field rather than {@code this} or a synchronized
* method.
*/
protected Object lock;
@@ -170,8 +170,8 @@
* Number of characters to write
*
* @throws IndexOutOfBoundsException
- * If off is negative, or len is negative,
- * or off+len is negative or greater than the length
+ * If {@code off} is negative, or {@code len} is negative,
+ * or {@code off+len} is negative or greater than the length
* of the given string
*
* @throws IOException
@@ -196,21 +196,21 @@
/**
* Appends the specified character sequence to this writer.
*
- *
* out.write(csq.toString())
*
- *
- * out.write(csq.subSequence(start, end).toString())
+ * {@code
+ * out.write(csq.subSequence(start, end).toString())
+ * }
*
* @param csq
* The character sequence from which a subsequence will be
- * appended. If csq is null, then characters
- * will be appended as if csq contained the four
- * characters "null".
+ * appended. If {@code csq} is {@code null}, then characters
+ * will be appended as if {@code csq} contained the four
+ * characters "{@code null}".
*
* @param start
* The index of the first character in the subsequence
@@ -255,9 +257,9 @@
* @return This writer
*
* @throws IndexOutOfBoundsException
- * If start or end are negative, start
- * is greater than end, or end is greater than
- * csq.length()
+ * If {@code start} or {@code end} are negative, {@code start}
+ * is greater than {@code end}, or {@code end} is greater than
+ * {@code csq.length()}
*
* @throws IOException
* If an I/O error occurs
@@ -273,7 +275,7 @@
/**
* Appends the specified character to this writer.
*
- *
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Appendable.java
--- a/jdk/src/java.base/share/classes/java/lang/Appendable.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Appendable.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,15 +28,15 @@
import java.io.IOException;
/**
- * An object to which char sequences and values can be appended. The
- * Appendable interface must be implemented by any class whose
+ * An object to which {@code char} sequences and values can be appended. The
+ * {@code Appendable} interface must be implemented by any class whose
* instances are intended to receive formatted output from a {@link
* java.util.Formatter}.
*
*
@@ -83,9 +83,9 @@
*
* @param csq
* The character sequence from which a subsequence will be
- * appended. If csq is null, then characters
- * will be appended as if csq contained the four
- * characters "null".
+ * appended. If {@code csq} is {@code null}, then characters
+ * will be appended as if {@code csq} contained the four
+ * characters {@code "null"}.
*
* @param start
* The index of the first character in the subsequence
@@ -94,12 +94,12 @@
* The index of the character following the last character in the
* subsequence
*
- * @return A reference to this Appendable
+ * @return A reference to this {@code Appendable}
*
* @throws IndexOutOfBoundsException
- * If start or end are negative, start
- * is greater than end, or end is greater than
- * csq.length()
+ * If {@code start} or {@code end} are negative, {@code start}
+ * is greater than {@code end}, or {@code end} is greater than
+ * {@code csq.length()}
*
* @throws IOException
* If an I/O error occurs
@@ -107,12 +107,12 @@
Appendable append(CharSequence csq, int start, int end) throws IOException;
/**
- * Appends the specified character to this Appendable.
+ * Appends the specified character to this {@code Appendable}.
*
* @param c
* The character to append
*
- * @return A reference to this Appendable
+ * @return A reference to this {@code Appendable}
*
* @throws IOException
* If an I/O error occurs
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java
--- a/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ApplicationShutdownHooks.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
/*
* Class to track and run user level shutdown hooks registered through
- * {@link Runtime#addShutdownHook Runtime.addShutdownHook}.
+ * {@link Runtime#addShutdownHook Runtime.addShutdownHook}.
*
* @see java.lang.Runtime#addShutdownHook
* @see java.lang.Runtime#removeShutdownHook
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java
--- a/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/AssertionStatusDirectives.java Wed Jul 05 20:44:51 2017 +0200
@@ -29,8 +29,8 @@
* A collection of assertion status directives (such as "enable assertions
* in package p" or "disable assertions in class c"). This class is used by
* the JVM to communicate the assertion status directives implied by
- * the java command line flags -enableassertions
- * (-ea) and -disableassertions (-da).
+ * the {@code java} command line flags {@code -enableassertions}
+ * ({@code -ea}) and {@code -disableassertions} ({@code -da}).
*
* @since 1.4
* @author Josh Bloch
@@ -44,19 +44,19 @@
String[] classes;
/**
- * A parallel array to classes, indicating whether each class
- * is to have assertions enabled or disabled. A value of true
- * for classEnabled[i] indicates that the class named by
- * classes[i] should have assertions enabled; a value of
- * false indicates that it should have classes disabled.
- * This array must have the same number of elements as classes.
+ * A parallel array to {@code classes}, indicating whether each class
+ * is to have assertions enabled or disabled. A value of {@code true}
+ * for {@code classEnabled[i]} indicates that the class named by
+ * {@code classes[i]} should have assertions enabled; a value of
+ * {@code false} indicates that it should have classes disabled.
+ * This array must have the same number of elements as {@code classes}.
*
*
*
* @return the user-level CPU time for the current thread if CPU time
- * measurement is enabled; -1 otherwise.
+ * measurement is enabled; {@code -1} otherwise.
*
* @throws java.lang.UnsupportedOperationException if the Java
* virtual machine does not support CPU time measurement for
@@ -451,8 +451,8 @@
*
* char
values. This
+ * A {@code CharSequence} is a readable sequence of {@code char} values. This
* interface provides uniform, read-only access to many different kinds of
- * char
sequences.
- * A char
value represents a character in the Basic
+ * {@code char} sequences.
+ * A {@code char} value represents a character in the Basic
* Multilingual Plane (BMP) or a surrogate. Refer to Unicode Character Representation for details.
*
* char
s in the sequence.
+ * of 16-bit {@code char}s in the sequence.
*
- * @return the number of char
s in this sequence
+ * @return the number of {@code char}s in this sequence
*/
int length();
/**
- * Returns the char
value at the specified index. An index ranges from zero
- * to length() - 1. The first char
value of the sequence is at
+ * Returns the {@code char} value at the specified index. An index ranges from zero
+ * to {@code length() - 1}. The first {@code char} value of the sequence is at
* index zero, the next at index one, and so on, as for array
* indexing.
*
- * char
value specified by the index is a
+ * char
value to be returned
+ * @param index the index of the {@code char} value to be returned
*
- * @return the specified char
value
+ * @return the specified {@code char} value
*
* @throws IndexOutOfBoundsException
- * if the index argument is negative or not less than
- * length()
+ * if the {@code index} argument is negative or not less than
+ * {@code length()}
*/
char charAt(int index);
/**
- * Returns a CharSequence
that is a subsequence of this sequence.
- * The subsequence starts with the char
value at the specified index and
- * ends with the char
value at index end - 1. The length
- * (in char
s) of the
- * returned sequence is end - start, so if start == end
+ * Returns a {@code CharSequence} that is a subsequence of this sequence.
+ * The subsequence starts with the {@code char} value at the specified index and
+ * ends with the {@code char} value at index {@code end - 1}. The length
+ * (in {@code char}s) of the
+ * returned sequence is {@code end - start}, so if {@code start == end}
* then an empty sequence is returned.
*
* @param start the start index, inclusive
@@ -100,9 +100,9 @@
* @return the specified subsequence
*
* @throws IndexOutOfBoundsException
- * if start or end are negative,
- * if end is greater than length(),
- * or if start is greater than end
+ * if {@code start} or {@code end} are negative,
+ * if {@code end} is greater than {@code length()},
+ * or if {@code start} is greater than {@code end}
*/
CharSequence subSequence(int start, int end);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/Character.java
--- a/jdk/src/java.base/share/classes/java/lang/Character.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/Character.java Wed Jul 05 20:44:51 2017 +0200
@@ -3502,7 +3502,7 @@
/**
* Returns the UnicodeBlock with the given name. Block
* names are determined by The Unicode Standard. The file
- * Blocks-<version>.txt defines blocks for a particular
+ * {@code Blocks-CloneNotSupportedException
being thrown.
*
- * {(x, y) such that x.compareTo(y) <= 0}.
- *
The quotient for this total order is:
+ * the natural ordering on a given class C is:
*
- * It follows immediately from the contract for compareTo that the
- * quotient is an equivalence relation on C, and that the
- * natural ordering is a total order on C. When we say that a
+ * It follows immediately from the contract for {@code compareTo} that the
+ * quotient is an equivalence relation on {@code C}, and that the
+ * natural ordering is a total order on {@code C}. When we say that a
* class's natural ordering is consistent with equals, we mean that the
* quotient for the natural ordering is the equivalence relation defined by
* the class's {@link Object#equals(Object) equals(Object)} method:{@code
+ * {(x, y) such that x.compareTo(y) <= 0}.
+ * }
The quotient for this total order is: {@code
* {(x, y) such that x.compareTo(y) == 0}.
- *
+ * }
@@ -99,30 +99,31 @@
* negative integer, zero, or a positive integer as this object is less
* than, equal to, or greater than the specified object.
*
- *
*
* @return the total CPU time for the current thread if CPU time
- * measurement is enabled; -1 otherwise.
+ * measurement is enabled; {@code -1} otherwise.
*
* @throws java.lang.UnsupportedOperationException if the Java
* virtual machine does not support CPU time measurement for
@@ -428,7 +428,7 @@
*
*
* modifyThread
* Modification of threads, e.g., via calls to Thread
- * interrupt, stop, suspend,
- * resume, setDaemon, setPriority,
- * setName and setUncaughtExceptionHandler
+ * {@code interrupt, stop, suspend, resume, setDaemon, setPriority,
+ * setName} and {@code setUncaughtExceptionHandler}
* methods
* This allows an attacker to modify the behaviour of
* any thread in the system.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/SecurityException.java
--- a/jdk/src/java.base/share/classes/java/lang/SecurityException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/SecurityException.java Wed Jul 05 20:44:51 2017 +0200
@@ -36,14 +36,14 @@
private static final long serialVersionUID = 6878364983674394167L;
/**
- * Constructs a SecurityException
with no detail message.
+ * Constructs a {@code SecurityException} with no detail message.
*/
public SecurityException() {
super();
}
/**
- * Constructs a SecurityException
with the specified
+ * Constructs a {@code SecurityException} with the specified
* detail message.
*
* @param s the detail message.
@@ -53,13 +53,13 @@
}
/**
- * Creates a SecurityException
with the specified
+ * Creates a {@code SecurityException} with the specified
* detail message and cause.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A null value is permitted,
+ * {@link #getCause()} method). (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @since 1.5
*/
@@ -68,13 +68,13 @@
}
/**
- * Creates a SecurityException
with the specified cause
- * and a detail message of (cause==null ? null : cause.toString())
+ * Creates a {@code SecurityException} with the specified cause
+ * and a detail message of {@code (cause==null ? null : cause.toString())}
* (which typically contains the class and detail message of
- * cause).
+ * {@code cause}).
*
* @param cause the cause (which is saved for later retrieval by the
- * {@link #getCause()} method). (A null value is permitted,
+ * {@link #getCause()} method). (A {@code null} value is permitted,
* and indicates that the cause is nonexistent or unknown.)
* @since 1.5
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/String.java
--- a/jdk/src/java.base/share/classes/java/lang/String.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/String.java Wed Jul 05 20:44:51 2017 +0200
@@ -87,7 +87,7 @@
* string concatenation and conversion, see Gosling, Joy, and Steele,
* The Java Language Specification.
*
- *
*
*
@@ -93,16 +93,16 @@
*
*
- *
WrapperType.valueOf(v).hashCode()
, where
+ * {@code WrapperType} is the wrapper type corresponding
+ * to the primitive type of {@code v} ({@link Byte},
* {@link Character}, {@link Double}, {@link Float}, {@link Integer},
* {@link Long}, {@link Short}, or {@link Boolean}).
*
* v.hashCode()
. (In the case of annotation
* member values, this is a recursive definition.)
*
* cause
is not automatically incorporated in
+ * with {@code cause} is not automatically incorporated in
* this error's detail message.
*
* @param message the detail message
- * @param cause the cause (A null value is permitted, and
+ * @param cause the cause (A {@code null} value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public AnnotationFormatError(String message, Throwable cause) {
@@ -65,12 +65,12 @@
/**
- * Constructs a new AnnotationFormatError with the specified
+ * Constructs a new {@code AnnotationFormatError} with the specified
* cause and a detail message of
- * (cause == null ? null : cause.toString()) (which
- * typically contains the class and detail message of cause).
+ * {@code (cause == null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
*
- * @param cause the cause (A null value is permitted, and
+ * @param cause the cause (A {@code null} value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public AnnotationFormatError(Throwable cause) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java
--- a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,7 +42,7 @@
private static final long serialVersionUID = 8125925355765570191L;
/**
- * The Method object for the annotation element.
+ * The {@code Method} object for the annotation element.
*/
private final Method element;
@@ -57,7 +57,7 @@
* Constructs an AnnotationTypeMismatchException for the specified
* annotation type element and found data type.
*
- * @param element the Method object for the annotation element
+ * @param element the {@code Method} object for the annotation element
* @param foundType the (erroneous) type of data found in the annotation.
* This string may, but is not required to, contain the value
* as well. The exact format of the string is unspecified.
@@ -70,9 +70,9 @@
}
/**
- * Returns the Method object for the incorrectly typed element.
+ * Returns the {@code Method} object for the incorrectly typed element.
*
- * @return the Method object for the incorrectly typed element
+ * @return the {@code Method} object for the incorrectly typed element
*/
public Method element() {
return this.element;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java Wed Jul 05 20:44:51 2017 +0200
@@ -746,7 +746,7 @@
/**
* Compares the specified object with this type for equality.
- * That is, it returns true if and only if the specified object
+ * That is, it returns {@code true} if and only if the specified object
* is also a method type with exactly the same parameters and return type.
* @param x object to compare
* @see Object#equals(Object)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java
--- a/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/PhantomReference.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,8 +38,8 @@
* time or at some later time it will enqueue the reference.
*
* get
method of a
- * phantom reference always returns null
.
+ * a phantom reference may not be retrieved: The {@code get} method of a
+ * phantom reference always returns {@code null}.
*
* null
.
+ * {@code null}.
*
- * @return null
+ * @return {@code null}
*/
public T get() {
return null;
@@ -67,14 +67,14 @@
* Creates a new phantom reference that refers to the given object and
* is registered with the given queue.
*
- * null
+ * otherwise {@code null}
*/
public Reference extends T> poll() {
if (head == null)
@@ -116,12 +116,12 @@
* timeout
+ * @param timeout If positive, block for up to {@code timeout}
* milliseconds while waiting for a reference to be
* added to this queue. If zero, block indefinitely.
*
* @return A reference object, if one was available within the specified
- * timeout period, otherwise null
+ * timeout period, otherwise {@code null}
*
* @throws IllegalArgumentException
* If the value of the timeout argument is negative
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java
--- a/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/SoftReference.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,7 +42,7 @@
*
* OutOfMemoryError
. Otherwise no constraints are placed upon the
+ * {@code OutOfMemoryError}. Otherwise no constraints are placed upon the
* time at which a soft reference will be cleared or the order in which a set
* of such references to different objects will be cleared. Virtual machine
* implementations are, however, encouraged to bias against clearing
@@ -92,7 +92,7 @@
*
* @param referent object the new soft reference will refer to
* @param q the queue with which the reference is to be registered,
- * or null if registration is not required
+ * or {@code null} if registration is not required
*
*/
public SoftReference(T referent, ReferenceQueue super T> q) {
@@ -103,10 +103,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 null
.
+ * this method returns {@code null}.
*
* @return The object to which this reference refers, or
- * null
if this reference object has been cleared
+ * {@code null} if this reference object has been cleared
*/
public T get() {
T o = super.get();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java
--- a/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/WeakReference.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,7 +63,7 @@
*
* @param referent object the new weak reference will refer to
* @param q the queue with which the reference is to be registered,
- * or null if registration is not required
+ * or {@code null} if registration is not required
*/
public WeakReference(T referent, ReferenceQueue super T> q) {
super(referent, q);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java Wed Jul 05 20:44:51 2017 +0200
@@ -286,9 +286,9 @@
* followed by the fully-qualified name of the declaring class,
* followed by a parenthesized, comma-separated list of the
* constructor's formal parameter types. For example:
- *
+ *
*
* {@code
* public java.util.Hashtable(int,float)
- *
+ * }Type[]
", it is denoted as
+ * "Type...
".
*
* A space is used to separate access modifiers from one another
* and from the type parameters or return type. If there are no
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/lang/reflect/Method.java
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java Wed Jul 05 20:44:51 2017 +0200
@@ -387,8 +387,8 @@
*
* If this method was declared to take a variable number of
* arguments, instead of denoting the last parameter as
- * "Type[]", it is denoted as
- * "Type...".
+ * "Type[]
", it is denoted as
+ * "Type...
".
*
* A space is used to separate access modifiers from one another
* and from the type parameters or return type. If there are no
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/math/BigDecimal.java
--- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,7 +40,7 @@
* decimal point. If negative, the unscaled value of the number is
* multiplied by ten to the power of the negation of the scale. The
* value of the number represented by the {@code BigDecimal} is
- * therefore (unscaledValue × 10-scale).
+ * therefore (unscaledValue × 10-scale)
.
*
* '\u002B'
) or
+ * {@code '-'} ('\u002D'
), followed by a sequence of
* zero or more decimal digits ("the integer"), optionally
* followed by a fraction, optionally followed by an exponent.
*
@@ -721,7 +721,7 @@
* significand.
*
* '\u0065'
) or {@code 'E'} ('\u0045'
)
* followed by one or more decimal digits. The value of the
* exponent must lie between -{@link Integer#MAX_VALUE} ({@link
* Integer#MIN_VALUE}+1) and {@link Integer#MAX_VALUE}, inclusive.
@@ -834,7 +834,7 @@
* is the exact decimal representation of the {@code double}'s
* binary floating-point value. The scale of the returned
* {@code BigDecimal} is the smallest value such that
- * (10scale × val) is an integer.
+ * (10scale × val)
is an integer.
*
@@ -857,7 +857,7 @@
* creates a {@code BigDecimal} which is exactly equal to
* 0.1, as one would expect. Therefore, it is generally
* recommended that the {@linkplain #BigDecimal(String)
- * String constructor} be used in preference to this one.
+ * String constructor} be used in preference to this one.
*
*
(10scale × val)
is an integer.
*
* (unscaledVal × 10-scale)
.
*
* @param unscaledVal unscaled value of the {@code BigDecimal}.
* @param scale scale of the {@code BigDecimal}.
@@ -1026,8 +1026,8 @@
* Translates a {@code BigInteger} unscaled value and an
* {@code int} scale into a {@code BigDecimal}, with rounding
* according to the context settings. The value of the
- * {@code BigDecimal} is (unscaledVal ×
- * 10-scale), rounded according to the
+ * {@code BigDecimal} is (unscaledVal ×
+ * 10-scale)
, rounded according to the
* {@code precision} and rounding mode settings.
*
* @param unscaledVal unscaled value of the {@code BigDecimal}.
@@ -1196,7 +1196,7 @@
* @param unscaledVal unscaled value of the {@code BigDecimal}.
* @param scale scale of the {@code BigDecimal}.
* @return a {@code BigDecimal} whose value is
- * (unscaledVal × 10-scale).
+ * (unscaledVal × 10-scale)
.
*/
public static BigDecimal valueOf(long unscaledVal, int scale) {
if (scale == 0)
@@ -1476,8 +1476,8 @@
}
/**
- * Returns a {@code BigDecimal} whose value is (this ×
- * multiplicand), and whose scale is {@code (this.scale() +
+ * Returns a {@code BigDecimal} whose value is (this ×
+ * multiplicand)
, and whose scale is {@code (this.scale() +
* multiplicand.scale())}.
*
* @param multiplicand value to be multiplied by this {@code BigDecimal}.
@@ -1501,8 +1501,8 @@
}
/**
- * Returns a {@code BigDecimal} whose value is (this ×
- * multiplicand), with rounding according to the context settings.
+ * Returns a {@code BigDecimal} whose value is (this ×
+ * multiplicand)
, with rounding according to the context settings.
*
* @param multiplicand value to be multiplied by this {@code BigDecimal}.
* @param mc the context to use.
@@ -1995,7 +1995,7 @@
/**
* Returns a {@code BigDecimal} whose value is
- * (thisn), The power is computed exactly, to
+ * (thisn)
, The power is computed exactly, to
* unlimited precision.
*
* thisn
* @throws ArithmeticException if {@code n} is out of range.
* @since 1.5
*/
@@ -2022,7 +2022,7 @@
/**
* Returns a {@code BigDecimal} whose value is
- * (thisn). The current implementation uses
+ * (thisn)
. The current implementation uses
* the core algorithm defined in ANSI standard X3.274-1996 with
* rounding according to the context settings. In general, the
* returned numerical value is within two ulps of the exact
@@ -2063,7 +2063,7 @@
*
* @param n power to raise this {@code BigDecimal} to.
* @param mc the context to use.
- * @return thisn using the ANSI standard X3.274-1996
+ * @return thisn
using the ANSI standard X3.274-1996
* algorithm
* @throws ArithmeticException if the result is inexact but the
* rounding mode is {@code UNNECESSARY}, or {@code n} is out
@@ -2251,8 +2251,8 @@
/**
* Returns a {@code BigInteger} whose value is the unscaled
- * value of this {@code BigDecimal}. (Computes (this *
- * 10this.scale()).)
+ * value of this {@code BigDecimal}. (Computes (this *
+ * 10this.scale())
.)
*
* @return the unscaled value of this {@code BigDecimal}.
* @since 1.2
@@ -2371,7 +2371,7 @@
* setX
mutate field {@code X}.
* Instead, {@code setScale} returns an object with the proper
* scale; the returned object may or may not be newly allocated.
*
@@ -2404,7 +2404,7 @@
* setX
mutate field {@code X}.
* Instead, {@code setScale} returns an object with the proper
* scale; the returned object may or may not be newly allocated.
*
@@ -2498,7 +2498,7 @@
* setX
mutate field
* {@code X}. Instead, {@code setScale} returns an
* object with the proper scale; the returned object may or may
* not be newly allocated.
@@ -2525,8 +2525,8 @@
* {@code n} is non-negative, the call merely adds {@code n} to
* the scale. If {@code n} is negative, the call is equivalent
* to {@code movePointRight(-n)}. The {@code BigDecimal}
- * returned by this call has value (this ×
- * 10-n) and scale {@code max(this.scale()+n,
+ * returned by this call has value (this ×
+ * 10-n)
and scale {@code max(this.scale()+n,
* 0)}.
*
* @param n number of places to move the decimal point to the left.
@@ -2547,8 +2547,8 @@
* If {@code n} is non-negative, the call merely subtracts
* {@code n} from the scale. If {@code n} is negative, the call
* is equivalent to {@code movePointLeft(-n)}. The
- * {@code BigDecimal} returned by this call has value (this
- * × 10n) and scale {@code max(this.scale()-n,
+ * {@code BigDecimal} returned by this call has value (this
+ * × 10n)
and scale {@code max(this.scale()-n,
* 0)}.
*
* @param n number of places to move the decimal point to the right.
@@ -2825,12 +2825,12 @@
* adjusted exponent converted to a character form. The latter is
* in base ten, using the characters {@code '0'} through
* {@code '9'} with no leading zeros, and is always prefixed by a
- * sign character {@code '-'} ('\u002D') if the
+ * sign character {@code '-'} ('\u002D'
) if the
* adjusted exponent is negative, {@code '+'}
- * ('\u002B') otherwise).
+ * ('\u002B'
) otherwise).
*
* '\u002D'
) if the unscaled
* value is less than zero. No sign character is prefixed if the
* unscaled value is zero or positive.
*
@@ -2930,7 +2930,7 @@
* in the result.
*
* The entire string is prefixed by a minus sign character '-'
- * ('\u002D') if the unscaled value is less than
+ * ('\u002D'
) if the unscaled value is less than
* zero. No sign character is prefixed if the unscaled value is
* zero or positive.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/math/BigInteger.java
--- a/jdk/src/java.base/share/classes/java/math/BigInteger.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java Wed Jul 05 20:44:51 2017 +0200
@@ -2289,11 +2289,11 @@
}
/**
- * Returns a BigInteger whose value is (thisexponent).
+ * Returns a BigInteger whose value is (thisexponent)
.
* Note that {@code exponent} is an integer rather than a BigInteger.
*
* @param exponent exponent to which this BigInteger is to be raised.
- * @return thisexponent
+ * @return thisexponent
* @throws ArithmeticException {@code exponent} is negative. (This would
* cause the operation to yield a non-integer value.)
*/
@@ -2552,12 +2552,12 @@
/**
* Returns a BigInteger whose value is
- * (thisexponent mod m). (Unlike {@code pow}, this
+ * (thisexponent mod m)
. (Unlike {@code pow}, this
* method permits negative exponents.)
*
* @param exponent the exponent.
* @param m the modulus.
- * @return thisexponent mod m
+ * @return thisexponent mod m
* @throws ArithmeticException {@code m} ≤ 0 or the exponent is
* negative and this BigInteger is not relatively
* prime to {@code m}.
@@ -3152,7 +3152,7 @@
* Returns a BigInteger whose value is {@code (this << n)}.
* The shift distance, {@code n}, may be negative, in which case
* this method performs a right shift.
- * (Computes floor(this * 2n).)
+ * (Computes floor(this * 2n)
.)
*
* @param n shift distance, in bits.
* @return {@code this << n}
@@ -3175,7 +3175,7 @@
/**
* Returns a magnitude array whose value is {@code (mag << n)}.
* The shift distance, {@code n}, is considered unnsigned.
- * (Computes this * 2n.)
+ * (Computes this * 2n
.)
*
* @param mag magnitude, the most-significant int ({@code mag[0]}) must be non-zero.
* @param n unsigned shift distance, in bits.
@@ -3212,7 +3212,7 @@
* Returns a BigInteger whose value is {@code (this >> n)}. Sign
* extension is performed. The shift distance, {@code n}, may be
* negative, in which case this method performs a left shift.
- * (Computes floor(this / 2n).)
+ * (Computes floor(this / 2n)
.)
*
* @param n shift distance, in bits.
* @return {@code this >> n}
@@ -3235,7 +3235,7 @@
/**
* Returns a BigInteger whose value is {@code (this >> n)}. The shift
* distance, {@code n}, is considered unsigned.
- * (Computes floor(this * 2-n).)
+ * (Computes floor(this * 2-n)
.)
*
* @param n unsigned shift distance, in bits.
* @return {@code this >> n}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/math/MathContext.java
--- a/jdk/src/java.base/share/classes/java/math/MathContext.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/math/MathContext.java Wed Jul 05 20:44:51 2017 +0200
@@ -268,7 +268,7 @@
* Returns the string representation of this {@code MathContext}.
* The {@code String} returned represents the settings of the
* {@code MathContext} object as two space-delimited words
- * (separated by a single space character, '\u0020',
+ * (separated by a single space character, '\u0020'
,
* and with no leading or trailing white space), as follows:
*
*
* {@code 'n'}
* the platform-specific line separator as returned by {@link
- * System#getProperty System.getProperty("line.separator")}.
+ * System#lineSeparator()}.
*
*
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/jar/Attributes.java
--- a/jdk/src/java.base/share/classes/java/util/jar/Attributes.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/Attributes.java Wed Jul 05 20:44:51 2017 +0200
@@ -526,7 +526,7 @@
}
/**
- * Name
object for Manifest-Version
+ * {@code Name} object for {@code Manifest-Version}
* manifest attribute. This attribute indicates the version number
* of the manifest standard to which a JAR file's manifest conforms.
* @see
@@ -535,7 +535,7 @@
public static final Name MANIFEST_VERSION = new Name("Manifest-Version");
/**
- * Name
object for Signature-Version
+ * {@code Name} object for {@code Signature-Version}
* manifest attribute used when signing JAR files.
* @see
* Manifest and Signature Specification
@@ -543,13 +543,13 @@
public static final Name SIGNATURE_VERSION = new Name("Signature-Version");
/**
- * Name
object for Content-Type
+ * {@code Name} object for {@code Content-Type}
* manifest attribute.
*/
public static final Name CONTENT_TYPE = new Name("Content-Type");
/**
- * Name
object for Class-Path
+ * {@code Name} object for {@code Class-Path}
* manifest attribute.
* @see
* JAR file specification
@@ -557,16 +557,16 @@
public static final Name CLASS_PATH = new Name("Class-Path");
/**
- * Name
object for Main-Class
manifest
+ * {@code Name} object for {@code Main-Class} manifest
* attribute used for launching applications packaged in JAR files.
- * The Main-Class
attribute is used in conjunction
- * with the -jar
command-line option of the
- * java application launcher.
+ * The {@code Main-Class} attribute is used in conjunction
+ * with the {@code -jar} command-line option of the
+ * {@code java} application launcher.
*/
public static final Name MAIN_CLASS = new Name("Main-Class");
/**
- * Name
object for Sealed
manifest attribute
+ * {@code Name} object for {@code Sealed} manifest attribute
* used for sealing.
* @see
* Package Sealing
@@ -574,19 +574,19 @@
public static final Name SEALED = new Name("Sealed");
/**
- * Name
object for Extension-List
manifest attribute
+ * {@code Name} object for {@code Extension-List} manifest attribute
* used for the extension mechanism that is no longer supported.
*/
public static final Name EXTENSION_LIST = new Name("Extension-List");
/**
- * Name
object for Extension-Name
manifest attribute.
+ * {@code Name} object for {@code Extension-Name} manifest attribute.
* used for the extension mechanism that is no longer supported.
*/
public static final Name EXTENSION_NAME = new Name("Extension-Name");
/**
- * Name
object for Extension-Installation
manifest attribute.
+ * {@code Name} object for {@code Extension-Installation} manifest attribute.
*
* @deprecated Extension mechanism is no longer supported.
*/
@@ -594,25 +594,25 @@
public static final Name EXTENSION_INSTALLATION = new Name("Extension-Installation");
/**
- * Name
object for Implementation-Title
+ * {@code Name} object for {@code Implementation-Title}
* manifest attribute used for package versioning.
*/
public static final Name IMPLEMENTATION_TITLE = new Name("Implementation-Title");
/**
- * Name
object for Implementation-Version
+ * {@code Name} object for {@code Implementation-Version}
* manifest attribute used for package versioning.
*/
public static final Name IMPLEMENTATION_VERSION = new Name("Implementation-Version");
/**
- * Name
object for Implementation-Vendor
+ * {@code Name} object for {@code Implementation-Vendor}
* manifest attribute used for package versioning.
*/
public static final Name IMPLEMENTATION_VENDOR = new Name("Implementation-Vendor");
/**
- * Name
object for Implementation-Vendor-Id
+ * {@code Name} object for {@code Implementation-Vendor-Id}
* manifest attribute.
*
* @deprecated Extension mechanism is no longer supported.
@@ -621,7 +621,7 @@
public static final Name IMPLEMENTATION_VENDOR_ID = new Name("Implementation-Vendor-Id");
/**
- * Name
object for Implementation-URL
+ * {@code Name} object for {@code Implementation-URL}
* manifest attribute.
*
* @deprecated Extension mechanism is no longer supported.
@@ -630,19 +630,19 @@
public static final Name IMPLEMENTATION_URL = new Name("Implementation-URL");
/**
- * Name
object for Specification-Title
+ * {@code Name} object for {@code Specification-Title}
* manifest attribute used for package versioning.
*/
public static final Name SPECIFICATION_TITLE = new Name("Specification-Title");
/**
- * Name
object for Specification-Version
+ * {@code Name} object for {@code Specification-Version}
* manifest attribute used for package versioning.
*/
public static final Name SPECIFICATION_VERSION = new Name("Specification-Version");
/**
- * Name
object for Specification-Vendor
+ * {@code Name} object for {@code Specification-Vendor}
* manifest attribute used for package versioning.
*/
public static final Name SPECIFICATION_VENDOR = new Name("Specification-Vendor");
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/jar/JarFile.java
--- a/jdk/src/java.base/share/classes/java/util/jar/JarFile.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarFile.java Wed Jul 05 20:44:51 2017 +0200
@@ -43,14 +43,14 @@
import sun.security.util.SignatureFileVerifier;
/**
- * The JarFile
class is used to read the contents of a jar file
- * from any file that can be opened with java.io.RandomAccessFile
.
- * It extends the class java.util.zip.ZipFile
with support
- * for reading an optional Manifest
entry. The
- * Manifest
can be used to specify meta-information about the
+ * The {@code JarFile} class is used to read the contents of a jar file
+ * from any file that can be opened with {@code java.io.RandomAccessFile}.
+ * It extends the class {@code java.util.zip.ZipFile} with support
+ * for reading an optional {@code Manifest} entry. The
+ * {@code Manifest} can be used to specify meta-information about the
* jar file and its entries.
*
- * JarFile
to read from the specified
- * file name
. The JarFile
will be verified if
+ * Creates a new {@code JarFile} to read from the specified
+ * file {@code name}. The {@code JarFile} will be verified if
* it is signed.
* @param name the name of the jar file to be opened for reading
* @throws IOException if an I/O error has occurred
@@ -104,8 +104,8 @@
}
/**
- * Creates a new JarFile
to read from the specified
- * file name
.
+ * Creates a new {@code JarFile} to read from the specified
+ * file {@code name}.
* @param name the name of the jar file to be opened for reading
* @param verify whether or not to verify the jar file if
* it is signed.
@@ -118,8 +118,8 @@
}
/**
- * Creates a new JarFile
to read from the specified
- * File
object. The JarFile
will be verified if
+ * Creates a new {@code JarFile} to read from the specified
+ * {@code File} object. The {@code JarFile} will be verified if
* it is signed.
* @param file the jar file to be opened for reading
* @throws IOException if an I/O error has occurred
@@ -132,8 +132,8 @@
/**
- * Creates a new JarFile
to read from the specified
- * File
object.
+ * Creates a new {@code JarFile} to read from the specified
+ * {@code File} object.
* @param file the jar file to be opened for reading
* @param verify whether or not to verify the jar file if
* it is signed.
@@ -147,9 +147,9 @@
/**
- * Creates a new JarFile
to read from the specified
- * File
object in the specified mode. The mode argument
- * must be either OPEN_READ or OPEN_READ | OPEN_DELETE.
+ * Creates a new {@code JarFile} to read from the specified
+ * {@code File} object in the specified mode. The mode argument
+ * must be either {@code OPEN_READ} or {@code OPEN_READ | OPEN_DELETE}.
*
* @param file the jar file to be opened for reading
* @param verify whether or not to verify the jar file if
@@ -157,7 +157,7 @@
* @param mode the mode in which the file is to be opened
* @throws IOException if an I/O error has occurred
* @throws IllegalArgumentException
- * if the mode argument is invalid
+ * if the {@code mode} argument is invalid
* @throws SecurityException if access to the file is denied
* by the SecurityManager
* @since 1.3
@@ -168,9 +168,9 @@
}
/**
- * Returns the jar file manifest, or null
if none.
+ * Returns the jar file manifest, or {@code null} if none.
*
- * @return the jar file manifest, or null
if none
+ * @return the jar file manifest, or {@code null} if none
*
* @throws IllegalStateException
* may be thrown if the jar file has been closed
@@ -207,12 +207,12 @@
private native String[] getMetaInfEntryNames();
/**
- * Returns the JarEntry
for the given entry name or
- * null
if not found.
+ * Returns the {@code JarEntry} for the given entry name or
+ * {@code null} if not found.
*
* @param name the jar file entry name
- * @return the JarEntry
for the given entry name or
- * null
if not found.
+ * @return the {@code JarEntry} for the given entry name or
+ * {@code null} if not found.
*
* @throws IllegalStateException
* may be thrown if the jar file has been closed
@@ -224,12 +224,12 @@
}
/**
- * Returns the ZipEntry
for the given entry name or
- * null
if not found.
+ * Returns the {@code ZipEntry} for the given entry name or
+ * {@code null} if not found.
*
* @param name the jar file entry name
- * @return the ZipEntry
for the given entry name or
- * null
if not found
+ * @return the {@code ZipEntry} for the given entry name or
+ * {@code null} if not found
*
* @throws IllegalStateException
* may be thrown if the jar file has been closed
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/jar/Pack200.java
--- a/jdk/src/java.base/share/classes/java/util/jar/Pack200.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/jar/Pack200.java Wed Jul 05 20:44:51 2017 +0200
@@ -95,7 +95,7 @@
* the file encoded with Pack200 and further compressed with gzip. Please
* refer to the Java Deployment Guide for techniques and details.
*
- *
- *
IOException
.
+ * as a whole will fail, with an exception of type {@code IOException}.
* The string
* {@link #STRIP} means that the attribute will be dropped.
* The string
@@ -391,7 +391,7 @@
* using the layout language specified in the JSR 200 specification.
* pack.class.attribute.SourceFile=RUH
.
+ * {@code pack.class.attribute.SourceFile=RUH}.
*
+ * }
*
+ *
{@code
* Map p = packer.properties();
* p.put(CODE_ATTRIBUTE_PFX+"CoverageTable", "NH[PHHII]");
* p.put(CODE_ATTRIBUTE_PFX+"CharacterRangeTable", "NH[PHPOHIIH]");
* p.put(CLASS_ATTRIBUTE_PFX+"SourceID", "RUH");
* p.put(CLASS_ATTRIBUTE_PFX+"CompilationID", "RUH");
- *
+ * }
*/
String CLASS_ATTRIBUTE_PFX = "pack.class.attribute.";
@@ -421,7 +421,7 @@
* When concatenated with a field attribute name,
* indicates the format of that attribute.
* For example, the effect of this option is built in:
- *
+ *
{@code
* Map p = packer.properties();
* p.put(CODE_ATTRIBUTE_PFX+"LineNumberTable", STRIP);
* p.put(CODE_ATTRIBUTE_PFX+"LocalVariableTable", STRIP);
* p.put(CLASS_ATTRIBUTE_PFX+"SourceFile", STRIP);
- *
pack.field.attribute.Deprecated=
.
+ * {@code pack.field.attribute.Deprecated=}.
* The special strings {@link #ERROR}, {@link #STRIP}, and
* {@link #PASS} are also allowed.
* @see #CLASS_ATTRIBUTE_PFX
@@ -432,7 +432,7 @@
* When concatenated with a method attribute name,
* indicates the format of that attribute.
* For example, the effect of this option is built in:
- * pack.method.attribute.Exceptions=NH[RCH]
.
+ * {@code pack.method.attribute.Exceptions=NH[RCH]}.
* The special strings {@link #ERROR}, {@link #STRIP}, and {@link #PASS}
* are also allowed.
* @see #CLASS_ATTRIBUTE_PFX
@@ -443,7 +443,7 @@
* When concatenated with a code attribute name,
* indicates the format of that attribute.
* For example, the effect of this option is built in:
- * pack.code.attribute.LocalVariableTable=NH[PHOHRUHRSHH]
.
+ * {@code pack.code.attribute.LocalVariableTable=NH[PHOHRUHRSHH]}.
* The special strings {@link #ERROR}, {@link #STRIP}, and {@link #PASS}
* are also allowed.
* @see #CLASS_ATTRIBUTE_PFX
@@ -527,9 +527,9 @@
* Pattern
are the valid script names
* accepted and defined by
@@ -1299,18 +1299,22 @@
if (slashEIndex == -1)
return "\\Q" + s + "\\E";
- StringBuilder sb = new StringBuilder(s.length() * 2);
+ int lenHint = s.length();
+ lenHint = (lenHint < Integer.MAX_VALUE - 8 - lenHint) ?
+ (lenHint << 1) : (Integer.MAX_VALUE - 8);
+
+ StringBuilder sb = new StringBuilder(lenHint);
sb.append("\\Q");
- slashEIndex = 0;
int current = 0;
- while ((slashEIndex = s.indexOf("\\E", current)) != -1) {
- sb.append(s.substring(current, slashEIndex));
+ do {
+ sb.append(s, current, slashEIndex)
+ .append("\\E\\\\E\\Q");
current = slashEIndex + 2;
- sb.append("\\E\\\\E\\Q");
- }
- sb.append(s.substring(current, s.length()));
- sb.append("\\E");
- return sb.toString();
+ } while ((slashEIndex = s.indexOf("\\E", current)) != -1);
+
+ return sb.append(s, current, s.length())
+ .append("\\E")
+ .toString();
}
/**
@@ -1367,14 +1371,16 @@
}
/**
- * The pattern is converted to normalizedD form and then a pure group
- * is constructed to match canonical equivalences of the characters.
+ * The pattern is converted to normalized form ({@linkplain
+ * java.text.Normalizer.Form.NFD NFD}, canonical decomposition)
+ * and then a pure group is constructed to match canonical
+ * equivalences of the characters.
*/
private void normalize() {
boolean inCharClass = false;
int lastCodePoint = -1;
- // Convert pattern into normalizedD form
+ // Convert pattern into normalized form
normalizedPattern = Normalizer.normalize(pattern, Normalizer.Form.NFD);
patternLength = normalizedPattern.length();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/stream/Collector.java
--- a/jdk/src/java.base/share/classes/java/util/stream/Collector.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/stream/Collector.java Wed Jul 05 20:44:51 2017 +0200
@@ -223,7 +223,7 @@
* Perform the final transformation from the intermediate accumulation type
* {@code A} to the final result type {@code R}.
*
- * Parallelism
+ * Parallelism
*
* Side-effects
+ * Side-effects
*
* Side-effects in behavioral parameters to stream operations are, in general,
* discouraged, as they can often lead to unwitting violations of the
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/zip/Deflater.java
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,8 +34,8 @@
* package description.
*
*
* try {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/zip/Inflater.java
--- a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,8 +34,8 @@
* package description.
*
*
* try {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/java/util/zip/ZipFile.java
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java Wed Jul 05 20:44:51 2017 +0200
@@ -50,7 +50,7 @@
/**
* This class is used to read entries from a zip file.
*
- *
checkRead
- * method is called with the name
argument as its argument
+ * checkRead
method doesn't allow read access to the file.
+ * {@code checkRead} method doesn't allow read access to the file.
*
* @see SecurityManager#checkRead(java.lang.String)
*/
@@ -121,12 +121,12 @@
}
/**
- * Opens a new ZipFile
to read from the specified
- * File
object in the specified mode. The mode argument
- * must be either OPEN_READ or OPEN_READ | OPEN_DELETE.
+ * Opens a new {@code ZipFile} to read from the specified
+ * {@code File} object in the specified mode. The mode argument
+ * must be either {@code OPEN_READ} or {@code OPEN_READ | OPEN_DELETE}.
*
- * checkRead
- * method is called with the name
argument as its argument to
+ * checkRead
method
+ * its {@code checkRead} method
* doesn't allow read access to the file,
- * or its checkDelete
method doesn't allow deleting
- * the file when the OPEN_DELETE flag is set.
- * @throws IllegalArgumentException if the mode argument is invalid
+ * or its {@code checkDelete} method doesn't allow deleting
+ * the file when the {@code OPEN_DELETE} flag is set.
+ * @throws IllegalArgumentException if the {@code mode} argument is invalid
* @see SecurityManager#checkRead(java.lang.String)
* @since 1.3
*/
@@ -166,12 +166,12 @@
private ZipCoder zc;
/**
- * Opens a new ZipFile
to read from the specified
- * File
object in the specified mode. The mode argument
- * must be either OPEN_READ or OPEN_READ | OPEN_DELETE.
+ * Opens a new {@code ZipFile} to read from the specified
+ * {@code File} object in the specified mode. The mode argument
+ * must be either {@code OPEN_READ} or {@code OPEN_READ | OPEN_DELETE}.
*
- * checkRead
- * method is called with the name
argument as its argument to
+ * checkRead
+ * if a security manager exists and its {@code checkRead}
* method doesn't allow read access to the file,or its
- * checkDelete
method doesn't allow deleting the
- * file when the OPEN_DELETE flag is set
+ * {@code checkDelete} method doesn't allow deleting the
+ * file when the {@code OPEN_DELETE} flag is set
*
- * @throws IllegalArgumentException if the mode argument is invalid
+ * @throws IllegalArgumentException if the {@code mode} argument is invalid
*
* @see SecurityManager#checkRead(java.lang.String)
*
@@ -227,8 +227,8 @@
/**
* Opens a zip file for reading.
*
- * checkRead
- * method is called with the name
argument as its argument
+ * checkRead
+ * if a security manager exists and its {@code checkRead}
* method doesn't allow read access to the file
*
* @see SecurityManager#checkRead(java.lang.String)
@@ -654,8 +654,8 @@
*
* close
- * method as soon they have finished accessing this ZipFile
.
+ * it is strongly recommended that applications invoke the {@code close}
+ * method as soon they have finished accessing this {@code ZipFile}.
* This will prevent holding up system resources for an undetermined
* length of time.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java
--- a/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java Wed Jul 05 20:44:51 2017 +0200
@@ -115,4 +115,45 @@
public List
@@ -118,7 +119,8 @@
DerOutputStream extOut = new DerOutputStream();
for (Extension ext : extensions) {
ext.encode(extOut);
- if (ext.getId().equals(OCSP.NONCE_EXTENSION_OID.toString())) {
+ if (ext.getId().equals(
+ PKIXExtensions.OCSPNonce_Id.toString())) {
nonce = ext.getValue();
}
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java Wed Jul 05 20:44:51 2017 +0200
@@ -41,6 +41,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import javax.security.auth.x500.X500Principal;
import sun.misc.HexDumpEncoder;
@@ -129,7 +130,7 @@
SIG_REQUIRED, // Must sign the request
UNAUTHORIZED // Request unauthorized
};
- private static ResponseStatus[] rsvalues = ResponseStatus.values();
+ private static final ResponseStatus[] rsvalues = ResponseStatus.values();
private static final Debug debug = Debug.getInstance("certpath");
private static final boolean dump = debug != null && Debug.isOn("ocsp");
@@ -173,7 +174,7 @@
}
// an array of all of the CRLReasons (used in SingleResponse)
- private static CRLReason[] values = CRLReason.values();
+ private static final CRLReason[] values = CRLReason.values();
private final ResponseStatus responseStatus;
private final Map
+ * ResponderID ::= CHOICE {
+ * byName [1] Name,
+ * byKey [2] KeyHash }
+ *
+ * KeyHash ::= OCTET STRING -- SHA-1 hash of responder's public key
+ * (excluding the tag and length fields)
+ *
+ * Name is defined in RFC 5280.
+ *
+ *
+ * @see ResponderId.Type
+ * @since 1.9
+ */
+public final class ResponderId {
+
+ /**
+ * A {@code ResponderId} enumeration describing the accepted forms for a
+ * {@code ResponderId}.
+ *
+ * @see ResponderId
+ * @since 1.9
+ */
+ public static enum Type {
+ /**
+ * A BY_NAME {@code ResponderId} will be built from a subject name,
+ * either as an {@code X500Principal} or a DER-encoded byte array.
+ */
+ BY_NAME(1, "byName"),
+
+ /**
+ * A BY_KEY {@code ResponderId} will be built from a public key
+ * identifier, either derived from a {@code PublicKey} or directly
+ * from a DER-encoded byte array containing the key identifier.
+ */
+ BY_KEY(2, "byKey");
+
+ private final int tagNumber;
+ private final String ridTypeName;
+
+ private Type(int value, String name) {
+ this.tagNumber = value;
+ this.ridTypeName = name;
+ }
+
+ public int value() {
+ return tagNumber;
+ }
+
+ @Override
+ public String toString() {
+ return ridTypeName;
+ }
+ }
+
+ private Type type;
+ private X500Principal responderName;
+ private KeyIdentifier responderKeyId;
+ private byte[] encodedRid;
+
+ /**
+ * Constructs a {@code ResponderId} object using an {@code X500Principal}.
+ * When encoded in DER this object will use the BY_NAME option.
+ *
+ * @param subjectName the subject name of the certificate used
+ * to sign OCSP responses.
+ *
+ * @throws IOException if the internal DER-encoding of the
+ * {@code X500Principal} fails.
+ */
+ public ResponderId(X500Principal subjectName) throws IOException {
+ responderName = subjectName;
+ responderKeyId = null;
+ encodedRid = principalToBytes();
+ type = Type.BY_NAME;
+ }
+
+ /**
+ * Constructs a {@code ResponderId} object using a {@code PublicKey}.
+ * When encoded in DER this object will use the byKey option, a
+ * SHA-1 hash of the responder's public key.
+ *
+ * @param pubKey the the OCSP responder's public key
+ *
+ * @throws IOException if the internal DER-encoding of the
+ * {@code KeyIdentifier} fails.
+ */
+ public ResponderId(PublicKey pubKey) throws IOException {
+ responderKeyId = new KeyIdentifier(pubKey);
+ responderName = null;
+ encodedRid = keyIdToBytes();
+ type = Type.BY_KEY;
+ }
+
+ /**
+ * Constructs a {@code ResponderId} object from its DER-encoding.
+ *
+ * @param encodedData the DER-encoded bytes
+ *
+ * @throws IOException if the encodedData is not properly DER encoded
+ */
+ public ResponderId(byte[] encodedData) throws IOException {
+ DerValue outer = new DerValue(encodedData);
+
+ if (outer.isContextSpecific((byte)Type.BY_NAME.value())
+ && outer.isConstructed()) {
+ // Use the X500Principal constructor as a way to sanity
+ // check the incoming data.
+ responderName = new X500Principal(outer.getDataBytes());
+ encodedRid = principalToBytes();
+ type = Type.BY_NAME;
+ } else if (outer.isContextSpecific((byte)Type.BY_KEY.value())
+ && outer.isConstructed()) {
+ // Use the KeyIdentifier constructor as a way to sanity
+ // check the incoming data.
+ responderKeyId =
+ new KeyIdentifier(new DerValue(outer.getDataBytes()));
+ encodedRid = keyIdToBytes();
+ type = Type.BY_KEY;
+ } else {
+ throw new IOException("Invalid ResponderId content");
+ }
+ }
+
+ /**
+ * Encode a {@code ResponderId} in DER form
+ *
+ * @return a byte array containing the DER-encoded representation for this
+ * {@code ResponderId}
+ */
+ public byte[] getEncoded() {
+ return encodedRid.clone();
+ }
+
+ /**
+ * Return the type of {@ResponderId}
+ *
+ * @return a number corresponding to the context-specific tag number
+ * used in the DER-encoding for a {@code ResponderId}
+ */
+ public ResponderId.Type getType() {
+ return type;
+ }
+
+ /**
+ * Get the length of the encoded {@code ResponderId} (including the tag and
+ * length of the explicit tagging from the outer ASN.1 CHOICE).
+ *
+ * @return the length of the encoded {@code ResponderId}
+ */
+ public int length() {
+ return encodedRid.length;
+ }
+
+ /**
+ * Obtain the underlying {@code X500Principal} from a {@code ResponderId}
+ *
+ * @return the {@code X500Principal} for this {@code ResponderId} if it
+ * is a BY_NAME variant. If the {@code ResponderId} is a BY_KEY
+ * variant, this routine will return {@code null}.
+ */
+ public X500Principal getResponderName() {
+ return responderName;
+ }
+
+ /**
+ * Obtain the underlying key identifier from a {@code ResponderId}
+ *
+ * @return the {@code KeyIdentifier} for this {@code ResponderId} if it
+ * is a BY_KEY variant. If the {@code ResponderId} is a BY_NAME
+ * variant, this routine will return {@code null}.
+ */
+ public KeyIdentifier getKeyIdentifier() {
+ return responderKeyId;
+ }
+
+ /**
+ * Compares the specified object with this {@code ResponderId} for equality.
+ * A ResponderId will only be considered equivalent if both the type and
+ * data value are equal. Two ResponderIds initialized by name and
+ * key ID, respectively, will not be equal even if the
+ * ResponderId objects are created from the same source certificate.
+ *
+ * @param obj the object to be compared against
+ *
+ * @return true if the specified object is equal to this {@code Responderid}
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ if (this == obj) {
+ return true;
+ }
+
+ if (obj instanceof ResponderId) {
+ ResponderId respObj = (ResponderId)obj;
+ return Arrays.equals(encodedRid, respObj.getEncoded());
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the hash code value for this {@code ResponderId}
+ *
+ * @return the hash code value for this {@code ResponderId}
+ */
+ @Override
+ public int hashCode() {
+ return Arrays.hashCode(encodedRid);
+ }
+
+ /**
+ * Create a String representation of this {@code ResponderId}
+ *
+ * @return a String representation of this {@code ResponderId}
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ switch (type) {
+ case BY_NAME:
+ sb.append(type).append(": ").append(responderName);
+ break;
+ case BY_KEY:
+ sb.append(type).append(": ");
+ for (byte keyIdByte : responderKeyId.getIdentifier()) {
+ sb.append(String.format("%02X", keyIdByte));
+ }
+ break;
+ default:
+ sb.append("Unknown ResponderId Type: ").append(type);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Convert the responderName data member into its DER-encoded form
+ *
+ * @return the DER encoding for a responder ID byName option, including
+ * explicit context-specific tagging.
+ *
+ * @throws IOException if any encoding error occurs
+ */
+ private byte[] principalToBytes() throws IOException {
+ DerValue dv = new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT,
+ true, (byte)Type.BY_NAME.value()),
+ responderName.getEncoded());
+ return dv.toByteArray();
+ }
+
+ /**
+ * Convert the responderKeyId data member into its DER-encoded form
+ *
+ * @return the DER encoding for a responder ID byKey option, including
+ * explicit context-specific tagging.
+ *
+ * @throws IOException if any encoding error occurs
+ */
+ private byte[] keyIdToBytes() throws IOException {
+ // Place the KeyIdentifier bytes into an OCTET STRING
+ DerValue inner = new DerValue(DerValue.tag_OctetString,
+ responderKeyId.getIdentifier());
+
+ // Mark the OCTET STRING-wrapped KeyIdentifier bytes
+ // as EXPLICIT CONTEXT 2
+ DerValue outer = new DerValue(DerValue.createTag(DerValue.TAG_CONTEXT,
+ true, (byte)Type.BY_KEY.value()), inner.toByteArray());
+
+ return outer.toByteArray();
+ }
+
+}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqExtension.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqExtension.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.util.Objects;
+
+/*
+ * RFC6066 defines the TLS extension,"status_request" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ * The "extension data" field of this extension contains a
+ * "CertificateStatusRequest" structure:
+ *
+ * struct {
+ * CertificateStatusType status_type;
+ * select (status_type) {
+ * case ocsp: OCSPStatusRequest;
+ * } request;
+ * } CertificateStatusRequest;
+ *
+ * enum { ocsp(1), (255) } CertificateStatusType;
+ *
+ * struct {
+ * ResponderID responder_id_list<0..2^16-1>;
+ * Extensions request_extensions;
+ * } OCSPStatusRequest;
+ *
+ * opaque ResponderID<1..2^16-1>;
+ * opaque Extensions<0..2^16-1>;
+ */
+
+final class CertStatusReqExtension extends HelloExtension {
+
+ private final StatusRequestType statReqType;
+ private final StatusRequest request;
+
+
+ /**
+ * Construct the default status request extension object. The default
+ * object results in a status_request extension where the extension
+ * data segment is zero-length. This is used primarily in ServerHello
+ * messages where the server asserts it can do RFC 6066 status stapling.
+ */
+ CertStatusReqExtension() {
+ super(ExtensionType.EXT_STATUS_REQUEST);
+ statReqType = null;
+ request = null;
+ }
+
+ /**
+ * Construct the status request extension object given a request type
+ * and {@code StatusRequest} object.
+ *
+ * @param reqType a {@code StatusRequestExtType object correspoding
+ * to the underlying {@code StatusRequest} object. A value of
+ * {@code null} is not allowed.
+ * @param statReq the {@code StatusRequest} object used to provide the
+ * encoding for the TLS extension. A value of {@code null} is not
+ * allowed.
+ *
+ * @throws IllegalArgumentException if the provided {@code StatusRequest}
+ * does not match the type.
+ * @throws NullPointerException if either the {@code reqType} or
+ * {@code statReq} arguments are {@code null}.
+ */
+ CertStatusReqExtension(StatusRequestType reqType, StatusRequest statReq) {
+ super(ExtensionType.EXT_STATUS_REQUEST);
+
+ statReqType = Objects.requireNonNull(reqType,
+ "Unallowed null value for status_type");
+ request = Objects.requireNonNull(statReq,
+ "Unallowed null value for request");
+
+ // There is currently only one known status type (OCSP)
+ // We can add more clauses to cover other types in the future
+ if (statReqType == StatusRequestType.OCSP) {
+ if (!(statReq instanceof OCSPStatusRequest)) {
+ throw new IllegalArgumentException("StatusRequest not " +
+ "of type OCSPStatusRequest");
+ }
+ }
+ }
+
+ /**
+ * Construct the {@code CertStatusReqExtension} object from data read from
+ * a {@code HandshakeInputStream}
+ *
+ * @param s the {@code HandshakeInputStream} providing the encoded data
+ * @param len the length of the extension data
+ *
+ * @throws IOException if any decoding errors happen during object
+ * construction.
+ */
+ CertStatusReqExtension(HandshakeInStream s, int len) throws IOException {
+ super(ExtensionType.EXT_STATUS_REQUEST);
+
+ if (len > 0) {
+ // Obtain the status type (first byte)
+ statReqType = StatusRequestType.get(s.getInt8());
+ if (statReqType == StatusRequestType.OCSP) {
+ request = new OCSPStatusRequest(s);
+ } else {
+ // This is a status_type we don't understand. Create
+ // an UnknownStatusRequest in order to preserve the data
+ request = new UnknownStatusRequest(s, len - 1);
+ }
+ } else {
+ // Treat this as a zero-length extension (i.e. from a ServerHello
+ statReqType = null;
+ request = null;
+ }
+ }
+
+ /**
+ * Return the length of the encoded extension, including extension type,
+ * extension length and status_type fields.
+ *
+ * @return the length in bytes, including the extension type and
+ * length fields.
+ */
+ @Override
+ int length() {
+ return (statReqType != null ? 5 + request.length() : 4);
+ }
+
+ /**
+ * Send the encoded TLS extension through a {@code HandshakeOutputStream}
+ *
+ * @param s the {@code HandshakeOutputStream} used to send the encoded data
+ *
+ * @throws IOException tf any errors occur during the encoding process
+ */
+ @Override
+ void send(HandshakeOutStream s) throws IOException {
+ s.putInt16(type.id);
+ s.putInt16(this.length() - 4);
+
+ if (statReqType != null) {
+ s.putInt8(statReqType.id);
+ request.send(s);
+ }
+ }
+
+ /**
+ * Create a string representation of this {@code CertStatusReqExtension}
+ *
+ * @return the string representation of this {@code CertStatusReqExtension}
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Extension ").append(type);
+ if (statReqType != null) {
+ sb.append(": ").append(statReqType).append(", ").append(request);
+ }
+
+ return sb.toString();
+ }
+
+ /**
+ * Return the type field for this {@code CertStatusReqExtension}
+ *
+ * @return the {@code StatusRequestType} for this extension. {@code null}
+ * will be returned if the default constructor is used to create
+ * a zero length status_request extension (found in ServerHello
+ * messages)
+ */
+ StatusRequestType getType() {
+ return statReqType;
+ }
+
+ /**
+ * Get the underlying {@code StatusRequest} for this
+ * {@code CertStatusReqExtension}
+ *
+ * @return the {@code StatusRequest} or {@code null} if the default
+ * constructor was used to create this extension.
+ */
+ StatusRequest getRequest() {
+ return request;
+ }
+}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqItemV2.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Objects;
+import javax.net.ssl.SSLException;
+
+/*
+ * RFC6961 defines the TLS extension,"status_request_v2" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ *
+ * The RFC defines an CertStatusReqItemV2 structure:
+ *
+ * struct {
+ * CertificateStatusType status_type;
+ * uint16 request_length;
+ * select (status_type) {
+ * case ocsp: OCSPStatusRequest;
+ * case ocsp_multi: OCSPStatusRequest;
+ * } request;
+ * } CertificateStatusRequestItemV2;
+ *
+ * enum { ocsp(1), ocsp_multi(2), (255) } CertificateStatusType;
+ */
+
+final class CertStatusReqItemV2 implements StatusRequest {
+
+ private final StatusRequestType statReqType;
+ private final StatusRequest request;
+
+ /**
+ * Construct a {@code CertStatusReqItemV2} object using a type value
+ * and empty ResponderId and Extension lists.
+ *
+ * @param reqType the type of request (e.g. ocsp). A {@code null} value
+ * is not allowed.
+ * @param statReq the {@code StatusRequest} object used to provide the
+ * encoding for this {@code CertStatusReqItemV2}. A {@code null}
+ * value is not allowed.
+ *
+ * @throws IllegalArgumentException if the provided {@code StatusRequest}
+ * does not match the type.
+ * @throws NullPointerException if either the reqType or statReq arguments
+ * are {@code null}.
+ */
+ CertStatusReqItemV2(StatusRequestType reqType, StatusRequest statReq) {
+ statReqType = Objects.requireNonNull(reqType,
+ "Unallowed null value for status_type");
+ request = Objects.requireNonNull(statReq,
+ "Unallowed null value for request");
+
+ // There is currently only one known status type (OCSP)
+ // We can add more clauses to cover other types in the future
+ if (statReqType.equals(StatusRequestType.OCSP) ||
+ statReqType.equals(StatusRequestType.OCSP_MULTI)) {
+ if (!(statReq instanceof OCSPStatusRequest)) {
+ throw new IllegalArgumentException("StatusRequest not " +
+ "of type OCSPStatusRequest");
+ }
+ }
+ }
+
+ /**
+ * Construct a {@code CertStatusReqItemV2} object from encoded bytes
+ *
+ * @param requestBytes the encoded bytes for the {@code CertStatusReqItemV2}
+ *
+ * @throws IOException if any decoding errors take place
+ * @throws IllegalArgumentException if the parsed reqType value is not a
+ * supported status request type.
+ */
+ CertStatusReqItemV2(byte[] reqItemBytes) throws IOException {
+ ByteBuffer reqBuf = ByteBuffer.wrap(reqItemBytes);
+ statReqType = StatusRequestType.get(reqBuf.get());
+ int requestLength = Short.toUnsignedInt(reqBuf.getShort());
+
+ if (requestLength == reqBuf.remaining()) {
+ byte[] statReqBytes = new byte[requestLength];
+ reqBuf.get(statReqBytes);
+ if (statReqType == StatusRequestType.OCSP ||
+ statReqType == StatusRequestType.OCSP_MULTI) {
+ request = new OCSPStatusRequest(statReqBytes);
+ } else {
+ request = new UnknownStatusRequest(statReqBytes);
+ }
+ } else {
+ throw new SSLException("Incorrect request_length: " +
+ "Expected " + reqBuf.remaining() + ", got " +
+ requestLength);
+ }
+ }
+
+ /**
+ * Construct an {@code CertStatusReqItemV2} object from data read from
+ * a {@code HandshakeInputStream}
+ *
+ * @param s the {@code HandshakeInputStream} providing the encoded data
+ *
+ * @throws IOException if any decoding errors happen during object
+ * construction.
+ * @throws IllegalArgumentException if the parsed reqType value is not a
+ * supported status request type.
+ */
+ CertStatusReqItemV2(HandshakeInStream in) throws IOException {
+ statReqType = StatusRequestType.get(in.getInt8());
+ int requestLength = in.getInt16();
+
+ if (statReqType == StatusRequestType.OCSP ||
+ statReqType == StatusRequestType.OCSP_MULTI) {
+ request = new OCSPStatusRequest(in);
+ } else {
+ request = new UnknownStatusRequest(in, requestLength);
+ }
+ }
+
+ /**
+ * Return the length of this {@code CertStatusReqItemV2} in its encoded form
+ *
+ * @return the encoded length of this {@code CertStatusReqItemV2}
+ */
+ @Override
+ public int length() {
+ // The length is the the status type (1 byte) + the request length
+ // field (2 bytes) + the StatusRequest data length.
+ return request.length() + 3;
+ }
+
+ /**
+ * Send the encoded {@code CertStatusReqItemV2} through a
+ * {@code HandshakeOutputStream}
+ *
+ * @param s the {@code HandshakeOutputStream} used to send the encoded data
+ *
+ * @throws IOException if any errors occur during the encoding process
+ */
+ @Override
+ public void send(HandshakeOutStream s) throws IOException {
+ s.putInt8(statReqType.id);
+ s.putInt16(request.length());
+ request.send(s);
+ }
+
+ /**
+ * Create a string representation of this {@code CertStatusReqItemV2}
+ *
+ * @return the string representation of this {@code CertStatusReqItemV2}
+ */
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("CertStatusReqItemV2: ").append(statReqType).append(", ");
+ sb.append(request.toString());
+
+ return sb.toString();
+ }
+
+ /**
+ * Return the type field for this {@code CertStatusReqItemV2}
+ *
+ * @return the {@code StatusRequestType} for this extension.
+ */
+ StatusRequestType getType() {
+ return statReqType;
+ }
+
+ /**
+ * Get the underlying {@code StatusRequest} for this
+ * {@code CertStatusReqItemV2}
+ *
+ * @return the {@code StatusRequest}
+ */
+ StatusRequest getRequest() {
+ return request;
+ }
+}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqListV2Extension.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/CertStatusReqListV2Extension.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.ssl;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Objects;
+import javax.net.ssl.SSLException;
+
+/*
+ * RFC6066 defines the TLS extension,"status_request" (type 0x5),
+ * which allows the client to request that the server perform OCSP
+ * on the client's behalf.
+ * The "extension data" field of this extension contains a
+ * "CertificateStatusRequest" structure:
+ *
+ * struct {
+ * CertificateStatusType status_type;
+ * select (status_type) {
+ * case ocsp: OCSPStatusRequest;
+ * } request;
+ * } CertificateStatusRequest;
+ *
+ * enum { ocsp(1), (255) } CertificateStatusType;
+ *
+ * struct {
+ * ResponderID responder_id_list<0..2^16-1>;
+ * Extensions request_extensions;
+ * } OCSPStatusRequest;
+ *
+ * opaque ResponderID<1..2^16-1>;
+ * opaque Extensions<0..2^16-1>;
+ */
+
+final class CertStatusReqListV2Extension extends HelloExtension {
+
+ private final List
*
*
+ *
-
- class DiagnosisMessages {
- static String systemHealthStatus() {
- // collect system health information
- ...
- }
- }
- ...
- logger.log(Level.FINER, DiagnosisMessages.systemHealthStatus());
-
{@code
+ *
+ * class DiagnosisMessages {
+ * static String systemHealthStatus() {
+ * // collect system health information
+ * ...
+ * }
+ * }
+ * ...
+ * logger.log(Level.FINER, DiagnosisMessages.systemHealthStatus());
+ * }
* With the above code, the health status is collected unnecessarily even when
* the log level FINER is disabled. With the Supplier-accepting version as
* below, the status will only be collected when the log level FINER is
* enabled.
-
+ *
-
- logger.log(Level.FINER, DiagnosisMessages::systemHealthStatus);
-
{@code
+ *
+ * logger.log(Level.FINER, DiagnosisMessages::systemHealthStatus);
+ * }
* Logger.getGlobal()
.
+ * {@code Logger.getGlobal()}.
* For compatibility with old JDK versions where the
- * Logger.getGlobal()
is not available use the call
- * Logger.getLogger(Logger.GLOBAL_LOGGER_NAME)
- * or Logger.getLogger("global")
.
+ * {@code Logger.getGlobal()} is not available use the call
+ * {@code Logger.getLogger(Logger.GLOBAL_LOGGER_NAME)}
+ * or {@code Logger.getLogger("global")}.
*/
@Deprecated
public static final Logger global = new Logger(GLOBAL_LOGGER_NAME);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/Logging.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/Logging.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Logging.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,7 +32,7 @@
/**
* Logging is the implementation class of LoggingMXBean.
*
- * The LoggingMXBean interface provides a standard
+ * The {@code LoggingMXBean} interface provides a standard
* method for management access to the individual
* {@code Logger} objects available at runtime.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java
--- a/jdk/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LoggingMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -36,12 +36,12 @@
* the {@code PlatformLoggingMXBean} object representing the management
* interface for logging.
*
- *
*
*
*
*
*
*
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/ClassLoadingMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,13 +35,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getClassLoadingMXBean} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer}.
+ * platform MBeanServer}.
*
- * jmx.remote.default.class.loader
, if any.
*
- *
* {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME
- * java.lang:type=ClassLoading}
+ * java.lang:type=ClassLoading}
*
*
* It can be obtained by calling the
@@ -86,8 +86,8 @@
/**
* Tests if the verbose output for the class loading system is enabled.
*
- * @return true if the verbose output for the class loading
- * system is enabled; false otherwise.
+ * @return {@code true} if the verbose output for the class loading
+ * system is enabled; {@code false} otherwise.
*/
public boolean isVerbose();
@@ -102,8 +102,8 @@
* Each invocation of this method enables or disables the verbose
* output globally.
*
- * @param value true to enable the verbose output;
- * false to disable.
+ * @param value {@code true} to enable the verbose output;
+ * {@code false} to disable.
*
* @exception java.lang.SecurityException if a security manager
* exists and the caller does not have
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/CompilationMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/CompilationMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/CompilationMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,13 +35,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getCompilationMXBean} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer} method.
+ * platform MBeanServer} method.
*
- *
* {@link ManagementFactory#COMPILATION_MXBEAN_NAME
- * java.lang:type=Compilation}
+ * java.lang:type=Compilation}
*
*
* It can be obtained by calling the
@@ -68,8 +68,8 @@
* Tests if the Java virtual machine supports the monitoring of
* compilation time.
*
- * @return true if the monitoring of compilation time is
- * supported ; false otherwise.
+ * @return {@code true} if the monitoring of compilation time is
+ * supported; {@code false} otherwise.
*/
public boolean isCompilationTimeMonitoringSupported();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/GarbageCollectorMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/GarbageCollectorMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/GarbageCollectorMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,13 +39,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getGarbageCollectorMXBeans} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer} method.
+ * platform MBeanServer} method.
*
- *
* {@link ManagementFactory#GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
- * java.lang:type=GarbageCollector},name=collector's name
+ * java.lang:type=GarbageCollector}{@code ,name=}collector's name
*
*
* It can be obtained by calling the
@@ -68,7 +68,7 @@
public interface GarbageCollectorMXBean extends MemoryManagerMXBean {
/**
* Returns the total number of collections that have occurred.
- * This method returns -1 if the collection count is undefined for
+ * This method returns {@code -1} if the collection count is undefined for
* this collector.
*
* @return the total number of collections that have occurred.
@@ -77,7 +77,7 @@
/**
* Returns the approximate accumulated collection elapsed time
- * in milliseconds. This method returns -1 if the collection
+ * in milliseconds. This method returns {@code -1} if the collection
* elapsed time is undefined for this collector.
* MXBean Mapping
- * LockInfo is mapped to a {@link CompositeData CompositeData}
+ * {@code LockInfo} is mapped to a {@link CompositeData CompositeData}
* as specified in the {@link #from from} method.
*
* @see java.util.concurrent.locks.AbstractOwnableSynchronizer
@@ -59,7 +59,7 @@
private int identityHashCode;
/**
- * Constructs a LockInfo object.
+ * Constructs a {@code LockInfo} object.
*
* @param className the fully qualified name of the class of the lock object.
* @param identityHashCode the {@link System#identityHashCode
@@ -112,11 +112,11 @@
*
*
* className
- * java.lang.String
+ * {@code java.lang.String}
*
*
*
*
@@ -154,7 +154,7 @@
* identityHashCode
- * java.lang.Integer
+ * {@code java.lang.Integer}
*
* lock.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(lock))
*
- * where lock is the lock object.
+ * where {@code lock} is the lock object.
*
* @return the string representation of a lock.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java
--- a/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/ManagementFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -116,7 +116,7 @@
* 2. Indirect access to an MXBean interface via MBeanServer
*
*
*
* {@link GarbageCollectorMXBean}
* {@link #GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE
- * java.lang:type=GarbageCollector},name=collector's name
+ * java.lang:type=GarbageCollector}{@code ,name=}collector's name
*
*
* {@link MemoryManagerMXBean}
* {@link #MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
- * java.lang:type=MemoryManager},name=manager's name
+ * java.lang:type=MemoryManager}{@code ,name=}manager's name
*
*
* {@link MemoryPoolMXBean}
* {@link #MEMORY_POOL_MXBEAN_DOMAIN_TYPE
- * java.lang:type=MemoryPool},name=pool's name
+ * java.lang:type=MemoryPool}{@code ,name=}pool's name
*
*
* {@link BufferPoolMXBean}
@@ -243,72 +243,72 @@
/**
* String representation of the
- * ObjectName for the {@link ClassLoadingMXBean}.
+ * {@code ObjectName} for the {@link ClassLoadingMXBean}.
*/
public final static String CLASS_LOADING_MXBEAN_NAME =
"java.lang:type=ClassLoading";
/**
* String representation of the
- * ObjectName for the {@link CompilationMXBean}.
+ * {@code ObjectName} for the {@link CompilationMXBean}.
*/
public final static String COMPILATION_MXBEAN_NAME =
"java.lang:type=Compilation";
/**
* String representation of the
- * ObjectName for the {@link MemoryMXBean}.
+ * {@code ObjectName} for the {@link MemoryMXBean}.
*/
public final static String MEMORY_MXBEAN_NAME =
"java.lang:type=Memory";
/**
* String representation of the
- * ObjectName for the {@link OperatingSystemMXBean}.
+ * {@code ObjectName} for the {@link OperatingSystemMXBean}.
*/
public final static String OPERATING_SYSTEM_MXBEAN_NAME =
"java.lang:type=OperatingSystem";
/**
* String representation of the
- * ObjectName for the {@link RuntimeMXBean}.
+ * {@code ObjectName} for the {@link RuntimeMXBean}.
*/
public final static String RUNTIME_MXBEAN_NAME =
"java.lang:type=Runtime";
/**
* String representation of the
- * ObjectName for the {@link ThreadMXBean}.
+ * {@code ObjectName} for the {@link ThreadMXBean}.
*/
public final static String THREAD_MXBEAN_NAME =
"java.lang:type=Threading";
/**
* The domain name and the type key property in
- * the ObjectName for a {@link GarbageCollectorMXBean}.
- * The unique ObjectName for a GarbageCollectorMXBean
+ * the {@code ObjectName} for a {@link GarbageCollectorMXBean}.
+ * The unique {@code ObjectName} for a {@code GarbageCollectorMXBean}
* can be formed by appending this string with
- * ",name=collector's name".
+ * "{@code ,name=}collector's name".
*/
public final static String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE =
"java.lang:type=GarbageCollector";
/**
* The domain name and the type key property in
- * the ObjectName for a {@link MemoryManagerMXBean}.
- * The unique ObjectName for a MemoryManagerMXBean
+ * the {@code ObjectName} for a {@link MemoryManagerMXBean}.
+ * The unique {@code ObjectName} for a {@code MemoryManagerMXBean}
* can be formed by appending this string with
- * ",name=manager's name".
+ * "{@code ,name=}manager's name".
*/
public final static String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE=
"java.lang:type=MemoryManager";
/**
* The domain name and the type key property in
- * the ObjectName for a {@link MemoryPoolMXBean}.
- * The unique ObjectName for a MemoryPoolMXBean
+ * the {@code ObjectName} for a {@link MemoryPoolMXBean}.
+ * The unique {@code ObjectName} for a {@code MemoryPoolMXBean}
* can be formed by appending this string with
- * ,name=pool's name.
+ * {@code ,name=}pool's name.
*/
public final static String MEMORY_POOL_MXBEAN_DOMAIN_TYPE=
"java.lang:type=MemoryPool";
@@ -357,11 +357,11 @@
/**
* Returns the managed bean for the compilation system of
- * the Java virtual machine. This method returns null
+ * the Java virtual machine. This method returns {@code null}
* if the Java virtual machine has no compilation system.
*
* @return a {@link CompilationMXBean} object for the Java virtual
- * machine or null if the Java virtual machine has
+ * machine or {@code null} if the Java virtual machine has
* no compilation system.
*/
public static CompilationMXBean getCompilationMXBean() {
@@ -385,7 +385,7 @@
* The Java virtual machine can have one or more memory pools.
* It may add or remove memory pools during execution.
*
- * @return a list of MemoryPoolMXBean objects.
+ * @return a list of {@code MemoryPoolMXBean} objects.
*
*/
public static List
* {@link java.lang.reflect.Proxy#newProxyInstance
- * Proxy.newProxyInstance}(mxbeanInterface.getClassLoader(),
- * new Class[] { mxbeanInterface }, handler)
+ * Proxy.newProxyInstance}{@code (mxbeanInterface.getClassLoader(),
+ * new Class[] { mxbeanInterface }, handler)}
*
*
- * where handler is an {@link java.lang.reflect.InvocationHandler
+ * where {@code handler} is an {@link java.lang.reflect.InvocationHandler
* InvocationHandler} to which method invocations to the MXBean interface
- * are dispatched. This handler converts an input parameter
+ * are dispatched. This {@code handler} converts an input parameter
* from an MXBean data type to its mapped open type before forwarding
- * to the MBeanServer and converts a return value from
- * an MXBean method call through the MBeanServer
+ * to the {@code MBeanServer} and converts a return value from
+ * an MXBean method call through the {@code MBeanServer}
* from an open type to the corresponding return type declared in
* the MXBean interface.
*
@@ -507,7 +507,7 @@
* If the MXBean is a notification emitter (i.e.,
* it implements
* {@link javax.management.NotificationEmitter NotificationEmitter}),
- * both the mxbeanInterface and NotificationEmitter
+ * both the {@code mxbeanInterface} and {@code NotificationEmitter}
* will be implemented by this proxy.
*
*
- *
*
* @throws java.io.IOException if a communication problem
- * occurred when accessing the MBeanServerConnection.
+ * occurred when accessing the {@code MBeanServerConnection}.
*/
public static
* {@link ManagementFactory#MEMORY_MXBEAN_NAME
- * java.lang:type=Memory}
+ * java.lang:type=Memory}
*
*
* It can be obtained by calling the
@@ -133,7 +133,7 @@
*
* Notifications
*
- *
* NotificationEmitter
- * The MemoryMXBean object returned by
+ * The {@code MemoryMXBean} object returned by
* {@link ManagementFactory#getMemoryMXBean} implements
* the {@link javax.management.NotificationEmitter NotificationEmitter}
* interface that allows a listener to be registered within the
- * MemoryMXBean as a notification listener.
+ * {@code MemoryMXBean} as a notification listener.
*
- * Below is an example code that registers a MyListener to handle
- * notification emitted by the MemoryMXBean.
+ * Below is an example code that registers a {@code MyListener} to handle
+ * notification emitted by the {@code MemoryMXBean}.
*
*
*
- * @param cd CompositeData representing a MemoryUsage
+ * @param cd {@code CompositeData} representing a {@code MemoryUsage}
*
- * @throws IllegalArgumentException if cd does not
- * represent a MemoryUsage with the attributes described
+ * @throws IllegalArgumentException if {@code cd} does not
+ * represent a {@code MemoryUsage} with the attributes described
* above.
*
- * @return a MemoryUsage object represented by cd
- * if cd is not null;
- * null otherwise.
+ * @return a {@code MemoryUsage} object represented by {@code cd}
+ * if {@code cd} is not {@code null};
+ * {@code null} otherwise.
*/
public static MemoryUsage from(CompositeData cd) {
if (cd == null) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java
--- a/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/MonitorInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -33,7 +33,7 @@
* when entering a synchronization block or method on that object.
*
*
* class MyListener implements javax.management.NotificationListener {
@@ -215,10 +215,10 @@
/**
* Returns the current memory usage of the heap that
* is used for object allocation. The heap consists
- * of one or more memory pools. The used
- * and committed size of the returned memory
+ * of one or more memory pools. The {@code used}
+ * and {@code committed} size of the returned memory
* usage is the sum of those values of all heap memory pools
- * whereas the init and max size of the
+ * whereas the {@code init} and {@code max} size of the
* returned memory usage represents the setting of the heap
* memory which may not be the sum of those of all heap
* memory pools.
@@ -229,8 +229,8 @@
*
*
- * The mapped type of MemoryUsage is
- * CompositeData with attributes as specified in
+ * The mapped type of {@code MemoryUsage} is
+ * {@code CompositeData} with attributes as specified in
* {@link MemoryUsage#from MemoryUsage}.
*
* @return a {@link MemoryUsage} object representing
@@ -242,18 +242,18 @@
* Returns the current memory usage of non-heap memory that
* is used by the Java virtual machine.
* The non-heap memory consists of one or more memory pools.
- * The used and committed size of the
+ * The {@code used} and {@code committed} size of the
* returned memory usage is the sum of those values of
- * all non-heap memory pools whereas the init
- * and max size of the returned memory usage
+ * all non-heap memory pools whereas the {@code init}
+ * and {@code max} size of the returned memory usage
* represents the setting of the non-heap
* memory which may not be the sum of those of all non-heap
* memory pools.
*
*
- * The mapped type of MemoryUsage is
- * CompositeData with attributes as specified in
+ * The mapped type of {@code MemoryUsage} is
+ * {@code CompositeData} with attributes as specified in
* {@link MemoryUsage#from MemoryUsage}.
*
* @return a {@link MemoryUsage} object representing
@@ -264,8 +264,8 @@
/**
* Tests if verbose output for the memory system is enabled.
*
- * @return true if verbose output for the memory
- * system is enabled; false otherwise.
+ * @return {@code true} if verbose output for the memory
+ * system is enabled; {@code false} otherwise.
*/
public boolean isVerbose();
@@ -280,8 +280,8 @@
* Each invocation of this method enables or disables verbose
* output globally.
*
- * @param value true to enable verbose output;
- * false to disable.
+ * @param value {@code true} to enable verbose output;
+ * {@code false} to disable.
*
* @exception java.lang.SecurityException if a security manager
* exists and the caller does not have
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/MemoryManagerMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryManagerMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryManagerMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -36,13 +36,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getMemoryManagerMXBeans} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer} method.
+ * platform MBeanServer} method.
*
- *
* {@link ManagementFactory#MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE
- * java.lang:type=MemoryManager},name=manager's name
+ * java.lang:type=MemoryManager}{@code ,name=}manager's name
*
*
* It can be obtained by calling the
@@ -72,16 +72,16 @@
* machine. A memory manager becomes invalid once the Java virtual
* machine removes it from the memory system.
*
- * @return true if the memory manager is valid in the
+ * @return {@code true} if the memory manager is valid in the
* Java virtual machine;
- * false otherwise.
+ * {@code false} otherwise.
*/
public boolean isValid();
/**
* Returns the name of memory pools that this memory manager manages.
*
- * @return an array of String objects, each is
+ * @return an array of {@code String} objects, each is
* the name of a memory pool that this memory manager manages.
*/
public String[] getMemoryPoolNames();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -53,12 +53,12 @@
*
*
*
*
@@ -78,7 +78,7 @@
*
*
*
*
- * @param cd CompositeData representing a
- * MemoryNotificationInfo
+ * @param cd {@code CompositeData} representing a
+ * {@code MemoryNotificationInfo}
*
- * @throws IllegalArgumentException if cd does not
- * represent a MemoryNotificationInfo object.
+ * @throws IllegalArgumentException if {@code cd} does not
+ * represent a {@code MemoryNotificationInfo} object.
*
- * @return a MemoryNotificationInfo object represented
- * by cd if cd is not null;
- * null otherwise.
+ * @return a {@code MemoryNotificationInfo} object represented
+ * by {@code cd} if {@code cd} is not {@code null};
+ * {@code null} otherwise.
*/
public static MemoryNotificationInfo from(CompositeData cd) {
if (cd == null) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -37,13 +37,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getMemoryPoolMXBeans} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer} method.
+ * platform MBeanServer} method.
*
- *
@@ -219,28 +219,28 @@
*
*
*
*
* poolName
- * java.lang.String
+ * {@code java.lang.String}
*
*
* usage
- * javax.management.openmbean.CompositeData
+ * {@code javax.management.openmbean.CompositeData}
*
*
* count
- * java.lang.Long
+ * {@code java.lang.Long}
*
* {@link ManagementFactory#MEMORY_POOL_MXBEAN_DOMAIN_TYPE
- * java.lang:type=MemoryPool},name=pool's name
+ * java.lang:type=MemoryPool}{@code ,name=}pool's name
*
*
* It can be obtained by calling the
@@ -236,7 +236,7 @@
* Usage threshold notification will be emitted by {@link MemoryMXBean}.
* When the Java virtual machine detects that the memory usage of
* a memory pool has reached or exceeded the usage threshold
- * the virtual machine will trigger the MemoryMXBean to emit an
+ * the virtual machine will trigger the {@code MemoryMXBean} to emit an
* {@link MemoryNotificationInfo#MEMORY_THRESHOLD_EXCEEDED
* usage threshold exceeded notification}.
* Another usage threshold exceeded notification will not be
@@ -250,7 +250,7 @@
* listener notifies another thread to perform the actual action
* such as to redistribute outstanding tasks, stop receiving tasks,
* or resume receiving tasks.
- * The handleNotification method should be designed to
+ * The {@code handleNotification} method should be designed to
* do a very minimal amount of work and return without delay to avoid
* causing delay in delivering subsequent notifications. Time-consuming
* actions should be performed by a separate thread.
@@ -290,7 +290,7 @@
*
*
*
- * The mapped type of MemoryType is String
- * and the value is the name of the MemoryType.
+ * The mapped type of {@code MemoryType} is {@code String}
+ * and the value is the name of the {@code MemoryType}.
*
* @return the type of this memory pool.
*/
@@ -383,7 +383,7 @@
/**
* Returns an estimate of the memory usage of this memory pool.
- * This method returns null
+ * This method returns {@code null}
* if this memory pool is not valid (i.e. no longer exists).
*
*
- * The mapped type of MemoryUsage is
- * CompositeData with attributes as specified in
+ * The mapped type of {@code MemoryUsage} is
+ * {@code CompositeData} with attributes as specified in
* {@link MemoryUsage#from MemoryUsage}.
*
- * @return a {@link MemoryUsage} object; or null if
+ * @return a {@link MemoryUsage} object; or {@code null} if
* this pool not valid.
*/
public MemoryUsage getUsage();
@@ -411,17 +411,17 @@
/**
* Returns the peak memory usage of this memory pool since the
* Java virtual machine was started or since the peak was reset.
- * This method returns null
+ * This method returns {@code null}
* if this memory pool is not valid (i.e. no longer exists).
*
*
- * The mapped type of MemoryUsage is
- * CompositeData with attributes as specified in
+ * The mapped type of {@code MemoryUsage} is
+ * {@code CompositeData} with attributes as specified in
* {@link MemoryUsage#from MemoryUsage}.
*
* @return a {@link MemoryUsage} object representing the peak
- * memory usage; or null if this pool is not valid.
+ * memory usage; or {@code null} if this pool is not valid.
*
*/
public MemoryUsage getPeakUsage();
@@ -441,9 +441,9 @@
* machine. A memory pool becomes invalid once the Java virtual
* machine removes it from the memory system.
*
- * @return true if the memory pool is valid in the running
+ * @return {@code true} if the memory pool is valid in the running
* Java virtual machine;
- * false otherwise.
+ * {@code false} otherwise.
*/
public boolean isValid();
@@ -451,7 +451,7 @@
* Returns the name of memory managers that manages this memory pool.
* Each memory pool will be managed by at least one memory manager.
*
- * @return an array of String objects, each is the name of
+ * @return an array of {@code String} objects, each is the name of
* a memory manager managing this memory pool.
*/
public String[] getMemoryManagerNames();
@@ -472,7 +472,7 @@
public long getUsageThreshold();
/**
- * Sets the threshold of this memory pool to the given threshold
+ * Sets the threshold of this memory pool to the given {@code threshold}
* value if this memory pool supports the usage threshold.
* The usage threshold crossing checking is enabled in this memory pool
* if the threshold is set to a positive value.
@@ -481,7 +481,7 @@
*
* @param threshold the new threshold value in bytes. Must be non-negative.
*
- * @throws IllegalArgumentException if threshold is negative
+ * @throws IllegalArgumentException if {@code threshold} is negative
* or greater than the maximum amount of memory for
* this memory pool if defined.
*
@@ -501,9 +501,9 @@
* Tests if the memory usage of this memory pool
* reaches or exceeds its usage threshold value.
*
- * @return true if the memory usage of
+ * @return {@code true} if the memory usage of
* this memory pool reaches or exceeds the threshold value;
- * false otherwise.
+ * {@code false} otherwise.
*
* @throws UnsupportedOperationException if this memory pool
* does not support a usage threshold.
@@ -525,8 +525,8 @@
/**
* Tests if this memory pool supports usage threshold.
*
- * @return true if this memory pool supports usage threshold;
- * false otherwise.
+ * @return {@code true} if this memory pool supports usage threshold;
+ * {@code false} otherwise.
*/
public boolean isUsageThresholdSupported();
@@ -547,7 +547,7 @@
/**
* Sets the collection usage threshold of this memory pool to
- * the given threshold value.
+ * the given {@code threshold} value.
* When this threshold is set to positive, the Java virtual machine
* will check the memory usage at its best appropriate time after it has
* expended effort in recycling unused objects in this memory pool.
@@ -560,7 +560,7 @@
* @param threshold the new collection usage threshold value in bytes.
* Must be non-negative.
*
- * @throws IllegalArgumentException if threshold is negative
+ * @throws IllegalArgumentException if {@code threshold} is negative
* or greater than the maximum amount of memory for
* this memory pool if defined.
*
@@ -585,10 +585,10 @@
* machine to perform any garbage collection other than its normal
* automatic memory management.
*
- * @return true if the memory usage of this memory pool
+ * @return {@code true} if the memory usage of this memory pool
* reaches or exceeds the collection usage threshold value
* in the most recent collection;
- * false otherwise.
+ * {@code false} otherwise.
*
* @throws UnsupportedOperationException if this memory pool
* does not support a usage threshold.
@@ -617,27 +617,27 @@
* This method does not request the Java virtual
* machine to perform any garbage collection other than its normal
* automatic memory management.
- * This method returns null if the Java virtual
+ * This method returns {@code null} if the Java virtual
* machine does not support this method.
*
*
- * The mapped type of MemoryUsage is
- * CompositeData with attributes as specified in
+ * The mapped type of {@code MemoryUsage} is
+ * {@code CompositeData} with attributes as specified in
* {@link MemoryUsage#from MemoryUsage}.
*
* @return a {@link MemoryUsage} representing the memory usage of
* this memory pool after the Java virtual machine most recently
* expended effort in recycling unused objects;
- * null if this method is not supported.
+ * {@code null} if this method is not supported.
*/
public MemoryUsage getCollectionUsage();
/**
* Tests if this memory pool supports a collection usage threshold.
*
- * @return true if this memory pool supports the
- * collection usage threshold; false otherwise.
+ * @return {@code true} if this memory pool supports the
+ * collection usage threshold; {@code false} otherwise.
*/
public boolean isCollectionUsageThresholdSupported();
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/MemoryType.java
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryType.java Wed Jul 05 20:44:51 2017 +0200
@@ -62,8 +62,8 @@
}
/**
- * Returns the string representation of this MemoryType.
- * @return the string representation of this MemoryType.
+ * Returns the string representation of this {@code MemoryType}.
+ * @return the string representation of this {@code MemoryType}.
*/
public String toString() {
return description;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java
--- a/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/MemoryUsage.java Wed Jul 05 20:44:51 2017 +0200
@@ -29,50 +29,50 @@
import sun.management.MemoryUsageCompositeData;
/**
- * A MemoryUsage object represents a snapshot of memory usage.
- * Instances of the MemoryUsage class are usually constructed
+ * A {@code MemoryUsage} object represents a snapshot of memory usage.
+ * Instances of the {@code MemoryUsage} class are usually constructed
* by methods that are used to obtain memory usage
* information about individual memory pool of the Java virtual machine or
* the heap or non-heap memory of the Java virtual machine as a whole.
*
- *
*
*
- *
* init
+ * {@code init}
* represents the initial amount of memory (in bytes) that
* the Java virtual machine requests from the operating system
* for memory management during startup. The Java virtual machine
* may request additional memory from the operating system and
* may also release memory to the system over time.
- * The value of init may be undefined.
+ * The value of {@code init} may be undefined.
*
*
- *
* used
+ * {@code used}
* represents the amount of memory currently used (in bytes).
*
*
- *
* committed
+ * {@code committed}
* represents the amount of memory (in bytes) that is
* guaranteed to be available for use by the Java virtual machine.
* The amount of committed memory may change over time (increase
* or decrease). The Java virtual machine may release memory to
- * the system and committed could be less than init.
- * committed will always be greater than
- * or equal to used.
+ * the system and {@code committed} could be less than {@code init}.
+ * {@code committed} will always be greater than
+ * or equal to {@code used}.
*
*
- *
@@ -97,7 +97,7 @@
*
*
* max
+ * {@code max}
* represents the maximum amount of memory (in bytes)
* that can be used for memory management. Its value may be undefined.
* The maximum amount of memory may change over time if defined.
* The amount of used and committed memory will always be less than
- * or equal to max if max is defined.
+ * or equal to {@code max} if {@code max} is defined.
* A memory allocation may fail if it attempts to increase the
- * used memory such that used > committed even
- * if used <= max would still be true (for example,
+ * used memory such that {@code used > committed} even
+ * if {@code used <= max} would still be true (for example,
* when the system is low on virtual memory).
*
* MXBean Mapping
- * MemoryUsage is mapped to a {@link CompositeData CompositeData}
+ * {@code MemoryUsage} is mapped to a {@link CompositeData CompositeData}
* with attributes as specified in the {@link #from from} method.
*
* @author Mandy Chung
@@ -110,26 +110,26 @@
private final long max;
/**
- * Constructs a MemoryUsage object.
+ * Constructs a {@code MemoryUsage} object.
*
* @param init the initial amount of memory in bytes that
* the Java virtual machine allocates;
- * or -1 if undefined.
+ * or {@code -1} if undefined.
* @param used the amount of used memory in bytes.
* @param committed the amount of committed memory in bytes.
* @param max the maximum amount of memory in bytes that
- * can be used; or -1 if undefined.
+ * can be used; or {@code -1} if undefined.
*
* @throws IllegalArgumentException if
*
- *
*/
public MemoryUsage(long init,
@@ -168,7 +168,7 @@
}
/**
- * Constructs a MemoryUsage object from a
+ * Constructs a {@code MemoryUsage} object from a
* {@link CompositeData CompositeData}.
*/
private MemoryUsage(CompositeData cd) {
@@ -184,10 +184,10 @@
/**
* Returns the amount of memory in bytes that the Java virtual machine
* initially requests from the operating system for memory management.
- * This method returns -1 if the initial memory size is undefined.
+ * This method returns {@code -1} if the initial memory size is undefined.
*
* @return the initial size of memory in bytes;
- * -1 if undefined.
+ * {@code -1} if undefined.
*/
public long getInit() {
return init;
@@ -217,7 +217,7 @@
/**
* Returns the maximum amount of memory in bytes that can be
- * used for memory management. This method returns -1
+ * used for memory management. This method returns {@code -1}
* if the maximum memory size is undefined.
*
*
@@ -259,32 +259,32 @@
*
*
*
* init
- * java.lang.Long
+ * {@code java.lang.Long}
*
*
* used
- * java.lang.Long
+ * {@code java.lang.Long}
*
*
* committed
- * java.lang.Long
+ * {@code java.lang.Long}
*
*
* max
- * java.lang.Long
+ * {@code java.lang.Long}
* MXBean Mapping
- * MonitorInfo is mapped to a {@link CompositeData CompositeData}
+ * {@code MonitorInfo} is mapped to a {@link CompositeData CompositeData}
* with attributes as specified in
* the {@link #from from} method.
*
@@ -46,7 +46,7 @@
private StackTraceElement stackFrame;
/**
- * Construct a MonitorInfo object.
+ * Construct a {@code MonitorInfo} object.
*
* @param className the fully qualified name of the class of the lock object.
* @param identityHashCode the {@link System#identityHashCode
@@ -55,9 +55,9 @@
* was locked.
* @param stackFrame the stack frame that locked the object monitor.
* @throws IllegalArgumentException if
- * stackDepth ≥ 0 but stackFrame is null,
- * or stackDepth < 0 but stackFrame is not
- * null.
+ * {@code stackDepth} ≥ 0 but {@code stackFrame} is {@code null},
+ * or {@code stackDepth} < 0 but {@code stackFrame} is not
+ * {@code null}.
*/
public MonitorInfo(String className,
int identityHashCode,
@@ -78,7 +78,7 @@
/**
* Returns the depth in the stack trace where the object monitor
- * was locked. The depth is the index to the StackTraceElement
+ * was locked. The depth is the index to the {@code StackTraceElement}
* array returned in the {@link ThreadInfo#getStackTrace} method.
*
* @return the depth in the stack trace where the object monitor
@@ -91,17 +91,17 @@
/**
* Returns the stack frame that locked the object monitor.
*
- * @return StackTraceElement that locked the object monitor,
- * or null if not available.
+ * @return {@code StackTraceElement} that locked the object monitor,
+ * or {@code null} if not available.
*/
public StackTraceElement getLockedStackFrame() {
return stackFrame;
}
/**
- * Returns a MonitorInfo object represented by the
- * given CompositeData.
- * The given CompositeData must contain the following attributes
+ * Returns a {@code MonitorInfo} object represented by the
+ * given {@code CompositeData}.
+ * The given {@code CompositeData} must contain the following attributes
* as well as the attributes specified in the
*
* mapped type for the {@link LockInfo} class:
@@ -113,28 +113,28 @@
*
*
* lockedStackFrame
- * CompositeData as specified in the
+ *
*
+ * CompositeData as specified in the
* stackTrace
* attribute defined in the {@link ThreadInfo#from
* ThreadInfo.from} method.
- *
*
*
*
*
- * @param cd CompositeData representing a MonitorInfo
+ * @param cd {@code CompositeData} representing a {@code MonitorInfo}
*
- * @throws IllegalArgumentException if cd does not
- * represent a MonitorInfo with the attributes described
+ * @throws IllegalArgumentException if {@code cd} does not
+ * represent a {@code MonitorInfo} with the attributes described
* above.
- * @return a MonitorInfo object represented
- * by cd if cd is not null;
- * null otherwise.
+ * @return a {@code MonitorInfo} object represented
+ * by {@code cd} if {@code cd} is not {@code null};
+ * {@code null} otherwise.
*/
public static MonitorInfo from(CompositeData cd) {
if (cd == null) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/OperatingSystemMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/OperatingSystemMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/OperatingSystemMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,13 +35,13 @@
* that can be obtained by calling
* the {@link ManagementFactory#getOperatingSystemMXBean} method or
* from the {@link ManagementFactory#getPlatformMBeanServer
- * platform MBeanServer} method.
+ * platform MBeanServer} method.
*
- * lockedStackDepth
- * java.lang.Integer
+ * {@code java.lang.Integer}
*
* {@link ManagementFactory#OPERATING_SYSTEM_MXBEAN_NAME
- * java.lang:type=OperatingSystem}
+ * java.lang:type=OperatingSystem}
*
*
* It can be obtained by calling the
@@ -63,7 +63,7 @@
public interface OperatingSystemMXBean extends PlatformManagedObject {
/**
* Returns the operating system name.
- * This method is equivalent to System.getProperty("os.name").
+ * This method is equivalent to {@code System.getProperty("os.name")}.
*
* @return the operating system name.
*
@@ -78,7 +78,7 @@
/**
* Returns the operating system architecture.
- * This method is equivalent to System.getProperty("os.arch").
+ * This method is equivalent to {@code System.getProperty("os.arch")}.
*
* @return the operating system architecture.
*
@@ -93,7 +93,7 @@
/**
* Returns the operating system version.
- * This method is equivalent to System.getProperty("os.version").
+ * This method is equivalent to {@code System.getProperty("os.version")}.
*
* @return the operating system version.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java
--- a/jdk/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/java/lang/management/PlatformLoggingMXBean.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
/**
* The management interface for the {@linkplain java.util.logging logging} facility.
*
- *
* {@link ManagementFactory#RUNTIME_MXBEAN_NAME
- * java.lang:type=Runtime}
+ * java.lang:type=Runtime}
*
*
* It can be obtained by calling the
@@ -81,7 +81,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -97,7 +97,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -113,7 +113,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -129,7 +129,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -145,7 +145,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -161,7 +161,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -192,7 +192,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -212,7 +212,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to this system property.
* @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)
* @see java.lang.System#getProperty
@@ -224,8 +224,8 @@
* mechanism used by the bootstrap class loader to search for class
* files.
*
- * @return true if the Java virtual machine supports the
- * class path mechanism; false otherwise.
+ * @return {@code true} if the Java virtual machine supports the
+ * class path mechanism; {@code false} otherwise.
*/
public boolean isBootClassPathSupported();
@@ -256,7 +256,7 @@
/**
* Returns the input arguments passed to the Java virtual machine
- * which does not include the arguments to the main method.
+ * which does not include the arguments to the {@code main} method.
* This method returns an empty list if there is no input argument
* to the Java virtual machine.
*
- * The mapped type of {@code List
@@ -318,12 +318,12 @@
* Item Type
*
- *
* key
- * String
+ * {@code key}
+ * {@code String}
*
- *
*
*
@@ -332,7 +332,7 @@
*
* @throws java.lang.SecurityException
* if a security manager exists and its
- * value
- * String
+ * {@code value}
+ * {@code String}
* checkPropertiesAccess
method doesn't allow access
+ * {@code checkPropertiesAccess} method doesn't allow access
* to the system properties.
*/
public java.util.Map
* {@link ManagementFactory#THREAD_MXBEAN_NAME
- * java.lang:type=Threading}
+ * java.lang:type=Threading}
*
*
* It can be obtained by calling the
@@ -88,7 +88,7 @@
* When thread contention monitoring is enabled, the accumulated elapsed
* time that the thread has blocked for synchronization or waited for
* notification will be collected and returned in the
- * ThreadInfo object.
+ * {@code ThreadInfo} object.
*
* {@link #getThreadInfo(long, int) getThreadInfo(id, 0);}
*
*
*
- * The mapped type of ThreadInfo is
- * CompositeData with attributes as specified in the
+ * The mapped type of {@code ThreadInfo} is
+ * {@code CompositeData} with attributes as specified in the
* {@link ThreadInfo#from ThreadInfo.from} method.
*
* @param id the thread ID of the thread. Must be positive.
*
* @return a {@link ThreadInfo} object for the thread of the given ID
* with no stack trace, no locked monitor and no synchronizer info;
- * null if the thread of the given ID is not alive or
+ * {@code null} if the thread of the given ID is not alive or
* it does not exist.
*
* @throws IllegalArgumentException if {@code id <= 0}.
@@ -207,26 +207,26 @@
/**
* Returns the thread info for each thread
- * whose ID is in the input array ids with no stack trace.
+ * whose ID is in the input array {@code ids} with no stack trace.
* This method is equivalent to calling:
*
*
*
* {@link #getThreadInfo(long[], int) getThreadInfo}(ids, 0);
*
- * The mapped type of ThreadInfo is
- * CompositeData with attributes as specified in the
+ * The mapped type of {@code ThreadInfo} is
+ * {@code CompositeData} with attributes as specified in the
* {@link ThreadInfo#from ThreadInfo.from} method.
*
* @param ids an array of thread IDs.
@@ -236,7 +236,7 @@
* with no stack trace, no locked monitor and no synchronizer info.
*
* @throws IllegalArgumentException if any element in the input array
- * ids is {@code <= 0}.
+ * {@code ids} is {@code <= 0}.
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("monitor").
@@ -244,46 +244,46 @@
public ThreadInfo[] getThreadInfo(long[] ids);
/**
- * Returns a thread info for a thread of the specified id,
+ * Returns a thread info for a thread of the specified {@code id},
* with stack trace of a specified number of stack trace elements.
- * The maxDepth parameter indicates the maximum number of
+ * The {@code maxDepth} parameter indicates the maximum number of
* {@link StackTraceElement} to be retrieved from the stack trace.
- * If maxDepth == Integer.MAX_VALUE, the entire stack trace of
+ * If {@code maxDepth == Integer.MAX_VALUE}, the entire stack trace of
* the thread will be dumped.
- * If maxDepth == 0, no stack trace of the thread
+ * If {@code maxDepth == 0}, no stack trace of the thread
* will be dumped.
* This method does not obtain the locked monitors and locked
* synchronizers of the thread.
*
- * The mapped type of ThreadInfo is
- * CompositeData with attributes as specified in the
+ * The mapped type of {@code ThreadInfo} is
+ * {@code CompositeData} with attributes as specified in the
* {@link ThreadInfo#from ThreadInfo.from} method.
*
* @param id the thread ID of the thread. Must be positive.
* @param maxDepth the maximum number of entries in the stack trace
- * to be dumped. Integer.MAX_VALUE could be used to request
+ * to be dumped. {@code Integer.MAX_VALUE} could be used to request
* the entire stack to be dumped.
*
* @return a {@link ThreadInfo} of the thread of the given ID
* with no locked monitor and synchronizer info.
- * null if the thread of the given ID is not alive or
+ * {@code null} if the thread of the given ID is not alive or
* it does not exist.
*
* @throws IllegalArgumentException if {@code id <= 0}.
- * @throws IllegalArgumentException if maxDepth is negative.
+ * @throws IllegalArgumentException if {@code maxDepth is negative}.
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("monitor").
@@ -293,40 +293,40 @@
/**
* Returns the thread info for each thread
- * whose ID is in the input array ids,
+ * whose ID is in the input array {@code ids},
* with stack trace of a specified number of stack trace elements.
- * The maxDepth parameter indicates the maximum number of
+ * The {@code maxDepth} parameter indicates the maximum number of
* {@link StackTraceElement} to be retrieved from the stack trace.
- * If maxDepth == Integer.MAX_VALUE, the entire stack trace of
+ * If {@code maxDepth == Integer.MAX_VALUE}, the entire stack trace of
* the thread will be dumped.
- * If maxDepth == 0, no stack trace of the thread
+ * If {@code maxDepth == 0}, no stack trace of the thread
* will be dumped.
* This method does not obtain the locked monitors and locked
* synchronizers of the threads.
*
- * The mapped type of ThreadInfo is
- * CompositeData with attributes as specified in the
+ * The mapped type of {@code ThreadInfo} is
+ * {@code CompositeData} with attributes as specified in the
* {@link ThreadInfo#from ThreadInfo.from} method.
*
* @param ids an array of thread IDs
* @param maxDepth the maximum number of entries in the stack trace
- * to be dumped. Integer.MAX_VALUE could be used to request
+ * to be dumped. {@code Integer.MAX_VALUE} could be used to request
* the entire stack to be dumped.
*
* @return an array of the {@link ThreadInfo} objects, each containing
@@ -334,9 +334,9 @@
* element of the input array of IDs with no locked monitor and
* synchronizer info.
*
- * @throws IllegalArgumentException if maxDepth is negative.
+ * @throws IllegalArgumentException if {@code maxDepth is negative}.
* @throws IllegalArgumentException if any element in the input array
- * ids is {@code <= 0}.
+ * {@code ids} is {@code <= 0}.
* @throws java.lang.SecurityException if a security manager
* exists and the caller does not have
* ManagementPermission("monitor").
@@ -348,17 +348,17 @@
* Tests if the Java virtual machine supports thread contention monitoring.
*
* @return
- * true
+ * {@code true}
* if the Java virtual machine supports thread contention monitoring;
- * false otherwise.
+ * {@code false} otherwise.
*/
public boolean isThreadContentionMonitoringSupported();
/**
* Tests if thread contention monitoring is enabled.
*
- * @return true if thread contention monitoring is enabled;
- * false otherwise.
+ * @return {@code true} if thread contention monitoring is enabled;
+ * {@code false} otherwise.
*
* @throws java.lang.UnsupportedOperationException if the Java virtual
* machine does not support thread contention monitoring.
@@ -371,8 +371,8 @@
* Enables or disables thread contention monitoring.
* Thread contention monitoring is disabled by default.
*
- * @param enable true to enable;
- * false to disable.
+ * @param enable {@code true} to enable;
+ * {@code false} to disable.
*
* @throws java.lang.UnsupportedOperationException if the Java
* virtual machine does not support thread contention monitoring.
@@ -401,7 +401,7 @@
*
*
*
@@ -730,13 +730,13 @@
*
*
* {@link #getThreadInfo(long[], int) getThreadInfo(ids, Integer.MAX_VALUE)}
*
- * The mapped type of ThreadInfo is
- * CompositeData with attributes as specified in the
+ * The mapped type of {@code ThreadInfo} is
+ * {@code CompositeData} with attributes as specified in the
* {@link ThreadInfo#from ThreadInfo.from} method.
*
* @param ids an array of thread IDs.
- * @param lockedMonitors if true, retrieves all locked monitors.
- * @param lockedSynchronizers if true, retrieves all locked
+ * @param lockedMonitors if {@code true}, retrieves all locked monitors.
+ * @param lockedSynchronizers if {@code true}, retrieves all locked
* ownable synchronizers.
*
* @return an array of the {@link ThreadInfo} objects, each containing
@@ -748,11 +748,11 @@
* ManagementPermission("monitor").
* @throws java.lang.UnsupportedOperationException
*
- *
- *
ManagementFactory
class will
return the MXBeans with the platform extension.
MBeanServer
through proxy
-
@@ -228,7 +228,7 @@
}
null
argument to a constructor
or method in any class or interface in this package will cause a {@link
java.lang.NullPointerException NullPointerException} to be thrown.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/MBeanAttributeInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/MBeanAttributeInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanAttributeInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -92,7 +92,7 @@
/**
- * Constructs an MBeanAttributeInfo
object.
+ * Constructs an {@code MBeanAttributeInfo} object.
*
* @param name The name of the attribute.
* @param type The type or class name of the attribute.
@@ -118,7 +118,7 @@
}
/**
- * Constructs an MBeanAttributeInfo
object.
+ * Constructs an {@code MBeanAttributeInfo} object.
*
* @param name The name of the attribute.
* @param type The type or class name of the attribute.
@@ -193,9 +193,9 @@
/**
* o
is an MBeanAttributeInfo such
+ * @return true if and only if {@code o} is an MBeanAttributeInfo such
* that its {@link #getName()}, {@link #getType()}, {@link
* #getDescription()}, {@link #isReadable()}, {@link
* #isWritable()}, and {@link #isIs()} values are equal (not
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/MBeanConstructorInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/MBeanConstructorInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanConstructorInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -55,14 +55,14 @@
private final MBeanParameterInfo[] signature;
/**
- * Constructs an MBeanConstructorInfo
object. The
+ * Constructs an {@code MBeanConstructorInfo} object. The
* {@link Descriptor} of the constructed object will include
* fields contributed by any annotations on the {@code
* Constructor} object that contain the {@link DescriptorKey}
* meta-annotation.
*
* @param description A human readable description of the operation.
- * @param constructor The java.lang.reflect.Constructor
+ * @param constructor The {@code java.lang.reflect.Constructor}
* object describing the MBean constructor.
*/
public MBeanConstructorInfo(String description, Constructor> constructor) {
@@ -72,10 +72,10 @@
}
/**
- * Constructs an MBeanConstructorInfo
object.
+ * Constructs an {@code MBeanConstructorInfo} object.
*
* @param name The name of the constructor.
- * @param signature MBeanParameterInfo
objects
+ * @param signature {@code MBeanParameterInfo} objects
* describing the parameters(arguments) of the constructor. This
* may be null with the same effect as a zero-length array.
* @param description A human readable description of the constructor.
@@ -87,10 +87,10 @@
}
/**
- * Constructs an MBeanConstructorInfo
object.
+ * Constructs an {@code MBeanConstructorInfo} object.
*
* @param name The name of the constructor.
- * @param signature MBeanParameterInfo
objects
+ * @param signature {@code MBeanParameterInfo} objects
* describing the parameters(arguments) of the constructor. This
* may be null with the same effect as a zero-length array.
* @param description A human readable description of the constructor.
@@ -118,9 +118,9 @@
/**
* MBeanParameterInfo
+ * parameter is described by an {@code MBeanParameterInfo}
* object.MBeanParameterInfo
objects but
- * that each referenced MBeanParameterInfo
object is
+ * references to the {@code MBeanParameterInfo} objects but
+ * that each referenced {@code MBeanParameterInfo} object is
* not copied.MBeanParameterInfo
objects.
+ * @return An array of {@code MBeanParameterInfo} objects.
*/
public MBeanParameterInfo[] getSignature() {
if (signature.length == 0)
@@ -177,7 +177,7 @@
*
* @param o the object to compare to.
*
- * @return true if and only if o
is an MBeanConstructorInfo such
+ * @return true if and only if {@code o} is an MBeanConstructorInfo such
* that its {@link #getName()}, {@link #getDescription()},
* {@link #getSignature()}, and {@link #getDescriptor()}
* values are equal (not necessarily
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/MBeanInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/MBeanInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -57,12 +57,12 @@
* infoTimeout fields in the {@code
* MBeanInfo} {@link Descriptor}.
The contents of the MBeanInfo
for a Dynamic MBean
+ *
The contents of the {@code MBeanInfo} for a Dynamic MBean * are determined by its {@link DynamicMBean#getMBeanInfo * getMBeanInfo()} method. This includes Open MBeans and Model * MBeans, which are kinds of Dynamic MBeans.
* - *The contents of the MBeanInfo
for a Standard MBean
+ *
The contents of the {@code MBeanInfo} for a Standard MBean * are determined by the MBean server as follows:
* *The description returned by {@link #getDescription()} and the * descriptions of the contained attributes and operations are not specified.
* - *The remaining details of the MBeanInfo
for a
+ *
The remaining details of the {@code MBeanInfo} for a
* Standard MBean are not specified. This includes the description of
* any contained constructors, and notifications; the names
* of parameters to constructors and operations; and the descriptions of
@@ -161,10 +161,10 @@
private final transient boolean arrayGettersSafe;
/**
- * Constructs an MBeanInfo
.
+ * Constructs an {@code MBeanInfo}.
*
* @param className The name of the Java class of the MBean described
- * by this MBeanInfo
. This value may be any
+ * by this {@code MBeanInfo}. This value may be any
* syntactically legal Java class name. It does not have to be a
* Java class known to the MBean server or to the MBean's
* ClassLoader. If it is a Java class known to the MBean's
@@ -195,10 +195,10 @@
}
/**
- * Constructs an MBeanInfo
.
+ * Constructs an {@code MBeanInfo}.
*
* @param className The name of the Java class of the MBean described
- * by this MBeanInfo
. This value may be any
+ * by this {@code MBeanInfo}. This value may be any
* syntactically legal Java class name. It does not have to be a
* Java class known to the MBean server or to the MBean's
* ClassLoader. If it is a Java class known to the MBean's
@@ -260,9 +260,9 @@
/**
*
Returns a shallow clone of this instance. - * The clone is obtained by simply calling super.clone(), + * The clone is obtained by simply calling {@code super.clone()}, * thus calling the default native shallow cloning mechanism - * implemented by Object.clone(). + * implemented by {@code Object.clone()}. * No deeper cloning of any internal field is made.
* *Since this class is immutable, the clone method is chiefly of
@@ -281,7 +281,7 @@
/**
* Returns the name of the Java class of the MBean described by
- * this MBeanInfo
.
+ * this {@code MBeanInfo}.
*
* @return the class name.
*/
@@ -300,14 +300,14 @@
/**
* Returns the list of attributes exposed for management.
- * Each attribute is described by an MBeanAttributeInfo
object.
+ * Each attribute is described by an {@code MBeanAttributeInfo} object.
*
* The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
- * references to the MBeanAttributeInfo
objects
- * but that each referenced MBeanAttributeInfo
object is not copied.
+ * references to the {@code MBeanAttributeInfo} objects
+ * but that each referenced {@code MBeanAttributeInfo} object is not copied.
*
- * @return An array of MBeanAttributeInfo
objects.
+ * @return An array of {@code MBeanAttributeInfo} objects.
*/
public MBeanAttributeInfo[] getAttributes() {
MBeanAttributeInfo[] as = nonNullAttributes();
@@ -342,14 +342,14 @@
/**
* Returns the list of operations of the MBean.
- * Each operation is described by an MBeanOperationInfo
object.
+ * Each operation is described by an {@code MBeanOperationInfo} object.
*
* The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
- * references to the MBeanOperationInfo
objects
- * but that each referenced MBeanOperationInfo
object is not copied.
+ * references to the {@code MBeanOperationInfo} objects
+ * but that each referenced {@code MBeanOperationInfo} object is not copied.
*
- * @return An array of MBeanOperationInfo
objects.
+ * @return An array of {@code MBeanOperationInfo} objects.
*/
public MBeanOperationInfo[] getOperations() {
MBeanOperationInfo[] os = nonNullOperations();
@@ -374,12 +374,12 @@
/**
*
Returns the list of the public constructors of the MBean.
* Each constructor is described by an
- * MBeanConstructorInfo
object.
The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
- * references to the MBeanConstructorInfo
objects but
- * that each referenced MBeanConstructorInfo
object
+ * references to the {@code MBeanConstructorInfo} objects but
+ * that each referenced {@code MBeanConstructorInfo} object
* is not copied.
The returned list is not necessarily exhaustive. That is, @@ -388,7 +388,7 @@ * instance of this MBean's class using that constructor, even * though it is not listed here.
* - * @return An array ofMBeanConstructorInfo
objects.
+ * @return An array of {@code MBeanConstructorInfo} objects.
*/
public MBeanConstructorInfo[] getConstructors() {
MBeanConstructorInfo[] cs = nonNullConstructors();
@@ -412,14 +412,14 @@
/**
* Returns the list of the notifications emitted by the MBean.
- * Each notification is described by an MBeanNotificationInfo
object.
+ * Each notification is described by an {@code MBeanNotificationInfo} object.
*
* The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
- * references to the MBeanNotificationInfo
objects
- * but that each referenced MBeanNotificationInfo
object is not copied.
+ * references to the {@code MBeanNotificationInfo} objects
+ * but that each referenced {@code MBeanNotificationInfo} object is not copied.
*
- * @return An array of MBeanNotificationInfo
objects.
+ * @return An array of {@code MBeanNotificationInfo} objects.
*/
public MBeanNotificationInfo[] getNotifications() {
MBeanNotificationInfo[] ns = nonNullNotifications();
@@ -482,7 +482,7 @@
*
* @param o the object to compare to.
*
- * @return true if and only if o
is an MBeanInfo that is equal
+ * @return true if and only if {@code o} is an MBeanInfo that is equal
* to this one according to the rules above.
*/
@Override
@@ -534,12 +534,12 @@
new WeakHashMapsubclass
is known to preserve the
- * immutability of immutableClass
. The class
- * immutableClass
is a reference class that is known
- * to be immutable. The subclass subclass
is
+ * Return true if {@code subclass} is known to preserve the
+ * immutability of {@code immutableClass}. The class
+ * {@code immutableClass} is a reference class that is known
+ * to be immutable. The subclass {@code subclass} is
* considered immutable if it does not override any public method
- * of immutableClass
whose name begins with "get".
+ * of {@code immutableClass} whose name begins with "get".
* This is obviously not an infallible test for immutability,
* but it works for the public interfaces of the MBean*Info classes.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/MBeanNotificationInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/MBeanNotificationInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanNotificationInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,29 +32,29 @@
import java.util.Objects;
/**
- * The MBeanNotificationInfo
class is used to describe the
+ *
The {@code MBeanNotificationInfo} class is used to describe the
* characteristics of the different notification instances
* emitted by an MBean, for a given Java class of notification.
* If an MBean emits notifications that can be instances of different Java classes,
- * then the metadata for that MBean should provide an MBeanNotificationInfo
+ * then the metadata for that MBean should provide an {@code MBeanNotificationInfo}
* object for each of these notification Java classes.
Instances of this class are immutable. Subclasses may be * mutable but this is not recommended.
* - *This class extends javax.management.MBeanFeatureInfo
- * and thus provides name
and description
fields.
- * The name
field should be the fully qualified Java class name of
+ *
This class extends {@code javax.management.MBeanFeatureInfo} + * and thus provides {@code name} and {@code description} fields. + * The {@code name} field should be the fully qualified Java class name of * the notification objects described by this class.
* - *The getNotifTypes
method returns an array of
+ *
The {@code getNotifTypes} method returns an array of
* strings containing the notification types that the MBean may
* emit. The notification type is a dot-notation string which
* describes what the emitted notification is about, not the Java
* class of the notification. A single generic notification class can
* be used to send notifications of several types. All of these types
* are returned in the string array result of the
- * getNotifTypes
method.
+ * {@code getNotifTypes} method.
*
* @since 1.5
*/
@@ -77,7 +77,7 @@
private final transient boolean arrayGettersSafe;
/**
- * Constructs an MBeanNotificationInfo
object.
+ * Constructs an {@code MBeanNotificationInfo} object.
*
* @param notifTypes The array of strings (in dot notation)
* containing the notification types that the MBean may emit.
@@ -93,7 +93,7 @@
}
/**
- * Constructs an MBeanNotificationInfo
object.
+ * Constructs an {@code MBeanNotificationInfo} object.
*
* @param notifTypes The array of strings (in dot notation)
* containing the notification types that the MBean may emit.
@@ -128,9 +128,9 @@
/**
* Returns a shallow clone of this instance.
- * The clone is obtained by simply calling super.clone(),
+ * The clone is obtained by simply calling {@code super.clone()},
* thus calling the default native shallow cloning mechanism
- * implemented by Object.clone().
+ * implemented by {@code Object.clone()}.
* No deeper cloning of any internal field is made.
*/
public Object clone () {
@@ -179,7 +179,7 @@
*
* @param o the object to compare to.
*
- * @return true if and only if o
is an MBeanNotificationInfo
+ * @return true if and only if {@code o} is an MBeanNotificationInfo
* such that its {@link #getName()}, {@link #getDescription()},
* {@link #getDescriptor()},
* and {@link #getNotifTypes()} values are equal (not necessarily
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/MBeanOperationInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/MBeanOperationInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanOperationInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -83,10 +83,7 @@
/**
* @serial The impact of the method, one of
- * INFO
,
- * ACTION
,
- * ACTION_INFO
,
- * UNKNOWN
+ * {@code INFO, ACTION, ACTION_INFO, UNKNOWN}.
*/
private final int impact;
@@ -95,12 +92,12 @@
/**
- * Constructs an MBeanOperationInfo
object. The
+ * Constructs an {@code MBeanOperationInfo} object. The
* {@link Descriptor} of the constructed object will include
* fields contributed by any annotations on the {@code Method}
* object that contain the {@link DescriptorKey} meta-annotation.
*
- * @param method The java.lang.reflect.Method
object
+ * @param method The {@code java.lang.reflect.Method} object
* describing the MBean operation.
* @param description A human readable description of the operation.
*/
@@ -114,11 +111,11 @@
}
/**
- * Constructs an MBeanOperationInfo
object.
+ * Constructs an {@code MBeanOperationInfo} object.
*
* @param name The name of the method.
* @param description A human readable description of the operation.
- * @param signature MBeanParameterInfo
objects
+ * @param signature {@code MBeanParameterInfo} objects
* describing the parameters(arguments) of the method. This may be
* null with the same effect as a zero-length array.
* @param type The type of the method's return value.
@@ -135,11 +132,11 @@
}
/**
- * Constructs an MBeanOperationInfo
object.
+ * Constructs an {@code MBeanOperationInfo} object.
*
* @param name The name of the method.
* @param description A human readable description of the operation.
- * @param signature MBeanParameterInfo
objects
+ * @param signature {@code MBeanParameterInfo} objects
* describing the parameters(arguments) of the method. This may be
* null with the same effect as a zero-length array.
* @param type The type of the method's return value.
@@ -174,9 +171,9 @@
/**
*
Returns a shallow clone of this instance. - * The clone is obtained by simply calling super.clone(), + * The clone is obtained by simply calling {@code super.clone()}, * thus calling the default native shallow cloning mechanism - * implemented by Object.clone(). + * implemented by {@code Object.clone()}. * No deeper cloning of any internal field is made.
* *Since this class is immutable, cloning is chiefly of interest @@ -203,16 +200,16 @@ /** *
Returns the list of parameters for this operation. Each
- * parameter is described by an MBeanParameterInfo
+ * parameter is described by an {@code MBeanParameterInfo}
* object.
The returned array is a shallow copy of the internal array,
* which means that it is a copy of the internal array of
- * references to the MBeanParameterInfo
objects but
- * that each referenced MBeanParameterInfo
object is
+ * references to the {@code MBeanParameterInfo} objects but
+ * that each referenced {@code MBeanParameterInfo} object is
* not copied.
MBeanParameterInfo
objects.
+ * @return An array of {@code MBeanParameterInfo} objects.
*/
public MBeanParameterInfo[] getSignature() {
// If MBeanOperationInfo was created in our implementation,
@@ -247,7 +244,7 @@
/**
* Returns the impact of the method, one of
- * INFO
, ACTION
, ACTION_INFO
, UNKNOWN
.
+ * {@code INFO, ACTION, ACTION_INFO, UNKNOWN}.
*
* @return the impact code.
*/
@@ -280,7 +277,7 @@
*
* @param o the object to compare to.
*
- * @return true if and only if o
is an MBeanOperationInfo such
+ * @return true if and only if {@code o} is an MBeanOperationInfo such
* that its {@link #getName()}, {@link #getReturnType()}, {@link
* #getDescription()}, {@link #getImpact()}, {@link #getDescriptor()}
* and {@link #getSignature()} values are equal (not necessarily identical)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/MBeanParameterInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/MBeanParameterInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/MBeanParameterInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -50,7 +50,7 @@
/**
- * Constructs an MBeanParameterInfo
object.
+ * Constructs an {@code MBeanParameterInfo} object.
*
* @param name The name of the data
* @param type The type or class name of the data
@@ -63,7 +63,7 @@
}
/**
- * Constructs an MBeanParameterInfo
object.
+ * Constructs an {@code MBeanParameterInfo} object.
*
* @param name The name of the data
* @param type The type or class name of the data
@@ -85,9 +85,9 @@
/**
* Returns a shallow clone of this instance. - * The clone is obtained by simply calling super.clone(), + * The clone is obtained by simply calling {@code super.clone()}, * thus calling the default native shallow cloning mechanism - * implemented by Object.clone(). + * implemented by {@code Object.clone()}. * No deeper cloning of any internal field is made.
* *Since this class is immutable, cloning is chiefly of
@@ -126,7 +126,7 @@
*
* @param o the object to compare to.
*
- * @return true if and only if o
is an MBeanParameterInfo such
+ * @return true if and only if {@code o} is an MBeanParameterInfo such
* that its {@link #getName()}, {@link #getType()},
* {@link #getDescriptor()}, and {@link
* #getDescription()} values are equal (not necessarily identical)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/monitor/package.html
--- a/jdk/src/java.management/share/classes/javax/management/monitor/package.html Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/monitor/package.html Wed Jul 05 20:44:51 2017 +0200
@@ -41,20 +41,20 @@
The value being monitored can be a simple value contained within a complex type. For example, the {@link java.lang.management.MemoryMXBean MemoryMXBean} defined in - java.lang.management has an attribute - HeapMemoryUsage of type {@link + {@code java.lang.management} has an attribute + {@code HeapMemoryUsage} of type {@link java.lang.management.MemoryUsage MemoryUsage}. To monitor the - amount of used memory, described by the used - property of MemoryUsage, you could monitor - "HeapMemoryUsage.used". That string would be the + amount of used memory, described by the {@code used} + property of {@code MemoryUsage}, you could monitor + "{@code HeapMemoryUsage.used}". That string would be the argument to {@link javax.management.monitor.MonitorMBean#setObservedAttribute(String) setObservedAttribute}.
-The rules used to interpret an ObservedAttribute like - "HeapMemoryUsage.used" are as follows. Suppose the string is - A.e (so A would be "HeapMemoryUsage" and e - would be "used" in the example).
+The rules used to interpret an {@code ObservedAttribute} like + {@code "HeapMemoryUsage.used"} are as follows. Suppose the string is + A.e (so A would be {@code "HeapMemoryUsage"} and e + would be {@code "used"} in the example).
First the value of the attribute A is obtained. Call it v. A value x is extracted from v as follows:
@@ -65,49 +65,49 @@ CompositeData} and if v.{@link javax.management.openmbean.CompositeData#get(String) get}(e) returns a value then x is that value. -The third rule means for example that if the attribute - HeapMemoryUsage is a MemoryUsage, monitoring - "HeapMemoryUsage.used" will obtain the observed value by - calling MemoryUsage.getUsed().
+ {@code HeapMemoryUsage} is a {@code MemoryUsage}, monitoring + {@code "HeapMemoryUsage.used"} will obtain the observed value by + calling {@code MemoryUsage.getUsed()}. -If the ObservedAttribute contains more than one period, - for example "ConnectionPool.connectionStats.length", then the +
If the {@code ObservedAttribute} contains more than one period, + for example {@code "ConnectionPool.connectionStats.length"}, then the above rules are applied iteratively. Here, v would initially be - the value of the attribute ConnectionPool, and x would + the value of the attribute {@code ConnectionPool}, and x would be derived by applying the above rules with e equal to - "connectionStats". Then v would be set to this x + {@code "connectionStats"}. Then v would be set to this x and a new x derived by applying the rules again with e - equal to "length".
+ equal to {@code "length"}.Although it is recommended that attribute names be valid Java identifiers, it is possible for an attribute to be called - HeapMemoryUsage.used. This means that an - ObservedAttribute that is HeapMemoryUsage.used + {@code HeapMemoryUsage.used}. This means that an + {@code ObservedAttribute} that is {@code HeapMemoryUsage.used} could mean that the value to observe is either an attribute of that - name, or the property used within an attribute called - HeapMemoryUsage. So for compatibility reasons, when the - ObservedAttribute contains a period (.), the monitor + name, or the property {@code used} within an attribute called + {@code HeapMemoryUsage}. So for compatibility reasons, when the + {@code ObservedAttribute} contains a period ({@code .}), the monitor will check whether an attribute exists whose name is the full - ObservedAttribute string (HeapMemoryUsage.used in the + {@code ObservedAttribute} string ({@code HeapMemoryUsage.used} in the example). It does this by calling {@link javax.management.MBeanServer#getMBeanInfo(javax.management.ObjectName) getMBeanInfo} for the observed MBean and looking for a contained {@link javax.management.MBeanAttributeInfo MBeanAttributeInfo} with the given name. If one is found, then that is what is monitored. If more than one MBean is being observed, the behavior is unspecified if some of them have - a HeapMemoryUsage.used attribute and others do not. An - implementation may therefore call getMBeanInfo on just one of + a {@code HeapMemoryUsage.used} attribute and others do not. An + implementation may therefore call {@code getMBeanInfo} on just one of the MBeans in this case. The behavior is also unspecified if the result of the check changes while the monitor is active.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/ArrayType.java --- a/jdk/src/java.management/share/classes/javax/management/openmbean/ArrayType.java Thu Aug 06 11:17:57 2015 -0700 +++ b/jdk/src/java.management/share/classes/javax/management/openmbean/ArrayType.java Wed Jul 05 20:44:51 2017 +0200 @@ -29,7 +29,7 @@ import java.lang.reflect.Array; /** - * TheArrayType
class is the open type class whose instances describe
+ * The {@code ArrayType} class is the open type class whose instances describe
* all open data values which are n-dimensional arrays of open data values.
* * Examples of valid {@code ArrayType} instances are: @@ -222,22 +222,31 @@ /* *** Constructor *** */ /** - * Constructs an ArrayType instance describing open data values which are - * arrays with dimension dimension of elements whose open type is elementType. + * Constructs an {@code ArrayType} instance describing open data values which are + * arrays with dimension dimension of elements + * whose open type is elementType. *
- * When invoked on an ArrayType instance, the {@link OpenType#getClassName() getClassName} method
- * returns the class name of the array instances it describes (following the rules defined by the
- * {@link Class#getName() getName} method of java.lang.Class
), not the class name of the array elements
- * (which is returned by a call to getElementOpenType().getClassName()).
+ * When invoked on an {@code ArrayType} instance,
+ * the {@link OpenType#getClassName() getClassName} method
+ * returns the class name of the array instances it describes
+ * (following the rules defined by the
+ * {@link Class#getName() getName} method of {@code java.lang.Class}),
+ * not the class name of the array elements
+ * (which is returned by a call to {@code getElementOpenType().getClassName()}).
*
- * The internal field corresponding to the type name of this ArrayType
instance is also set to
+ * The internal field corresponding to the type name of this
+ * {@code ArrayType} instance is also set to
* the class name of the array instances it describes.
- * In other words, the methods getClassName
and getTypeName
return the same string value.
- * The internal field corresponding to the description of this ArrayType
instance is set to a string value
+ * In other words, the methods {@code getClassName} and
+ * {@code getTypeName} return the same string value.
+ * The internal field corresponding to the description of this
+ * {@code ArrayType} instance is set to a string value
* which follows the following template:
*
<dimension>-dimension array
+ * of <element_class_name>
<dimension>-dimension array
+ * of <primitive_type_of_the_element_class_name>
* As an example, the following piece of code: @@ -267,16 +276,16 @@ * System.out.println("array type description = " + t3.getDescription()); * } * - * @param dimension the dimension of arrays described by this ArrayType instance; + * @param dimension the dimension of arrays described by this {@code ArrayType} instance; * must be greater than or equal to 1. * * @param elementType the open type of element values contained - * in the arrays described by this ArrayType + * in the arrays described by this {@code ArrayType} * instance; must be an instance of either - * SimpleType, CompositeType, - * TabularType or another ArrayType - * with a SimpleType, CompositeType - * or TabularType as its elementType. + * {@code SimpleType}, {@code CompositeType}, + * {@code TabularType} or another {@code ArrayType} + * with a {@code SimpleType}, {@code CompositeType} + * or {@code TabularType} as its {@code elementType}. * * @throws IllegalArgumentException if {@code dimension} is not a positive * integer. @@ -318,19 +327,27 @@ * returns the {@link SimpleType} corresponding to the wrapper * type of the primitive type of the array. *
- * When invoked on an ArrayType instance, the {@link OpenType#getClassName() getClassName} method
- * returns the class name of the array instances it describes (following the rules defined by the
- * {@link Class#getName() getName} method of java.lang.Class
), not the class name of the array elements
- * (which is returned by a call to getElementOpenType().getClassName()).
+ * When invoked on an {@code ArrayType} instance,
+ * the {@link OpenType#getClassName() getClassName} method
+ * returns the class name of the array instances it describes
+ * (following the rules defined by the
+ * {@link Class#getName() getName} method of {@code java.lang.Class}),
+ * not the class name of the array elements
+ * (which is returned by a call to {@code getElementOpenType().getClassName()}).
*
- * The internal field corresponding to the type name of this ArrayType
instance is also set to
+ * The internal field corresponding to the type name of this
+ * {@code ArrayType} instance is also set to
* the class name of the array instances it describes.
- * In other words, the methods getClassName
and getTypeName
return the same string value.
- * The internal field corresponding to the description of this ArrayType
instance is set to a string value
+ * In other words, the methods {@code getClassName} and
+ * {@code getTypeName} return the same string value.
+ * The internal field corresponding to the description
+ * of this {@code ArrayType} instance is set to a string value
* which follows the following template:
*
1-dimension array
+ * of <element_class_name>
1-dimension array
+ * of <primitive_type_of_the_element_class_name>
* As an example, the following piece of code:
@@ -483,7 +500,7 @@
/* *** ArrayType specific information methods *** */
/**
- * Returns the dimension of arrays described by this ArrayType instance.
+ * Returns the dimension of arrays described by this {@code ArrayType} instance.
*
* @return the dimension.
*/
@@ -493,7 +510,8 @@
}
/**
- * Returns the open type of element values contained in the arrays described by this ArrayType instance.
+ * Returns the open type of element values contained
+ * in the arrays described by this {@code ArrayType} instance.
*
* @return the element type.
*/
@@ -503,8 +521,8 @@
}
/**
- * Returns true
if the open data values this open
- * type describes are primitive arrays, false
otherwise.
+ * Returns {@code true} if the open data values this open
+ * type describes are primitive arrays, {@code false} otherwise.
*
* @return true if this is a primitive array type.
*
@@ -516,32 +534,32 @@
}
/**
- * Tests whether obj is a value for this ArrayType
+ * Tests whether obj is a value for this {@code ArrayType}
* instance.
*
- * This method returns true
if and only if obj
+ * This method returns {@code true} if and only if obj
* is not null, obj is an array and any one of the following
- * is true:
+ * is {@code true}:
*
*
ArrayType
instance describes an array of
- * SimpleType elements or their corresponding primitive types,
+ * ArrayType
instance (i.e. the class name returned
+ * for this {@code ArrayType} instance (i.e. the class name returned
* by the {@link OpenType#getClassName() getClassName} method, which
* includes the dimension information),ArrayType
instance describes an array of
+ * ArrayType
instance.true
if obj is a value for this
- * ArrayType
instance.
+ * @return {@code true} if obj is a value for this
+ * {@code ArrayType} instance.
*/
public boolean isValue(Object obj) {
@@ -649,21 +667,21 @@
/* *** Methods overriden from class Object *** */
/**
- * Compares the specified obj
parameter with this
- * ArrayType
instance for equality.
+ * Compares the specified {@code obj} parameter with this
+ * {@code ArrayType} instance for equality.
*
- * Two ArrayType
instances are equal if and only if they
+ * Two {@code ArrayType} instances are equal if and only if they
* describe array instances which have the same dimension, elements'
* open type and primitive array flag.
*
* @param obj the object to be compared for equality with this
- * ArrayType
instance; if obj
- * is null
or is not an instance of the
- * class ArrayType
this method returns
- * false
.
+ * {@code ArrayType} instance; if obj
+ * is {@code null} or is not an instance of the
+ * class {@code ArrayType} this method returns
+ * {@code false}.
*
- * @return true
if the specified object is equal to
- * this ArrayType
instance.
+ * @return {@code true} if the specified object is equal to
+ * this {@code ArrayType} instance.
*/
public boolean equals(Object obj) {
@@ -697,25 +715,25 @@
}
/**
- * Returns the hash code value for this ArrayType
instance.
+ * Returns the hash code value for this {@code ArrayType} instance.
*
- * The hash code of an ArrayType
instance is the sum of the
- * hash codes of all the elements of information used in equals
+ * The hash code of an {@code ArrayType} instance is the sum of the
+ * hash codes of all the elements of information used in {@code equals}
* comparisons (i.e. dimension, elements' open type and primitive array flag).
* The hashcode for a primitive value is the hashcode of the corresponding boxed
- * object (e.g. the hashcode for true is Boolean.TRUE.hashCode()).
- * This ensures that t1.equals(t2)
implies that
- * t1.hashCode()==t2.hashCode()
for any two
- * ArrayType
instances t1
and t2
,
+ * object (e.g. the hashcode for {@code true} is {@code Boolean.TRUE.hashCode()}).
+ * This ensures that {@code t1.equals(t2)} implies that
+ * {@code t1.hashCode()==t2.hashCode()} for any two
+ * {@code ArrayType} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
- * As ArrayType
instances are immutable, the hash
+ * As {@code ArrayType} instances are immutable, the hash
* code for this instance is calculated once, on the first call
- * to hashCode
, and then the same value is returned
+ * to {@code hashCode}, and then the same value is returned
* for subsequent calls.
*
- * @return the hash code value for this ArrayType
instance
+ * @return the hash code value for this {@code ArrayType} instance
*/
public int hashCode() {
@@ -735,19 +753,19 @@
}
/**
- * Returns a string representation of this ArrayType
instance.
+ * Returns a string representation of this {@code ArrayType} instance.
*
* The string representation consists of the name of this class (i.e.
- * javax.management.openmbean.ArrayType
), the type name,
+ * {@code javax.management.openmbean.ArrayType}), the type name,
* the dimension, the elements' open type and the primitive array flag
* defined for this instance.
*
- * As
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * This ensures that this equals method works properly for
+ * This ensures that this {@code equals} method works properly for
* obj parameters which are different implementations of the
- *
- * The hash code of a
- * This ensures that
@@ -156,18 +162,19 @@
* for arrays of object reference types or the appropriate overloading
* of {@code Arrays.hashCode(e)} for arrays of primitive types.
*
- * @return the hash code value for this
* The string representation consists of the name of the implementing class,
- * the string representation of the composite type of this instance, and the string representation of the contents
+ * the string representation of the composite type of this instance,
+ * and the string representation of the contents
* (ie list the itemName=itemValue mappings).
*
- * @return a string representation of this Constructs a CompositeDataSupport instance with the specified
- * compositeType, whose item values
- * are specified by itemValues[], in the same order as in
- * itemNames[].
- * As a CompositeType does not specify any order on its items,
- * the itemNames[] parameter is used
- * to specify the order in which the values are given in itemValues[].
- * The items contained in this CompositeDataSupport instance are
- * internally stored in a TreeMap,
+ * Constructs a {@code CompositeDataSupport} instance with the specified
+ * {@code compositeType}, whose item values
+ * are specified by {@code itemValues[]}, in the same order as in
+ * {@code itemNames[]}.
+ * As a {@code CompositeType} does not specify any order on its items,
+ * the {@code itemNames[]} parameter is used
+ * to specify the order in which the values are given in {@code itemValues[]}.
+ * The items contained in this {@code CompositeDataSupport} instance are
+ * internally stored in a {@code TreeMap},
* thus sorted in ascending lexicographic order of their names, for faster
* retrieval of individual item values.
- * Constructs a CompositeDataSupport instance with the specified compositeType, whose item names and corresponding values
- * are given by the mappings in the map items.
+ * Constructs a {@code CompositeDataSupport} instance with the specified {@code compositeType},
+ * whose item names and corresponding values
+ * are given by the mappings in the map {@code items}.
* This constructor converts the keys to a string array and the values to an object array and calls
- * CompositeDataSupport(javax.management.openmbean.CompositeType, java.lang.String[], java.lang.Object[]).
+ * {@code CompositeDataSupport(javax.management.openmbean.CompositeType, java.lang.String[], java.lang.Object[])}.
*
* @param compositeType the composite type of this composite data instance;
* must not be null.
* @param items the mappings of all the item names to their values;
- * items must contain all the item names defined in compositeType;
+ * {@code items} must contain all the item names defined in {@code compositeType};
* must not be null or empty.
*
- * @throws IllegalArgumentException compositeType is null, or
- * items is null or empty, or one of the keys in items is a null
+ * @throws IllegalArgumentException {@code compositeType} is null, or
+ * {@code items} is null or empty, or one of the keys in {@code items} is a null
* or empty string.
- * @throws OpenDataException items' size differs from the
- * number of items defined in compositeType, or one of the
- * keys in items does not exist as an item name defined in
- * compositeType, or one of the values in items
+ * @throws OpenDataException {@code items}' size differs from the
+ * number of items defined in {@code compositeType}, or one of the
+ * keys in {@code items} does not exist as an item name defined in
+ * {@code compositeType}, or one of the values in {@code items}
* is not a valid value for the corresponding item as defined in
- * compositeType.
- * @throws ArrayStoreException one or more keys in items is not of
- * the class java.lang.String.
+ * {@code compositeType}.
+ * @throws ArrayStoreException one or more keys in {@code items} is not of
+ * the class {@code java.lang.String}.
*/
public CompositeDataSupport(CompositeType compositeType,
Map
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * This ensures that this equals method works properly for
+ * This ensures that this {@code equals} method works properly for
* obj parameters which are different implementations of the
*
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of an
- * This ensures that
- * The string representation consists of the name of this class (ie
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of an
- * This ensures that
- * The string representation consists of the name of this class (ie
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of an
- * This ensures that
- * The string representation consists of the name of this class (ie
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of an
- * This ensures that
- * The string representation consists of the name of this class (ie
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of an
- * This ensures that
- * The string representation consists of the name of this class (ie
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of a
- * This ensures that
* The string representation consists of the name of the implementing class,
* and the tabular type of this instance.
*
- * @return a string representation of this
- * This constructor simply calls this(tabularType, 101, 0.75f);
+ * This constructor simply calls {@code this(tabularType, 101, 0.75f);}
*
- * @param tabularType the tabular type describing this TabularData instance;
- * cannot be null.
+ * @param tabularType the tabular type describing this
+ * {@code TabularData} instance; cannot be null.
*
* @throws IllegalArgumentException if the tabular type is null.
*/
@@ -118,10 +121,10 @@
}
/**
- * Creates an empty TabularDataSupport instance whose open-type is tabularType,
- * and whose underlying HashMap has the specified initial capacity and load factor.
+ * Creates an empty {@code TabularDataSupport} instance whose open-type is tabularType,
+ * and whose underlying {@code HashMap} has the specified initial capacity and load factor.
*
- * @param tabularType the tabular type describing this TabularData instance;
+ * @param tabularType the tabular type describing this {@code TabularData} instance;
* cannot be null.
*
* @param initialCapacity the initial capacity of the HashMap.
@@ -167,7 +170,7 @@
/**
- * Returns the tabular type describing this TabularData instance.
+ * Returns the tabular type describing this {@code TabularData} instance.
*/
public TabularType getTabularType() {
@@ -175,21 +178,22 @@
}
/**
- * Calculates the index that would be used in this TabularData instance to refer to the specified
- * composite data value parameter if it were added to this instance.
+ * Calculates the index that would be used in this {@code TabularData} instance to refer
+ * to the specified composite data value parameter if it were added to this instance.
* This method checks for the type validity of the specified value,
- * but does not check if the calculated index is already used to refer to a value in this TabularData instance.
+ * but does not check if the calculated index is already used
+ * to refer to a value in this {@code TabularData} instance.
*
* @param value the composite data value whose index in this
- * TabularData instance is to be calculated;
+ * {@code TabularData} instance is to be calculated;
* must be of the same composite type as this instance's row type;
* must not be null.
*
- * @return the index that the specified value would have in this TabularData instance.
+ * @return the index that the specified value would have in this {@code TabularData} instance.
*
- * @throws NullPointerException if value is null.
+ * @throws NullPointerException if value is {@code null}.
*
- * @throws InvalidOpenTypeException if value does not conform to this TabularData instance's
+ * @throws InvalidOpenTypeException if value does not conform to this {@code TabularData} instance's
* row type definition.
*/
public Object[] calculateIndex(CompositeData value) {
@@ -210,14 +214,14 @@
/**
- * Returns true if and only if this TabularData instance contains a CompositeData value
+ * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
* (ie a row) whose index is the specified key. If key cannot be cast to a one dimension array
- * of Object instances, this method simply returns false; otherwise it returns the result of the call to
- * this.containsKey((Object[]) key).
+ * of Object instances, this method simply returns {@code false}; otherwise it returns the result of the call to
+ * {@code this.containsKey((Object[]) key)}.
*
- * @param key the index value whose presence in this TabularData instance is to be tested.
+ * @param key the index value whose presence in this {@code TabularData} instance is to be tested.
*
- * @return true if this TabularData indexes a row value with the specified key.
+ * @return {@code true} if this {@code TabularData} indexes a row value with the specified key.
*/
public boolean containsKey(Object key) {
@@ -234,13 +238,13 @@
}
/**
- * Returns true if and only if this TabularData instance contains a CompositeData value
- * (ie a row) whose index is the specified key. If key is null or does not conform to
- * this TabularData instance's TabularType definition, this method simply returns false.
+ * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
+ * (ie a row) whose index is the specified key. If key is {@code null} or does not conform to
+ * this {@code TabularData} instance's {@code TabularType} definition, this method simply returns {@code false}.
*
- * @param key the index value whose presence in this TabularData instance is to be tested.
+ * @param key the index value whose presence in this {@code TabularData} instance is to be tested.
*
- * @return true if this TabularData indexes a row value with the specified key.
+ * @return {@code true} if this {@code TabularData} indexes a row value with the specified key.
*/
public boolean containsKey(Object[] key) {
@@ -248,13 +252,13 @@
}
/**
- * Returns true if and only if this TabularData instance contains the specified
- * CompositeData value. If value is null or does not conform to
- * this TabularData instance's row type definition, this method simply returns false.
+ * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
+ * {@code CompositeData} value. If value is {@code null} or does not conform to
+ * this {@code TabularData} instance's row type definition, this method simply returns {@code false}.
*
- * @param value the row value whose presence in this TabularData instance is to be tested.
+ * @param value the row value whose presence in this {@code TabularData} instance is to be tested.
*
- * @return true if this TabularData instance contains the specified row value.
+ * @return {@code true} if this {@code TabularData} instance contains the specified row value.
*/
public boolean containsValue(CompositeData value) {
@@ -262,12 +266,12 @@
}
/**
- * Returns true if and only if this TabularData instance contains the specified
+ * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
* value.
*
- * @param value the row value whose presence in this TabularData instance is to be tested.
+ * @param value the row value whose presence in this {@code TabularData} instance is to be tested.
*
- * @return true if this TabularData instance contains the specified row value.
+ * @return {@code true} if this {@code TabularData} instance contains the specified row value.
*/
public boolean containsValue(Object value) {
@@ -275,12 +279,13 @@
}
/**
- * This method simply calls get((Object[]) key).
+ * This method simply calls {@code get((Object[]) key)}.
*
- * @throws NullPointerException if the key is null
- * @throws ClassCastException if the key is not of the type Object[]
- * @throws InvalidKeyException if the key does not conform to this TabularData instance's
- * TabularType definition
+ * @throws NullPointerException if the key is {@code null}
+ * @throws ClassCastException if the key is not of the type {@code Object[]}
+ * @throws InvalidKeyException if the key does not conform
+ * to this {@code TabularData} instance's
+ * {@code TabularType} definition
*/
public Object get(Object key) {
@@ -288,20 +293,21 @@
}
/**
- * Returns the CompositeData value whose index is
- * key, or null if there is no value mapping
- * to key, in this TabularData instance.
+ * Returns the {@code CompositeData} value whose index is
+ * key, or {@code null} if there is no value mapping
+ * to key, in this {@code TabularData} instance.
*
* @param key the index of the value to get in this
- * TabularData instance; * must be valid with this
- * TabularData instance's row type definition; * must not
+ * {@code TabularData} instance; must be valid with this
+ * {@code TabularData} instance's row type definition; must not
* be null.
*
* @return the value corresponding to key.
*
- * @throws NullPointerException if the key is null
- * @throws InvalidKeyException if the key does not conform to this TabularData instance's
- * TabularType type definition.
+ * @throws NullPointerException if the key is {@code null}
+ * @throws InvalidKeyException if the key does not conform
+ * to this {@code TabularData} instance's
+ * {@code TabularType} type definition.
*/
public CompositeData get(Object[] key) {
@@ -322,23 +328,23 @@
/**
- * This method simply calls put((CompositeData) value) and
- * therefore ignores its key parameter which can be null.
+ * This method simply calls {@code put((CompositeData) value)} and
+ * therefore ignores its key parameter which can be {@code null}.
*
* @param key an ignored parameter.
* @param value the {@link CompositeData} to put.
*
* @return the value which is put
*
- * @throws NullPointerException if the value is null
+ * @throws NullPointerException if the value is {@code null}
* @throws ClassCastException if the value is not of
- * the type CompositeData
+ * the type {@code CompositeData}
* @throws InvalidOpenTypeException if the value does
- * not conform to this TabularData instance's
- * TabularType definition
+ * not conform to this {@code TabularData} instance's
+ * {@code TabularType} definition
* @throws KeyAlreadyExistsException if the key for the
* value parameter, calculated according to this
- * TabularData instance's TabularType definition
+ * {@code TabularData} instance's {@code TabularType} definition
* already maps to an existing value
*/
public Object put(Object key, Object value) {
@@ -363,17 +369,17 @@
}
/**
- * This method simply calls remove((Object[]) key).
+ * This method simply calls {@code remove((Object[]) key)}.
*
- * @param key an Object[] representing the key to remove.
+ * @param key an {@code Object[]} representing the key to remove.
*
- * @return previous value associated with specified key, or null
+ * @return previous value associated with specified key, or {@code null}
* if there was no mapping for key.
*
- * @throws NullPointerException if the key is null
- * @throws ClassCastException if the key is not of the type Object[]
- * @throws InvalidKeyException if the key does not conform to this TabularData instance's
- * TabularType definition
+ * @throws NullPointerException if the key is {@code null}
+ * @throws ClassCastException if the key is not of the type {@code Object[]}
+ * @throws InvalidKeyException if the key does not conform to this {@code TabularData} instance's
+ * {@code TabularType} definition
*/
public Object remove(Object key) {
@@ -381,19 +387,19 @@
}
/**
- * Removes the CompositeData value whose index is key from this TabularData instance,
- * and returns the removed value, or returns null if there is no value whose index is key.
+ * Removes the {@code CompositeData} value whose index is key from this {@code TabularData} instance,
+ * and returns the removed value, or returns {@code null} if there is no value whose index is key.
*
- * @param key the index of the value to get in this TabularData instance;
- * must be valid with this TabularData instance's row type definition;
+ * @param key the index of the value to get in this {@code TabularData} instance;
+ * must be valid with this {@code TabularData} instance's row type definition;
* must not be null.
*
- * @return previous value associated with specified key, or null
+ * @return previous value associated with specified key, or {@code null}
* if there was no mapping for key.
*
- * @throws NullPointerException if the key is null
- * @throws InvalidKeyException if the key does not conform to this TabularData instance's
- * TabularType definition
+ * @throws NullPointerException if the key is {@code null}
+ * @throws InvalidKeyException if the key does not conform to this {@code TabularData} instance's
+ * {@code TabularType} definition
*/
public CompositeData remove(Object[] key) {
@@ -414,30 +420,30 @@
/**
* Add all the values contained in the specified map t
- * to this TabularData instance. This method converts
+ * to this {@code TabularData} instance. This method converts
* the collection of values contained in this map into an array of
- * CompositeData values, if possible, and then call the
- * method putAll(CompositeData[]). Note that the keys
+ * {@code CompositeData} values, if possible, and then call the
+ * method {@code putAll(CompositeData[])}. Note that the keys
* used in the specified map t are ignored. This method
* allows, for example to add the content of another
- * TabularData instance with the same row type (but
+ * {@code TabularData} instance with the same row type (but
* possibly different index names) into this instance.
*
* @param t the map whose values are to be added as new rows to
- * this TabularData instance; if t is
- * null or empty, this method returns without doing
+ * this {@code TabularData} instance; if t is
+ * {@code null} or empty, this method returns without doing
* anything.
*
* @throws NullPointerException if a value in t is
- * null.
+ * {@code null}.
* @throws ClassCastException if a value in t is not an
- * instance of CompositeData.
+ * instance of {@code CompositeData}.
* @throws InvalidOpenTypeException if a value in t
- * does not conform to this TabularData instance's row
+ * does not conform to this {@code TabularData} instance's row
* type definition.
* @throws KeyAlreadyExistsException if the index for a value in
* t, calculated according to this
- * TabularData instance's TabularType definition
+ * {@code TabularData} instance's {@code TabularType} definition
* already maps to an existing value in this instance, or two
* values in t have the same index.
*/
@@ -449,14 +455,14 @@
return;
}
- // Convert the values in t into an array of CompositeData
+ // Convert the values in t into an array of {@code CompositeData}
//
CompositeData[] values;
try {
values =
t.values().toArray(new CompositeData[t.size()]);
} catch (java.lang.ArrayStoreException e) {
- throw new ClassCastException("Map argument t contains values which are not instances of CompositeData");
+ throw new ClassCastException("Map argument t contains values which are not instances of {@code CompositeData}");
}
// Add the array of values
@@ -466,30 +472,30 @@
/**
* Add all the elements in values to this
- * TabularData instance. If any element in
+ * {@code TabularData} instance. If any element in
* values does not satisfy the constraints defined in
- * {@link #put(CompositeData) put}, or if any two
+ * {@link #put(CompositeData) put}, or if any two
* elements in values have the same index calculated
- * according to this TabularData instance's
- * TabularType definition, then an exception describing
+ * according to this {@code TabularData} instance's
+ * {@code TabularType} definition, then an exception describing
* the failure is thrown and no element of values is
- * added, thus leaving this TabularData instance
+ * added, thus leaving this {@code TabularData} instance
* unchanged.
*
* @param values the array of composite data values to be added as
- * new rows to this TabularData instance; if
- * values is null or empty, this method
+ * new rows to this {@code TabularData} instance; if
+ * values is {@code null} or empty, this method
* returns without doing anything.
*
* @throws NullPointerException if an element of values
- * is null
+ * is {@code null}
* @throws InvalidOpenTypeException if an element of
* values does not conform to this
- * TabularData instance's row type definition (ie its
- * TabularType definition)
+ * {@code TabularData} instance's row type definition (ie its
+ * {@code TabularType} definition)
* @throws KeyAlreadyExistsException if the index for an element
* of values, calculated according to this
- * TabularData instance's TabularType definition
+ * {@code TabularData} instance's {@code TabularType} definition
* already maps to an existing value in this instance, or two
* elements of values have the same index
*/
@@ -529,7 +535,7 @@
}
/**
- * Removes all rows from this
- * Returns true if and only if all of the following statements are true:
+ * Returns {@code true} if and only if all of the following statements are true:
*
- * The hash code of a
- * This ensures that
- * However, note that another instance of a class implementing the
- * The string representation consists of the name of this class (ie The serialVersionUID of this class is The serialVersionUID of this class is {@code 2504952983494636987L}.
*
* @since 1.5
*/
@@ -89,8 +89,8 @@
private static final long serialVersionUID;
/**
* @serialField name String Role name
- * @serialField isReadable boolean Read access mode: Constructs an Constructs an {@code RMIConnector} that will connect
* the RMI connector server with the given address. The address can refer directly to the connector server,
@@ -153,7 +153,7 @@
* service:jmx:iiop://[host[:port]]/ior/encoded-IOR
*
*
- * (Here, the square brackets (Here, the square brackets {@code []} are not part of the
* address but indicate that the host and port are optional.) The address can instead indicate where to find an RMI stub
@@ -179,7 +179,7 @@
* InitialContext#InitialContext(Hashtable) InitialContext}. This
* parameter can be null, which is equivalent to an empty Map.
*
- * @exception IllegalArgumentException if Constructs an Constructs an {@code RMIConnector} using the given RMI stub.
*
* @param rmiServer an RMI stub representing the RMI connector server.
* @param environment additional attributes specifying how to make
* the connection. This parameter can be null, which is
* equivalent to an empty Map.
*
- * @exception IllegalArgumentException if Returns a string representation of this object. In general,
- * the This method then calls This method then calls {@code s.defaultWriteObject()}.
* Usually, rmiServer is null if this object
* was constructed with a JMXServiceURL, and jmxServiceURL
* is null if this object is constructed with a RMIServer stub.
@@ -1939,9 +1939,9 @@
* Lookup the RMIServer stub in a directory.
* @param jndiURL A JNDI URL indicating the location of the Stub
* (see {@link javax.management.remote.rmi}), e.g.:
- * This method will modify env and save
+ * This method will modify {@code env} and save
* a reference to it. The caller may no longer modify it.
*
* @param env environment passed to initial context constructor.
@@ -195,7 +195,7 @@
* may in turn contain values that come from system properties,
* or application resource files.
*
- * If concat is true and both the environment and the provider
+ * If {@code concat} is true and both the environment and the provider
* resource file contain the property, the two values are concatenated
* (with a ':' separator).
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/Binding.java
--- a/jdk/src/java.naming/share/classes/javax/naming/Binding.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/Binding.java Wed Jul 05 20:44:51 2017 +0200
@@ -49,7 +49,7 @@
/**
* Contains this binding's object.
* It is initialized by the constructor and can be updated using
- * setObject.
+ * {@code setObject}.
* @serial
* @see #getObject
* @see #setObject
@@ -59,9 +59,9 @@
/**
* Constructs an instance of a Binding given its name and object.
*
- * getClassName() will return
- * the class name of obj (or null if obj is null)
- * unless the class name has been explicitly set using setClassName()
+ * {@code getClassName()} will return
+ * the class name of {@code obj} (or null if {@code obj} is null)
+ * unless the class name has been explicitly set using {@code setClassName()}
*
* @param name The non-null name of the object. It is relative
* to the target context (which is
@@ -78,9 +78,9 @@
* Constructs an instance of a Binding given its name, object, and whether
* the name is relative.
*
- * getClassName() will return the class name of obj
- * (or null if obj is null) unless the class name has been
- * explicitly set using setClassName()
+ * {@code getClassName()} will return the class name of {@code obj}
+ * (or null if {@code obj} is null) unless the class name has been
+ * explicitly set using {@code setClassName()}
*
* @param name The non-null string name of the object.
* @param obj The possibly null object bound to name.
@@ -104,9 +104,9 @@
* to the target context (which is
* named by the first parameter of the
* This field is initialized to null.
@@ -112,9 +112,9 @@
/**
* Contains the context relative to which
- *
* This field is initialized to null.
@@ -189,16 +189,16 @@
/**
* Sets the "remaining new name" field of this exception.
- * This is the value returned by
- * newName is a composite name. If the intent is to set
+ * {@code newName} is a composite name. If the intent is to set
* this field using a compound name or string, you must
* "stringify" the compound name, and create a composite
* name with a single component using the string. You can then
* invoke this method using the resulting composite name.
*
- * A copy of
@@ -47,31 +47,31 @@
* The second version instead has a link to the first: the same
* documentation applies to both.
*
- * For systems that support federation, String name arguments to
- * Context methods are composite names. Name arguments that are
- * instances of CompositeName are treated as composite names,
- * while Name arguments that are not instances of
- * CompositeName are treated as compound names (which might be
- * instances of CompoundName or other implementations of compound
- * names). This allows the results of NameParser.parse() to be used as
- * arguments to the Context methods.
+ * For systems that support federation, {@code String} name arguments to
+ * {@code Context} methods are composite names. Name arguments that are
+ * instances of {@code CompositeName} are treated as composite names,
+ * while {@code Name} arguments that are not instances of
+ * {@code CompositeName} are treated as compound names (which might be
+ * instances of {@code CompoundName} or other implementations of compound
+ * names). This allows the results of {@code NameParser.parse()} to be used as
+ * arguments to the {@code Context} methods.
* Prior to JNDI 1.2, all name arguments were treated as composite names.
*
* Furthermore, for systems that support federation, all names returned
- * in a NamingEnumeration
- * from list() and listBindings() are composite names
+ * in a {@code NamingEnumeration}
+ * from {@code list()} and {@code listBindings()} are composite names
* represented as strings.
- * See CompositeName for the string syntax of names.
+ * See {@code CompositeName} for the string syntax of names.
*
* For systems that do not support federation, the name arguments (in
- * either Name or String forms) and the names returned in
- * NamingEnumeration may be names in their own namespace rather than
+ * either {@code Name} or {@code String} forms) and the names returned in
+ * {@code NamingEnumeration} may be names in their own namespace rather than
* names in a composite namespace, at the discretion of the service
* provider.
*
*
* For purposes of concurrency control,
- * a Context operation that returns a NamingEnumeration is
+ * a Context operation that returns a {@code NamingEnumeration} is
* not considered to have completed while the enumeration is still in
* use, or while any referrals generated by that operation are still
* being followed.
*
*
*
* The environment is inherited from the parent context as
@@ -145,7 +145,7 @@
* application components and service providers may be distributed
* along with resource files.
* A JNDI resource file is a file in the properties file format (see
- * {@link java.util.Properties#load java.util.Properties}),
+ * {@link java.util.Properties#load java.util.Properties}),
* containing a list of key/value pairs.
* The key is the name of the property (e.g. "java.naming.factory.object")
* and the value is a string in the format defined
@@ -170,18 +170,18 @@
* Each service provider has an optional resource that lists properties
* specific to that provider. The name of this resource is:
*
*
@@ -204,11 +204,11 @@
*
* When an application is deployed, it will generally have several
* codebase directories and JARs in its classpath. JNDI locates (using
- * {@link ClassLoader#getResources ClassLoader.getResources()})
- * all application resource files named jndi.properties
+ * {@link ClassLoader#getResources ClassLoader.getResources()})
+ * all application resource files named {@code jndi.properties}
* in the classpath.
* In addition, if the Java installation directory contains a built-in
- * properties file, typically conf/jndi.properties,
+ * properties file, typically {@code conf/jndi.properties},
* JNDI treats it as an additional application resource file.
* All of the properties contained in these files are placed
* into the environment of the initial context. This environment
@@ -220,7 +220,7 @@
* sense to do so, it concatenates all of the values (details are given
* below).
* For example, if the "java.naming.factory.object" property is found in
- * three jndi.properties resource files, the
+ * three {@code jndi.properties} resource files, the
* list of object factories is a concatenation of the property
* values from all three files.
* Using this scheme, each deployable component is responsible for
@@ -234,7 +234,7 @@
* is initialized with properties defined in the environment parameter
* passed to the constructor, the system properties,
* and the application resource files. See
- * InitialContext
+ * {@code InitialContext}
* for details.
* This initial environment is then inherited by other context instances.
*
@@ -244,7 +244,7 @@
* the values from the following two sources, in order:
* If the object is a DirContext, any existing attributes
+ * If the object is a {@code DirContext}, any existing attributes
* associated with the name are replaced with those of the object.
* Otherwise, any existing attributes associated with the name remain
* unchanged.
@@ -388,7 +388,7 @@
* This method is idempotent.
* It succeeds even if the terminal atomic name
* is not bound in the target context, but throws
- * NameNotFoundException
+ * {@code NameNotFoundException}
* if any of the intermediate contexts do not exist.
*
* Any attributes associated with the name are removed.
@@ -424,7 +424,7 @@
* the name of the existing binding; may not be empty
* @param newName
* the name of the new binding; may not be empty
- * @throws NameAlreadyBoundException if newName is already bound
+ * @throws NameAlreadyBoundException if {@code newName} is already bound
* @throws NamingException if a naming exception is encountered
*
* @see #rename(String, String)
@@ -442,7 +442,7 @@
* the name of the existing binding; may not be empty
* @param newName
* the name of the new binding; may not be empty
- * @throws NameAlreadyBoundException if newName is already bound
+ * @throws NameAlreadyBoundException if {@code newName} is already bound
* @throws NamingException if a naming exception is encountered
*/
public void rename(String oldName, String newName) throws NamingException;
@@ -459,7 +459,7 @@
* the name of the context to list
* @return an enumeration of the names and class names of the
* bindings in this context. Each element of the
- * enumeration is of type NameClassPair.
+ * enumeration is of type {@code NameClassPair}.
* @throws NamingException if a naming exception is encountered
*
* @see #list(String)
@@ -478,7 +478,7 @@
* the name of the context to list
* @return an enumeration of the names and class names of the
* bindings in this context. Each element of the
- * enumeration is of type NameClassPair.
+ * enumeration is of type {@code NameClassPair}.
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumeration This method is idempotent.
* It succeeds even if the terminal atomic name
* is not bound in the target context, but throws
- * NameNotFoundException
+ * {@code NameNotFoundException}
* if any of the intermediate contexts do not exist.
*
* In a federated naming system, a context from one naming system
@@ -537,11 +537,11 @@
* look up and perform operations on the foreign context using a
* composite name. However, an attempt destroy the context using
* this composite name will fail with
- * NotContextException, because the foreign context is not
+ * {@code NotContextException}, because the foreign context is not
* a "subcontext" of the context in which it is bound.
- * Instead, use unbind() to remove the
+ * Instead, use {@code unbind()} to remove the
* binding of the foreign context. Destroying the foreign context
- * requires that the destroySubcontext() be performed
+ * requires that the {@code destroySubcontext()} be performed
* on a context from the foreign context's "native" naming system.
*
* @param name
@@ -611,12 +611,12 @@
/**
* Retrieves the named object, following links except
* for the terminal atomic component of the name.
- * If the object bound to name is not a link,
+ * If the object bound to {@code name} is not a link,
* returns the object itself.
*
* @param name
* the name of the object to look up
- * @return the object bound to name, not following the
+ * @return the object bound to {@code name}, not following the
* terminal link (if any).
* @throws NamingException if a naming exception is encountered
*
@@ -631,7 +631,7 @@
*
* @param name
* the name of the object to look up
- * @return the object bound to name, not following the
+ * @return the object bound to {@code name}, not following the
* terminal link (if any)
* @throws NamingException if a naming exception is encountered
*/
@@ -643,8 +643,8 @@
* parse names differently. This method allows an application
* to get a parser for parsing names into their atomic components
* using the naming convention of a particular naming system.
- * Within any single naming system, NameParser objects
- * returned by this method must be equal (using the equals()
+ * Within any single naming system, {@code NameParser} objects
+ * returned by this method must be equal (using the {@code equals()}
* test).
*
* @param name
@@ -765,7 +765,7 @@
* The caller should not make any changes to the object returned:
* their effect on the context is undefined.
* The environment of this context may be changed using
- * addToEnvironment() and removeFromEnvironment().
+ * {@code addToEnvironment()} and {@code removeFromEnvironment()}.
*
* @return the environment of this context; never null
* @throws NamingException if a naming exception is encountered
@@ -798,7 +798,7 @@
* The string returned by this method is not a JNDI composite name
* and should not be passed directly to context methods.
* In naming systems for which the notion of full name does not
- * make sense, OperationNotSupportedException is thrown.
+ * make sense, {@code OperationNotSupportedException} is thrown.
*
* @return this context's name in its own namespace; never null
* @throws OperationNotSupportedException if the naming system does
@@ -821,7 +821,7 @@
* passed to the initial context constructor,
* a system property, or an application resource file.
* If it is not specified in any of these sources,
- * NoInitialContextException is thrown when an initial
+ * {@code NoInitialContextException} is thrown when an initial
* context is required to complete an operation.
*
* The value of this constant is "java.naming.factory.initial".
@@ -882,7 +882,7 @@
* a URL context factory.
* This property may be specified in the environment, a system property,
* or one or more resource files.
- * The prefix com.sun.jndi.url is always appended to
+ * The prefix {@code com.sun.jndi.url} is always appended to
* the possibly empty list of package prefixes.
*
* The value of this constant is "java.naming.factory.url.pkgs".
@@ -920,7 +920,7 @@
* or a resource file.
* If it is not specified in any of these sources
* and the program attempts to use a JNDI URL containing a DNS name,
- * a ConfigurationException will be thrown.
+ * a {@code ConfigurationException} will be thrown.
*
* The value of this constant is "java.naming.dns.url".
*
@@ -974,7 +974,7 @@
*
- * When a URL string (a String of the form
+ * When a URL string (a {@code String} of the form
* scheme_id:rest_of_name) is passed as a name parameter to
* any method, a URL context factory for handling that scheme is
* located and used to resolve the URL. If no such factory is found,
* the initial context specified by
- * "java.naming.factory.initial" is used. Similarly, when a
- * CompositeName object whose first component is a URL string is
+ * {@code "java.naming.factory.initial"} is used. Similarly, when a
+ * {@code CompositeName} object whose first component is a URL string is
* passed as a name parameter to any method, a URL context factory is
* located and used to resolve the first name component.
* See {@link NamingManager#getURLContext
- * NamingManager.getURLContext()} for a description of how URL
+ * NamingManager.getURLContext()} for a description of how URL
* context factories are located.
*
* This default policy of locating the initial context and URL context
* factories may be overridden
* by calling
- * NamingManager.setInitialContextFactoryBuilder().
+ * {@code NamingManager.setInitialContextFactoryBuilder()}.
*
* NoInitialContextException is thrown when an initial context cannot
* be instantiated. This exception can be thrown during any interaction
@@ -125,7 +125,7 @@
/**
* The environment associated with this InitialContext.
* It is initialized to null and is updated by the constructor
- * that accepts an environment or by the init() method.
+ * that accepts an environment or by the {@code init()} method.
* @see #addToEnvironment
* @see #removeFromEnvironment
* @see #getEnvironment
@@ -152,14 +152,14 @@
* Constructs an initial context with the option of not
* initializing it. This may be used by a constructor in
* a subclass when the value of the environment parameter
- * is not yet known at the time the InitialContext
+ * is not yet known at the time the {@code InitialContext}
* constructor is called. The subclass's constructor will
* call this constructor, compute the value of the environment,
- * and then call init() before returning.
+ * and then call {@code init()} before returning.
*
* @param lazy
* true means do not initialize the initial context; false
- * is equivalent to calling new InitialContext()
+ * is equivalent to calling {@code new InitialContext()}
* @throws NamingException if a naming exception is encountered
*
* @see #init(Hashtable)
@@ -174,7 +174,7 @@
/**
* Constructs an initial context.
* No environment properties are supplied.
- * Equivalent to new InitialContext(null).
+ * Equivalent to {@code new InitialContext(null)}.
*
* @throws NamingException if a naming exception is encountered
*
@@ -188,10 +188,10 @@
* Constructs an initial context using the supplied environment.
* Environment properties are discussed in the class description.
*
- * This constructor will not modify environment
+ * This constructor will not modify {@code environment}
* or save a reference to it, but may save a clone.
* Caller should not modify mutable keys and values in
- * environment after it has been passed to the constructor.
+ * {@code environment} after it has been passed to the constructor.
*
* @param environment
* environment used to create the initial context.
@@ -212,7 +212,7 @@
* Initializes the initial context using the supplied environment.
* Environment properties are discussed in the class description.
*
- * This method will modify environment and save
+ * This method will modify {@code environment} and save
* a reference to it. The caller may no longer modify it.
*
* @param environment
@@ -245,7 +245,7 @@
* InitialContext ic = new InitialContext();
* Object obj = ic.lookup();
*
- * If name is empty, returns a new instance of this context
+ * If {@code name} is empty, returns a new instance of this context
* (which represents the same naming context as this context, but its
* environment may be modified independently and it may be accessed
* concurrently).
@@ -253,7 +253,7 @@
* @param
- * name is a composite name. If the intent is to set
+ * {@code name} is a composite name. If the intent is to set
* this field using a compound name or string, you must
* "stringify" the compound name, and create a composite
* name with a single component using the string. You can then
@@ -230,7 +230,7 @@
/**
* Sets the remaining link name field of this exception.
*
- * name is a composite name. If the intent is to set
+ * {@code name} is a composite name. If the intent is to set
* this field using a compound name or string, you must
* "stringify" the compound name, and create a composite
* name with a single component using the string. You can then
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/Name.java
--- a/jdk/src/java.naming/share/classes/javax/naming/Name.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/Name.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,12 +28,12 @@
import java.util.Enumeration;
/**
- * The Name interface represents a generic name -- an ordered
+ * The {@code Name} interface represents a generic name -- an ordered
* sequence of components. It can be a composite name (names that
* span multiple namespaces), or a compound name (names that are
* used within individual hierarchical naming systems).
*
- * There can be different implementations of Name; for example,
+ * There can be different implementations of {@code Name}; for example,
* composite names, URLs, or namespace-specific compound names.
*
* The components of a name are numbered. The indexes of a name
@@ -46,7 +46,7 @@
* value for a parameter that is a name or a name component.
* Likewise, methods that return a name or name component never return null.
*
- * An instance of a Name may not be synchronized against
+ * An instance of a {@code Name} may not be synchronized against
* concurrent multithreaded access if that access is not read-only.
*
* @author Rosanna Lee
@@ -82,7 +82,7 @@
* Returns a negative integer, zero, or a positive integer as this
* name is less than, equal to, or greater than the given name.
*
- * As with Object.equals(), the notion of ordering for names
+ * As with {@code Object.equals()}, the notion of ordering for names
* depends on the class that implements this interface.
* For example, the ordering may be
* based on lexicographical ordering of the name components.
@@ -93,7 +93,7 @@
* @param obj the non-null object to compare against.
* @return a negative integer, zero, or a positive integer as this name
* is less than, equal to, or greater than the given name
- * @throws ClassCastException if obj is not a Name of a
+ * @throws ClassCastException if obj is not a {@code Name} of a
* type that may be compared with this name
*
* @see Comparable#compareTo(Object)
@@ -170,23 +170,23 @@
/**
* Determines whether this name starts with a specified prefix.
- * A name n is a prefix if it is equal to
- * getPrefix(n.size()).
+ * A name {@code n} is a prefix if it is equal to
+ * {@code getPrefix(n.size())}.
*
* @param n
* the name to check
- * @return true if n is a prefix of this name, false otherwise
+ * @return true if {@code n} is a prefix of this name, false otherwise
*/
public boolean startsWith(Name n);
/**
* Determines whether this name ends with a specified suffix.
- * A name n is a suffix if it is equal to
- * getSuffix(size()-n.size()).
+ * A name {@code n} is a suffix if it is equal to
+ * {@code getSuffix(size()-n.size())}.
*
* @param n
* the name to check
- * @return true if n is a suffix of this name, false otherwise
+ * @return true if {@code n} is a suffix of this name, false otherwise
*/
public boolean endsWith(Name n);
@@ -197,7 +197,7 @@
* the components to add
* @return the updated name (not a new one)
*
- * @throws InvalidNameException if suffix is not a valid name,
+ * @throws InvalidNameException if {@code suffix} is not a valid name,
* or if the addition of the components would violate the syntax
* rules of this name
*/
@@ -219,7 +219,7 @@
*
* @throws ArrayIndexOutOfBoundsException
* if posn is outside the specified range
- * @throws InvalidNameException if n is not a valid name,
+ * @throws InvalidNameException if {@code n} is not a valid name,
* or if the addition of the components would violate the syntax
* rules of this name
*/
@@ -232,7 +232,7 @@
* the component to add
* @return the updated name (not a new one)
*
- * @throws InvalidNameException if adding comp would violate
+ * @throws InvalidNameException if adding {@code comp} would violate
* the syntax rules of this name
*/
public Name add(String comp) throws InvalidNameException;
@@ -252,7 +252,7 @@
*
* @throws ArrayIndexOutOfBoundsException
* if posn is outside the specified range
- * @throws InvalidNameException if adding comp would violate
+ * @throws InvalidNameException if adding {@code comp} would violate
* the syntax rules of this name
*/
public Name add(int posn, String comp) throws InvalidNameException;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/NameClassPair.java
--- a/jdk/src/java.naming/share/classes/javax/naming/NameClassPair.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/NameClassPair.java Wed Jul 05 20:44:51 2017 +0200
@@ -60,7 +60,7 @@
/**
* Contains the name of this NameClassPair.
* It is initialized by the constructor and can be updated using
- * setName().
+ * {@code setName()}.
* @serial
* @see #getName
* @see #setName
@@ -70,7 +70,7 @@
/**
*Contains the class name contained in this NameClassPair.
* It is initialized by the constructor and can be updated using
- * setClassName().
+ * {@code setClassName()}.
* @serial
* @see #getClassName
* @see #setClassName
@@ -80,7 +80,7 @@
/**
* Contains the full name of this NameClassPair within its
* own namespace.
- * It is initialized using setNameInNamespace()
+ * It is initialized using {@code setNameInNamespace()}
* @serial
* @see #getNameInNamespace
* @see #setNameInNamespace
@@ -89,10 +89,10 @@
/**
- * Records whether the name of this NameClassPair
+ * Records whether the name of this {@code NameClassPair}
* is relative to the target context.
* It is initialized by the constructor and can be updated using
- * setRelative().
+ * {@code setRelative()}.
* @serial
* @see #isRelative
* @see #setRelative
@@ -148,7 +148,7 @@
* Retrieves the class name of the object bound to the name of this binding.
* If a reference or some other indirect information is bound,
* retrieves the class name of the eventual object that
- * will be returned by Binding.getObject().
+ * will be returned by {@code Binding.getObject()}.
*
* @return The possibly null class name of object bound.
* It is null if the object bound is null.
@@ -162,10 +162,10 @@
/**
* Retrieves the name of this binding.
- * If isRelative() is true, this name is relative to the
+ * If {@code isRelative()} is true, this name is relative to the
* target context (which is named by the first parameter of the
- * list()).
- * If isRelative() is false, this name is a URL string.
+ * {@code list()}).
+ * If {@code isRelative()} is false, this name is a URL string.
*
* @return The non-null name of this binding.
* @see #isRelative
@@ -190,7 +190,7 @@
* Sets the class name of this binding.
*
* @param name the possibly null string to use as the class name.
- * If null, Binding.getClassName() will return
+ * If null, {@code Binding.getClassName()} will return
* the actual class name of the object in the binding.
* The class name will be null if the object bound is null.
* @see #getClassName
@@ -236,7 +236,7 @@
*
*
* In naming systems for which the notion of full name does not
- * apply to this binding an UnsupportedOperationException
+ * apply to this binding an {@code UnsupportedOperationException}
* is thrown.
* This exception is also thrown when a service provider written before
* the introduction of the method is in use.
@@ -261,11 +261,11 @@
/**
* Sets the full name of this binding.
* This method must be called to set the full name whenever a
- * NameClassPair is created and a full name is
+ * {@code NameClassPair} is created and a full name is
* applicable to this binding.
*
* Setting the full name to null, or not setting it at all, will
- * cause getNameInNamespace() to throw an exception.
+ * cause {@code getNameInNamespace()} to throw an exception.
*
* @param fullName The full name to use.
* @since 1.5
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/NamingEnumeration.java
--- a/jdk/src/java.naming/share/classes/javax/naming/NamingEnumeration.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/NamingEnumeration.java Wed Jul 05 20:44:51 2017 +0200
@@ -85,7 +85,7 @@
* retrieving the next element to be caught and handled
* by the application.
*
- * Note that next() can also throw the runtime exception
+ * Note that {@code next()} can also throw the runtime exception
* NoSuchElementException to indicate that the caller is
* attempting to enumerate beyond the end of the enumeration.
* This is different from a NamingException, which indicates
@@ -128,16 +128,16 @@
* its methods will yield undefined results.
* This method is intended for aborting an enumeration to free up resources.
* If an enumeration proceeds to the end--that is, until
- * hasMoreElements() or hasMore() returns false--
+ * {@code hasMoreElements()} or {@code hasMore()} returns {@code false}--
* resources will be freed up automatically and there is no need to
- * explicitly call close().
+ * explicitly call {@code close()}.
*
* This method indicates to the service provider that it is free
* to release resources associated with the enumeration, and can
- * notify servers to cancel any outstanding requests. The close()
+ * notify servers to cancel any outstanding requests. The {@code close()}
* method is a hint to implementations for managing their resources.
* Implementations are encouraged to use appropriate algorithms to
- * manage their resources when client omits the close() calls.
+ * manage their resources when client omits the {@code close()} calls.
*
* @exception NamingException If a naming exception is encountered
* while closing the enumeration.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/NamingException.java
--- a/jdk/src/java.naming/share/classes/javax/naming/NamingException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/NamingException.java Wed Jul 05 20:44:51 2017 +0200
@@ -194,14 +194,14 @@
/**
* Sets the resolved name field of this exception.
*
- * name is a composite name. If the intent is to set
+ * {@code name} is a composite name. If the intent is to set
* this field using a compound name or string, you must
* "stringify" the compound name, and create a composite
* name with a single component using the string. You can then
* invoke this method using the resulting composite name.
*
- * A copy of
- * name is a composite name. If the intent is to set
+ * {@code name} is a composite name. If the intent is to set
* this field using a compound name or string, you must
* "stringify" the compound name, and create a composite
* name with a single component using the string. You can then
* invoke this method using the resulting composite name.
*
- * A copy of
- * name is a composite name. If the intent is to append
+ * {@code name} is a composite name. If the intent is to append
* a compound name, you should "stringify" the compound name
* then invoke the overloaded form that accepts a String parameter.
*
- * Subsequent changes to
* This method predates the general-purpose exception chaining facility.
* The {@link #initCause(Throwable)} method is now the preferred means
@@ -348,10 +348,10 @@
/**
* Returns the cause of this exception. The cause is the
* throwable that caused this naming exception to be thrown.
- * Returns
* A service provider provides
- * a subclass of ReferralException by providing implementations
- * for getReferralInfo() and getReferralContext() (and appropriate
+ * a subclass of {@code ReferralException} by providing implementations
+ * for {@code getReferralInfo()} and {@code getReferralContext()} (and appropriate
* constructors and/or corresponding "set" methods).
*
- * The following code sample shows how ReferralException can be used.
- *
- * ReferralException is an abstract class. Concrete implementations
+ * {@code ReferralException} is an abstract class. Concrete implementations
* determine its synchronization and serialization properties.
*
- * An environment parameter passed to the getReferralContext()
+ * An environment parameter passed to the {@code getReferralContext()}
* method is owned by the caller.
* The service provider will not modify the object or keep a reference to it,
* but may keep a reference to a clone of it.
@@ -114,7 +114,7 @@
*
* @return The non-null context at which to continue the method.
* @exception NamingException If a naming exception was encountered.
- * Call either retryReferral() or skipReferral()
+ * Call either {@code retryReferral()} or {@code skipReferral()}
* to continue processing referrals.
*/
public abstract Context getReferralContext() throws NamingException;
@@ -127,7 +127,7 @@
* enumeration, the referral exception should provide a context
* at which to continue the operation.
*
- * The referral context is created using env as its environment
+ * The referral context is created using {@code env} as its environment
* properties.
* This method should be used instead of the no-arg overloaded form
* when the caller needs to use different environment properties for
@@ -143,7 +143,7 @@
*
* @return The non-null context at which to continue the method.
* @exception NamingException If a naming exception was encountered.
- * Call either retryReferral() or skipReferral()
+ * Call either {@code retryReferral()} or {@code skipReferral()}
* to continue processing referrals.
*/
public abstract Context
@@ -153,7 +153,7 @@
/**
* Discards the referral about to be processed.
* A call to this method should be followed by a call to
- *
* In a directory, named objects can have associated with them
- * attributes. The Attribute interface represents an attribute associated
+ * attributes. The {@code Attribute} interface represents an attribute associated
* with a named object. An attribute contains 0 or more, possibly null, values.
- * The attribute values can be ordered or unordered (see isOrdered()).
+ * The attribute values can be ordered or unordered (see {@code isOrdered()}).
* If the values are unordered, no duplicates are allowed.
* If the values are ordered, duplicates are allowed.
*
* The content and representation of an attribute and its values is defined by
* the attribute's schema. The schema contains information
* about the attribute's syntax and other properties about the attribute.
- * See getAttributeDefinition() and
- * getAttributeSyntaxDefinition()
+ * See {@code getAttributeDefinition()} and
+ * {@code getAttributeSyntaxDefinition()}
* for details regarding how to get schema information about an attribute
* if the underlying directory service supports schemas.
*
* Equality of two attributes is determined by the implementation class.
- * A simple implementation can use Object.equals() to determine equality
+ * A simple implementation can use {@code Object.equals()} to determine equality
* of attribute values, while a more sophisticated implementation might
* make use of schema information to determine equality.
* Similarly, one implementation might provide a static storage
* structure which simply returns the values passed to its
- * constructor, while another implementation might define get() and
- * getAll().
+ * constructor, while another implementation might define {@code get()} and
+ * {@code getAll()}.
* to get the values dynamically from the directory.
*
- * Note that updates to Attribute (such as adding or removing a
+ * Note that updates to {@code Attribute} (such as adding or removing a
* value) do not affect the corresponding representation of the attribute
* in the directory. Updates to the directory can only be effected
- * using operations in the DirContext interface.
+ * using operations in the {@code DirContext} interface.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -129,7 +129,7 @@
/**
* Determines whether a value is in the attribute.
* Equality is determined by the implementation, which may use
- * Object.equals() or schema information to determine equality.
+ * {@code Object.equals()} or schema information to determine equality.
*
* @param attrVal The possibly null value to check. If null, check
* whether the attribute has an attribute value whose value is null.
@@ -141,12 +141,12 @@
/**
* Adds a new value to the attribute.
* If the attribute values are unordered and
- * attrVal is already in the attribute, this method does nothing.
- * If the attribute values are ordered, attrVal is added to the end of
+ * {@code attrVal} is already in the attribute, this method does nothing.
+ * If the attribute values are ordered, {@code attrVal} is added to the end of
* the list of attribute values.
*
* Equality is determined by the implementation, which may use
- * Object.equals() or schema information to determine equality.
+ * {@code Object.equals()} or schema information to determine equality.
*
* @param attrVal The new possibly null value to add. If null, null
* is added as an attribute value.
@@ -156,15 +156,15 @@
/**
* Removes a specified value from the attribute.
- * If attrval is not in the attribute, this method does nothing.
+ * If {@code attrval} is not in the attribute, this method does nothing.
* If the attribute values are ordered, the first occurrence of
- * attrVal is removed and attribute values at indices greater
+ * {@code attrVal} is removed and attribute values at indices greater
* than the removed
* value are shifted up towards the head of the list (and their indices
* decremented by one).
*
* Equality is determined by the implementation, which may use
- * Object.equals() or schema information to determine equality.
+ * {@code Object.equals()} or schema information to determine equality.
*
* @param attrval The possibly null value to remove from this attribute.
* If null, remove the attribute value that is null.
@@ -260,66 +260,66 @@
/**
* Retrieves the attribute value from the ordered list of attribute values.
- * This method returns the value at the ix index of the list of
+ * This method returns the value at the {@code ix} index of the list of
* attribute values.
* If the attribute values are unordered,
* this method returns the value that happens to be at that index.
* @param ix The index of the value in the ordered list of attribute values.
* {@code 0 <= ix < size()}.
- * @return The possibly null attribute value at index ix;
+ * @return The possibly null attribute value at index {@code ix};
* null if the attribute value is null.
* @exception NamingException If a naming exception was encountered while
* retrieving the value.
- * @exception IndexOutOfBoundsException If ix is outside the specified range.
+ * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
*/
Object get(int ix) throws NamingException;
/**
* Removes an attribute value from the ordered list of attribute values.
- * This method removes the value at the ix index of the list of
+ * This method removes the value at the {@code ix} index of the list of
* attribute values.
* If the attribute values are unordered,
* this method removes the value that happens to be at that index.
- * Values located at indices greater than ix are shifted up towards
+ * Values located at indices greater than {@code ix} are shifted up towards
* the front of the list (and their indices decremented by one).
*
* @param ix The index of the value to remove.
* {@code 0 <= ix < size()}.
- * @return The possibly null attribute value at index ix that was removed;
+ * @return The possibly null attribute value at index {@code ix} that was removed;
* null if the attribute value is null.
- * @exception IndexOutOfBoundsException If ix is outside the specified range.
+ * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
*/
Object remove(int ix);
/**
* Adds an attribute value to the ordered list of attribute values.
- * This method adds attrVal to the list of attribute values at
- * index ix.
- * Values located at indices at or greater than ix are
+ * This method adds {@code attrVal} to the list of attribute values at
+ * index {@code ix}.
+ * Values located at indices at or greater than {@code ix} are
* shifted down towards the end of the list (and their indices incremented
* by one).
- * If the attribute values are unordered and already have attrVal,
- * IllegalStateException is thrown.
+ * If the attribute values are unordered and already have {@code attrVal},
+ * {@code IllegalStateException} is thrown.
*
* @param ix The index in the ordered list of attribute values to add the new value.
* {@code 0 <= ix <= size()}.
* @param attrVal The possibly null attribute value to add; if null, null is
* the value added.
- * @exception IndexOutOfBoundsException If ix is outside the specified range.
+ * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
* @exception IllegalStateException If the attribute values are unordered and
- * attrVal is one of those values.
+ * {@code attrVal} is one of those values.
*/
void add(int ix, Object attrVal);
/**
* Sets an attribute value in the ordered list of attribute values.
- * This method sets the value at the ix index of the list of
- * attribute values to be attrVal. The old value is removed.
+ * This method sets the value at the {@code ix} index of the list of
+ * attribute values to be {@code attrVal}. The old value is removed.
* If the attribute values are unordered,
* this method sets the value that happens to be at that index
- * to attrVal, unless attrVal is already one of the values.
- * In that case, IllegalStateException is thrown.
+ * to {@code attrVal}, unless {@code attrVal} is already one of the values.
+ * In that case, {@code IllegalStateException} is thrown.
*
* @param ix The index of the value in the ordered list of attribute values.
* {@code 0 <= ix < size()}.
@@ -327,8 +327,8 @@
* If null, 'null' replaces the old value.
* @return The possibly null attribute value at index ix that was replaced.
* Null if the attribute value was null.
- * @exception IndexOutOfBoundsException If ix is outside the specified range.
- * @exception IllegalStateException If attrVal already exists and the
+ * @exception IndexOutOfBoundsException If {@code ix} is outside the specified range.
+ * @exception IllegalStateException If {@code attrVal} already exists and the
* attribute values are unordered.
*/
Object set(int ix, Object attrVal);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/Attributes.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/Attributes.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/Attributes.java Wed Jul 05 20:44:51 2017 +0200
@@ -103,7 +103,7 @@
* are undefined.
*
* @return A non-null enumeration of the attributes in this attribute set.
- * Each element of the enumeration is of class Attribute.
+ * Each element of the enumeration is of class {@code Attribute}.
* If attribute set has zero attributes, an empty enumeration
* is returned.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttribute.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttribute.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttribute.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,35 +35,35 @@
import javax.naming.OperationNotSupportedException;
/**
- * This class provides a basic implementation of the Attribute interface.
+ * This class provides a basic implementation of the {@code Attribute} interface.
*
* This implementation does not support the schema methods
- * getAttributeDefinition() and getAttributeSyntaxDefinition().
- * They simply throw OperationNotSupportedException.
- * Subclasses of BasicAttribute should override these methods if they
+ * {@code getAttributeDefinition()} and {@code getAttributeSyntaxDefinition()}.
+ * They simply throw {@code OperationNotSupportedException}.
+ * Subclasses of {@code BasicAttribute} should override these methods if they
* support them.
*
- * The BasicAttribute class by default uses Object.equals() to
+ * The {@code BasicAttribute} class by default uses {@code Object.equals()} to
* determine equality of attribute values when testing for equality or
* when searching for values, except when the value is an array.
- * For an array, each element of the array is checked using Object.equals().
- * Subclasses of BasicAttribute can make use of schema information
+ * For an array, each element of the array is checked using {@code Object.equals()}.
+ * Subclasses of {@code BasicAttribute} can make use of schema information
* when doing similar equality checks by overriding methods
* in which such use of schema is meaningful.
- * Similarly, the BasicAttribute class by default returns the values passed to its
+ * Similarly, the {@code BasicAttribute} class by default returns the values passed to its
* constructor and/or manipulated using the add/remove methods.
- * Subclasses of BasicAttribute can override get() and getAll()
+ * Subclasses of {@code BasicAttribute} can override {@code get()} and {@code getAll()}
* to get the values dynamically from the directory (or implement
- * the Attribute interface directly instead of subclassing BasicAttribute).
+ * the {@code Attribute} interface directly instead of subclassing {@code BasicAttribute}).
*
- * Note that updates to BasicAttribute (such as adding or removing a value)
+ * Note that updates to {@code BasicAttribute} (such as adding or removing a value)
* does not affect the corresponding representation of the attribute
* in the directory. Updates to the directory can only be effected
- * using operations in the DirContext interface.
+ * using operations in the {@code DirContext} interface.
*
- * A BasicAttribute instance is not synchronized against concurrent
+ * A {@code BasicAttribute} instance is not synchronized against concurrent
* multithreaded access. Multiple threads trying to access and modify a
- * BasicAttribute should lock the object.
+ * {@code BasicAttribute} should lock the object.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -112,16 +112,16 @@
* order the values must match.
* If obj is null or not an Attribute, false is returned.
*
- * By default Object.equals() is used when comparing the attribute
+ * By default {@code Object.equals()} is used when comparing the attribute
* id and its values except when a value is an array. For an array,
- * each element of the array is checked using Object.equals().
+ * each element of the array is checked using {@code Object.equals()}.
* A subclass may override this to make
* use of schema syntax information and matching rules,
* which define what it means for two attributes to be equal.
* How and whether a subclass makes
* use of the schema information is determined by the subclass.
- * If a subclass overrides equals(), it should also override
- * hashCode()
+ * If a subclass overrides {@code equals()}, it should also override
+ * {@code hashCode()}
* such that two attributes that are equal have the same hash code.
*
* @param obj The possibly null object to check.
@@ -172,8 +172,8 @@
* the attribute's id and that of all of its values except for
* values that are arrays.
* For an array, the hash code of each element of the array is summed.
- * If a subclass overrides hashCode(), it should override
- * equals()
+ * If a subclass overrides {@code hashCode()}, it should override
+ * {@code equals()}
* as well so that two attributes that are equal have the same hash code.
*
* @return an int representing the hash code of this attribute.
@@ -315,10 +315,10 @@
* Determines whether a value is in this attribute.
*
* By default,
- * Object.equals() is used when comparing attrVal
- * with this attribute's values except when attrVal is an array.
+ * {@code Object.equals()} is used when comparing {@code attrVal}
+ * with this attribute's values except when {@code attrVal} is an array.
* For an array, each element of the array is checked using
- * Object.equals().
+ * {@code Object.equals()}.
* A subclass may use schema information to determine equality.
*/
public boolean contains(Object attrVal) {
@@ -352,7 +352,7 @@
/**
* Determines whether two attribute values are equal.
- * Use arrayEquals for arrays and Object.equals() otherwise.
+ * Use arrayEquals for arrays and {@code Object.equals()} otherwise.
*/
private static boolean valueEquals(Object obj1, Object obj2) {
if (obj1 == obj2) {
@@ -370,7 +370,7 @@
/**
* Determines whether two arrays are equal by comparing each of their
- * elements using Object.equals().
+ * elements using {@code Object.equals()}.
*/
private static boolean arrayEquals(Object a1, Object a2) {
int len;
@@ -393,10 +393,10 @@
/**
* Adds a new value to this attribute.
*
- * By default, Object.equals() is used when comparing attrVal
- * with this attribute's values except when attrVal is an array.
+ * By default, {@code Object.equals()} is used when comparing {@code attrVal}
+ * with this attribute's values except when {@code attrVal} is an array.
* For an array, each element of the array is checked using
- * Object.equals().
+ * {@code Object.equals()}.
* A subclass may use schema information to determine equality.
*/
public boolean add(Object attrVal) {
@@ -411,10 +411,10 @@
/**
* Removes a specified value from this attribute.
*
- * By default, Object.equals() is used when comparing attrVal
- * with this attribute's values except when attrVal is an array.
+ * By default, {@code Object.equals()} is used when comparing {@code attrVal}
+ * with this attribute's values except when {@code attrVal} is an array.
* For an array, each element of the array is checked using
- * Object.equals().
+ * {@code Object.equals()}.
* A subclass may use schema information to determine equality.
*/
public boolean remove(Object attrval) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/BasicAttributes.java Wed Jul 05 20:44:51 2017 +0200
@@ -207,17 +207,17 @@
}
/**
- * Determines whether this BasicAttributes is equal to another
- * Attributes
- * Two Attributes are equal if they are both instances of
- * Attributes,
+ * Determines whether this {@code BasicAttributes} is equal to another
+ * {@code Attributes}
+ * Two {@code Attributes} are equal if they are both instances of
+ * {@code Attributes},
* treat the case of attribute IDs the same way, and contain the
- * same attributes. Each Attribute in this BasicAttributes
- * is checked for equality using Object.equals(), which may have
- * be overridden by implementations of Attribute).
- * If a subclass overrides equals(),
- * it should override hashCode()
- * as well so that two Attributes instances that are equal
+ * same attributes. Each {@code Attribute} in this {@code BasicAttributes}
+ * is checked for equality using {@code Object.equals()}, which may have
+ * be overridden by implementations of {@code Attribute}).
+ * If a subclass overrides {@code equals()},
+ * it should override {@code hashCode()}
+ * as well so that two {@code Attributes} instances that are equal
* have the same hash code.
* @param obj the possibly null object to compare against.
*
@@ -259,9 +259,9 @@
* The hash code is computed by adding the hash code of
* the attributes of this object. If this BasicAttributes
* ignores case of its attribute IDs, one is added to the hash code.
- * If a subclass overrides hashCode(),
- * it should override equals()
- * as well so that two Attributes instances that are equal
+ * If a subclass overrides {@code hashCode()},
+ * it should override {@code equals()}
+ * as well so that two {@code Attributes} instances that are equal
* have the same hash code.
*
* @return an int representing the hash code of this BasicAttributes instance.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/DirContext.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/DirContext.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/DirContext.java Wed Jul 05 20:44:51 2017 +0200
@@ -33,7 +33,7 @@
* associated with objects, and for searching the directory.
*
*
@@ -47,9 +47,9 @@
* The second version instead has a link to the first: the same
* documentation applies to both.
*
- * See Context for a discussion on the interpretation of the
- * name argument to the Context methods. These same rules
- * apply to the name argument to the DirContext methods.
+ * See {@code Context} for a discussion on the interpretation of the
+ * name argument to the {@code Context} methods. These same rules
+ * apply to the name argument to the {@code DirContext} methods.
*
*
- * In the getAttributes() and search() methods,
+ * In the {@code getAttributes()} and {@code search()} methods,
* you can specify that all attributes associated with the requested objects
- * be returned by supply null as the list of attributes to return.
+ * be returned by supply {@code null} as the list of attributes to return.
* The attributes returned do not include operational attributes.
* In order to retrieve operational attributes, you must name them explicitly.
*
@@ -140,13 +140,13 @@
*
*
- * An Attributes, SearchControls, or array object
+ * An {@code Attributes}, {@code SearchControls}, or array object
* passed as a parameter to any method will not be modified by the
* service provider. The service provider may keep a reference to it
* for the duration of the operation, including any enumeration of the
* method's results and the processing of any referrals generated.
* The caller should not modify the object during this time.
- * An Attributes object returned by any method is owned by
+ * An {@code Attributes} object returned by any method is owned by
* the caller. The caller may subsequently modify it; the service
* provider will not.
*
@@ -254,7 +254,7 @@
* If attempting to add more than one value to a single-valued attribute,
* throws
- * The value of this constant is 1.
+ * The value of this constant is {@code 1}.
*
* @see ModificationItem
* @see #modifyAttributes
@@ -273,7 +273,7 @@
* attempting to add more than one value to a single-valued attribute,
* throws
- * The value of this constant is 2.
+ * The value of this constant is {@code 2}.
*
* @see ModificationItem
* @see #modifyAttributes
@@ -294,7 +294,7 @@
* Removal of the last value will remove the attribute if the
* attribute is required to have at least one value.
*
- * The value of this constant is 3.
+ * The value of this constant is {@code 3}.
*
* @see ModificationItem
* @see #modifyAttributes
@@ -391,12 +391,12 @@
/**
* Binds a name to an object, along with associated attributes.
- * If attrs is null, the resulting binding will have
- * the attributes associated with obj if obj is a
- * DirContext, and no attributes otherwise.
- * If attrs is non-null, the resulting binding will have
- * attrs as its attributes; any attributes associated with
- * obj are ignored.
+ * If {@code attrs} is null, the resulting binding will have
+ * the attributes associated with {@code obj} if {@code obj} is a
+ * {@code DirContext}, and no attributes otherwise.
+ * If {@code attrs} is non-null, the resulting binding will have
+ * {@code attrs} as its attributes; any attributes associated with
+ * {@code obj} are ignored.
*
* @param name
* the name to bind; may not be empty
@@ -438,16 +438,16 @@
/**
* Binds a name to an object, along with associated attributes,
* overwriting any existing binding.
- * If attrs is null and obj is a DirContext,
- * the attributes from obj are used.
- * If attrs is null and obj is not a DirContext,
+ * If {@code attrs} is null and {@code obj} is a {@code DirContext},
+ * the attributes from {@code obj} are used.
+ * If {@code attrs} is null and {@code obj} is not a {@code DirContext},
* any existing attributes associated with the object already bound
* in the directory remain unchanged.
- * If attrs is non-null, any existing attributes associated with
- * the object already bound in the directory are removed and attrs
- * is associated with the named object. If obj is a
- * DirContext and attrs is non-null, the attributes
- * of obj are ignored.
+ * If {@code attrs} is non-null, any existing attributes associated with
+ * the object already bound in the directory are removed and {@code attrs}
+ * is associated with the named object. If {@code obj} is a
+ * {@code DirContext} and {@code attrs} is non-null, the attributes
+ * of {@code obj} are ignored.
*
* @param name
* the name to bind; may not be empty
@@ -492,8 +492,8 @@
* component of the name), and associates the supplied attributes
* with the newly created object.
* All intermediate and target contexts must already exist.
- * If attrs is null, this method is equivalent to
- * Context.createSubcontext().
+ * If {@code attrs} is null, this method is equivalent to
+ * {@code Context.createSubcontext()}.
*
* @param name
* the name of the context to create; may not be empty
@@ -579,8 +579,8 @@
* "object class" being referred to here is in the directory sense
* rather than in the Java sense.
* For example, if the named object is a directory object of
- * "Person" class, getSchemaClassDefinition() would return a
- * DirContext representing the (directory's) object class
+ * "Person" class, {@code getSchemaClassDefinition()} would return a
+ * {@code DirContext} representing the (directory's) object class
* definition of "Person".
*
* The information that can be retrieved from an object class definition
@@ -589,13 +589,13 @@
* Prior to JNDI 1.2, this method
* returned a single schema object representing the class definition of
* the named object.
- * Since JNDI 1.2, this method returns a DirContext containing
+ * Since JNDI 1.2, this method returns a {@code DirContext} containing
* all of the named object's class definitions.
*
* @param name
* the name of the object whose object class
* definition is to be retrieved
- * @return the DirContext containing the named
+ * @return the {@code DirContext} containing the named
* object's class definitions; never null
*
* @throws OperationNotSupportedException if schema not supported
@@ -612,7 +612,7 @@
* @param name
* the name of the object whose object class
* definition is to be retrieved
- * @return the DirContext containing the named
+ * @return the {@code DirContext} containing the named
* object's class definitions; never null
*
* @throws OperationNotSupportedException if schema not supported
@@ -656,7 +656,7 @@
* substring comparison) use the version of the
- * When changes are made to this DirContext,
+ * When changes are made to this {@code DirContext},
* the effect on enumerations returned by prior calls to this method
* is undefined.
*
@@ -681,8 +681,8 @@
* all attributes are to be returned;
* an empty array indicates that none are to be returned.
* @return
- * a non-null enumeration of SearchResult objects.
- * Each SearchResult contains the attributes
+ * a non-null enumeration of {@code SearchResult} objects.
+ * Each {@code SearchResult} contains the attributes
* identified by
- * The result is returned in an enumeration of SearchResults.
- * Each SearchResult contains the name of the object
+ * The result is returned in an enumeration of {@code SearchResult}s.
+ * Each {@code SearchResult} contains the name of the object
* and other information about the object (see SearchResult).
* The name is either relative to the target context of the search
* (which is named by the
* If the object does not have a requested attribute, that
@@ -839,8 +839,8 @@
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
- * to (new SearchControls())).
- * @return an enumeration of SearchResults of
+ * to {@code (new SearchControls())}).
+ * @return an enumeration of {@code SearchResult}s of
* the objects that satisfy the filter; never null
*
* @throws InvalidSearchFilterException if the search filter specified is
@@ -872,9 +872,9 @@
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
- * to (new SearchControls())).
+ * to {@code (new SearchControls())}).
*
- * @return an enumeration of SearchResults for
+ * @return an enumeration of {@code SearchResult}s for
* the objects that satisfy the filter.
* @throws InvalidSearchFilterException if the search filter specified is
* not supported or understood by the underlying directory
@@ -935,8 +935,8 @@
*
- * The SearchResult may also contain attributes of the matching
- * object if the cons argument specifies that attributes be
+ * The {@code SearchResult} may also contain attributes of the matching
+ * object if the {@code cons} argument specifies that attributes be
* returned.
*
* If the object does not have a requested attribute, that
@@ -972,17 +972,17 @@
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
- * to (new SearchControls())).
- * @return an enumeration of SearchResults of the objects
+ * to {@code (new SearchControls())}).
+ * @return an enumeration of {@code SearchResult}s of the objects
* that satisfy the filter; never null
*
- * @throws ArrayIndexOutOfBoundsException if filterExpr contains
+ * @throws ArrayIndexOutOfBoundsException if {@code filterExpr} contains
* This constructor will not modify environment
+ * This constructor will not modify {@code environment}
* or save a reference to it, but may save a clone.
* Caller should not modify mutable keys and values in
- * environment after it has been passed to the constructor.
+ * {@code environment} after it has been passed to the constructor.
*
* @param environment
* environment used to create the initial DirContext.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/SearchControls.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/SearchControls.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/SearchControls.java Wed Jul 05 20:44:51 2017 +0200
@@ -54,7 +54,7 @@
* It contains zero element if the named object does not satisfy
* the search filter specified in search().
*
- * The value of this constant is 0.
+ * The value of this constant is {@code 0}.
*/
public final static int OBJECT_SCOPE = 0;
@@ -68,7 +68,7 @@
* The names of elements in the NamingEnumeration are atomic names
* relative to the named context.
*
- * The value of this constant is 1.
+ * The value of this constant is {@code 1}.
*/
public final static int ONELEVEL_SCOPE = 1;
/**
@@ -90,14 +90,14 @@
* included in the enumeration with the empty string as
* its name.
*
- * The value of this constant is 2.
+ * The value of this constant is {@code 2}.
*/
public final static int SUBTREE_SCOPE = 2;
/**
* Contains the scope with which to apply the search. One of
- * ONELEVEL_SCOPE, OBJECT_SCOPE, or
- * SUBTREE_SCOPE.
+ * {@code ONELEVEL_SCOPE}, {@code OBJECT_SCOPE}, or
+ * {@code SUBTREE_SCOPE}.
* @serial
*/
private int searchScope;
@@ -117,7 +117,7 @@
private boolean derefLink;
/**
- * Indicates whether object is returned in SearchResult.
+ * Indicates whether object is returned in {@code SearchResult}.
* @serial
*/
private boolean returnObj;
@@ -130,7 +130,7 @@
/**
* Contains the list of attributes to be returned in
- * SearchResult for each matching entry of search. null
+ * {@code SearchResult} for each matching entry of search. {@code null}
* indicates that all attributes are to be returned.
* @serial
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/SearchResult.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/SearchResult.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/SearchResult.java Wed Jul 05 20:44:51 2017 +0200
@@ -53,9 +53,9 @@
* Constructs a search result using the result's name, its bound object, and
* its attributes.
*
- * getClassName() will return the class name of obj
- * (or null if obj is null) unless the class name has been
- * explicitly set using setClassName().
+ * {@code getClassName()} will return the class name of {@code obj}
+ * (or null if {@code obj} is null) unless the class name has been
+ * explicitly set using {@code setClassName()}.
*
* @param name The non-null name of the search item. It is relative
* to the target context of the search (which is
@@ -76,9 +76,9 @@
* Constructs a search result using the result's name, its bound object, and
* its attributes, and whether the name is relative.
*
- * getClassName() will return the class name of obj
- * (or null if obj is null) unless the class name has been
- * explicitly set using setClassName()
+ * {@code getClassName()} will return the class name of {@code obj}
+ * (or null if {@code obj} is null) unless the class name has been
+ * explicitly set using {@code setClassName()}
*
* @param name The non-null name of the search item.
* @param obj The object bound to name. Can be null.
@@ -106,9 +106,9 @@
* named by the first parameter of the
@@ -47,20 +47,20 @@
-You use getAttributes() to retrieve the attributes
+You use
-DirContext also behaves as a naming context
-by extending the Context interface in the javax.naming package.
+
* If a service only supports registration for existing
* targets, an attempt to register for a nonexistent target
- * results in a NameNotFoundException being thrown as early as possible,
- * preferably at the time addNamingListener() is called, or if that is
+ * results in a {@code NameNotFoundException} being thrown as early as possible,
+ * preferably at the time {@code addNamingListener()} is called, or if that is
* not possible, the listener will receive the exception through the
- * NamingExceptionEvent.
+ * {@code NamingExceptionEvent}.
*
* Also, for service providers that only support registration for existing
* targets, when the target that a listener has registered for is
* subsequently removed from the namespace, the listener is notified
- * via a NamingExceptionEvent (containing a
- *NameNotFoundException).
+ * via a {@code NamingExceptionEvent} (containing a
+ *{@code NameNotFoundException}).
*
- * An application can use the method targetMustExist() to check
- * whether a EventContext supports registration
+ * An application can use the method {@code targetMustExist()} to check
+ * whether a {@code EventContext} supports registration
* of nonexistent targets.
*
*
* For example, suppose a listener makes the following registration:
@@ -78,52 +78,52 @@
* src.addNamingListener("x", SUBTREE_SCOPE, listener);
*
* Furthermore, listener registration/deregistration is with
- * the EventContext
+ * the {@code EventContext}
* instance, and not with the corresponding object in the namespace.
* If the program intends at some point to remove a listener, then it needs to
- * keep a reference to the EventContext instance on
- * which it invoked addNamingListener() (just as
+ * keep a reference to the {@code EventContext} instance on
+ * which it invoked {@code addNamingListener()} (just as
* it needs to keep a reference to the listener in order to remove it
- * later). It cannot expect to do a lookup() and get another instance of
- * a EventContext on which to perform the deregistration.
+ * later). It cannot expect to do a {@code lookup()} and get another instance of
+ * a {@code EventContext} on which to perform the deregistration.
*
- * The value of this constant is 0.
+ * The value of this constant is {@code 0}.
*/
public final static int OBJECT_SCOPE = 0;
@@ -147,7 +147,7 @@
* in the context named by the target,
* excluding the context named by the target.
*
- * The value of this constant is 1.
+ * The value of this constant is {@code 1}.
*/
public final static int ONELEVEL_SCOPE = 1;
@@ -156,7 +156,7 @@
* in the subtree of the object named by the target, including the object
* named by the target.
*
- * The value of this constant is 2.
+ * The value of this constant is {@code 2}.
*/
public final static int SUBTREE_SCOPE = 2;
@@ -167,31 +167,31 @@
*
* The event source of those events is this context. See the
* class description for a discussion on event source and target.
- * See the descriptions of the constants OBJECT_SCOPE,
- * ONELEVEL_SCOPE, and SUBTREE_SCOPE to see how
- * scope affects the registration.
+ * See the descriptions of the constants {@code OBJECT_SCOPE},
+ * {@code ONELEVEL_SCOPE}, and {@code SUBTREE_SCOPE} to see how
+ * {@code scope} affects the registration.
*
- * target needs to name a context only when scope is
- * ONELEVEL_SCOPE.
- * target may name a non-context if scope is either
- * OBJECT_SCOPE or SUBTREE_SCOPE. Using
- * SUBTREE_SCOPE for a non-context might be useful,
- * for example, if the caller does not know in advance whether target
+ * {@code target} needs to name a context only when {@code scope} is
+ * {@code ONELEVEL_SCOPE}.
+ * {@code target} may name a non-context if {@code scope} is either
+ * {@code OBJECT_SCOPE} or {@code SUBTREE_SCOPE}. Using
+ * {@code SUBTREE_SCOPE} for a non-context might be useful,
+ * for example, if the caller does not know in advance whether {@code target}
* is a context and just wants to register interest in the (possibly
- * degenerate subtree) rooted at target.
+ * degenerate subtree) rooted at {@code target}.
*
* When the listener is notified of an event, the listener may
* in invoked in a thread other than the one in which
- * addNamingListener() is executed.
+ * {@code addNamingListener()} is executed.
* Care must be taken when multiple threads are accessing the same
- * EventContext concurrently.
+ * {@code EventContext} concurrently.
* See the
* package description
* for more information on threading issues.
*
* @param target A nonnull name to be resolved relative to this context.
- * @param scope One of OBJECT_SCOPE, ONELEVEL_SCOPE, or
- * SUBTREE_SCOPE.
+ * @param scope One of {@code OBJECT_SCOPE}, {@code ONELEVEL_SCOPE}, or
+ * {@code SUBTREE_SCOPE}.
* @param l The nonnull listener.
* @exception NamingException If a problem was encountered while
* adding the listener.
@@ -204,12 +204,12 @@
* Adds a listener for receiving naming events fired
* when the object named by the string target name and scope changes.
*
- * See the overload that accepts a Name for details.
+ * See the overload that accepts a {@code Name} for details.
*
* @param target The nonnull string name of the object resolved relative
* to this context.
- * @param scope One of OBJECT_SCOPE, ONELEVEL_SCOPE, or
- * SUBTREE_SCOPE.
+ * @param scope One of {@code OBJECT_SCOPE}, {@code ONELEVEL_SCOPE}, or
+ * {@code SUBTREE_SCOPE}.
* @param l The nonnull listener.
* @exception NamingException If a problem was encountered while
* adding the listener.
@@ -220,15 +220,15 @@
/**
* Removes a listener from receiving naming events fired
- * by this EventContext.
+ * by this {@code EventContext}.
* The listener may have registered more than once with this
- * EventContext, perhaps with different target/scope arguments.
+ * {@code EventContext}, perhaps with different target/scope arguments.
* After this method is invoked, the listener will no longer
- * receive events with this EventContext instance
+ * receive events with this {@code EventContext} instance
* as the event source (except for those events already in the process of
* being dispatched).
* If the listener was not, or is no longer, registered with
- * this EventContext instance, this method does not do anything.
+ * this {@code EventContext} instance, this method does not do anything.
*
* @param l The nonnull listener.
* @exception NamingException If a problem was encountered while
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/EventDirContext.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/EventDirContext.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/EventDirContext.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,17 +42,17 @@
* satisfy the filter. However, there might be limitations in the extent
* to which this can be supported by the service provider and underlying
* protocol/service. If the caller submits a filter that cannot be
- * supported in this way, addNamingListener() throws an
- * InvalidSearchFilterException.
+ * supported in this way, {@code addNamingListener()} throws an
+ * {@code InvalidSearchFilterException}.
*
- * See EventContext for a description of event source
+ * See {@code EventContext} for a description of event source
* and target, and information about listener registration/deregistration
* that are also applicable to methods in this interface.
* See the
* package description
* for information on threading issues.
*
- * A SearchControls or array object
+ * A {@code SearchControls} or array object
* passed as a parameter to any method is owned by the caller.
* The service provider will not modify the object or keep a reference to it.
*
@@ -64,15 +64,15 @@
public interface EventDirContext extends EventContext, DirContext {
/**
* Adds a listener for receiving naming events fired
- * when objects identified by the search filter filter at
+ * when objects identified by the search filter {@code filter} at
* the object named by target are modified.
*
* The scope, returningObj flag, and returningAttributes flag from
- * the search controls ctls are used to control the selection
+ * the search controls {@code ctls} are used to control the selection
* of objects that the listener is interested in,
* and determines what information is returned in the eventual
- * NamingEvent object. Note that the requested
- * information to be returned might not be present in the NamingEvent
+ * {@code NamingEvent} object. Note that the requested
+ * information to be returned might not be present in the {@code NamingEvent}
* object if they are unavailable or could not be obtained by the
* service provider or service.
*
@@ -91,9 +91,9 @@
/**
* Adds a listener for receiving naming events fired when
- * objects identified by the search filter filter at the
+ * objects identified by the search filter {@code filter} at the
* object named by the string target name are modified.
- * See the overload that accepts a Name for details of
+ * See the overload that accepts a {@code Name} for details of
* how this method behaves.
*
* @param target The nonnull string name of the object resolved relative to this context.
@@ -111,14 +111,14 @@
/**
* Adds a listener for receiving naming events fired
- * when objects identified by the search filter filter and
+ * when objects identified by the search filter {@code filter} and
* filter arguments at the object named by the target are modified.
* The scope, returningObj flag, and returningAttributes flag from
- * the search controls ctls are used to control the selection
+ * the search controls {@code ctls} are used to control the selection
* of objects that the listener is interested in,
* and determines what information is returned in the eventual
- * NamingEvent object. Note that the requested
- * information to be returned might not be present in the NamingEvent
+ * {@code NamingEvent} object. Note that the requested
+ * information to be returned might not be present in the {@code NamingEvent}
* object if they are unavailable or could not be obtained by the
* service provider or service.
*
@@ -138,10 +138,10 @@
/**
* Adds a listener for receiving naming events fired when
- * objects identified by the search filter filter
+ * objects identified by the search filter {@code filter}
* and filter arguments at the
* object named by the string target name are modified.
- * See the overload that accepts a Name for details of
+ * See the overload that accepts a {@code Name} for details of
* how this method behaves.
*
* @param target The nonnull string name of the object resolved relative to this context.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/NamespaceChangeListener.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamespaceChangeListener.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamespaceChangeListener.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,21 +28,21 @@
/**
* Specifies the methods that a listener interested in namespace changes
* must implement.
- * Specifically, the listener is interested in NamingEvents
- * with event types of OBJECT_ADDED, OBJECT_RENAMED, or
- * OBJECT_REMOVED.
+ * Specifically, the listener is interested in {@code NamingEvent}s
+ * with event types of {@code OBJECT_ADDED, OBJECT_RENAMED}, or
+ * {@code OBJECT_REMOVED}.
*
* Such a listener must:
*
* The binding of the newly added object can be obtained using
- * evt.getNewBinding().
+ * {@code evt.getNewBinding()}.
* @param evt The nonnull event.
* @see NamingEvent#OBJECT_ADDED
*/
@@ -70,7 +70,7 @@
* Called when an object has been removed.
*
* The binding of the newly removed object can be obtained using
- * evt.getOldBinding().
+ * {@code evt.getOldBinding()}.
* @param evt The nonnull event.
* @see NamingEvent#OBJECT_REMOVED
*/
@@ -80,8 +80,8 @@
* Called when an object has been renamed.
*
* The binding of the renamed object can be obtained using
- * evt.getNewBinding(). Its old binding (before the rename)
- * can be obtained using evt.getOldBinding().
+ * {@code evt.getNewBinding()}. Its old binding (before the rename)
+ * can be obtained using {@code evt.getOldBinding()}.
* One of these may be null if the old/new binding was outside the
* scope in which the listener has registered interest.
* @param evt The nonnull event.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/NamingEvent.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamingEvent.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamingEvent.java Wed Jul 05 20:44:51 2017 +0200
@@ -30,9 +30,9 @@
/**
* This class represents an event fired by a naming/directory service.
*
- * The NamingEvent's state consists of
+ * The {@code NamingEvent}'s state consists of
*
- * Note that the event source is always the same EventContext
+ * Note that the event source is always the same {@code EventContext}
* instance that the listener has registered with.
* Furthermore, the names of the bindings in
- * the NamingEvent are always relative to that instance.
+ * the {@code NamingEvent} are always relative to that instance.
* For example, suppose a listener makes the following registration:
*
- * The old/new binding in NamingEvent may be null if the old
+ * The old/new binding in {@code NamingEvent} may be null if the old
* name or new name is outside of the scope for which the listener
* has registered.
*
@@ -102,7 +102,7 @@
* corresponding provider might not be able to prevent those
* notifications from being propagated to the listeners.
*
- * The value of this constant is 2.
+ * The value of this constant is {@code 2}.
*/
public static final int OBJECT_RENAMED = 2;
@@ -114,7 +114,7 @@
* be implemented by first removing the old binding and adding
* a new binding containing the same name but a different object.
*
- * The value of this constant is 3.
+ * The value of this constant is {@code 3}.
*/
public static final int OBJECT_CHANGED = 3;
@@ -147,16 +147,16 @@
protected Binding newBinding;
/**
- * Constructs an instance of NamingEvent.
+ * Constructs an instance of {@code NamingEvent}.
*
- * The names in newBd and oldBd are to be resolved relative
- * to the event source source.
+ * The names in {@code newBd} and {@code oldBd} are to be resolved relative
+ * to the event source {@code source}.
*
- * For an OBJECT_ADDED event type, newBd must not be null.
- * For an OBJECT_REMOVED event type, oldBd must not be null.
- * For an OBJECT_CHANGED event type, newBd and
- * oldBd must not be null. For an OBJECT_RENAMED event type,
- * one of newBd or oldBd may be null if the new or old
+ * For an {@code OBJECT_ADDED} event type, {@code newBd} must not be null.
+ * For an {@code OBJECT_REMOVED} event type, {@code oldBd} must not be null.
+ * For an {@code OBJECT_CHANGED} event type, {@code newBd} and
+ * {@code oldBd} must not be null. For an {@code OBJECT_RENAMED} event type,
+ * one of {@code newBd} or {@code oldBd} may be null if the new or old
* binding is outside of the scope for which the listener has registered.
*
* @param source The non-null context that fired this event.
@@ -192,13 +192,13 @@
/**
* Retrieves the event source that fired this event.
- * This returns the same object as EventObject.getSource().
+ * This returns the same object as {@code EventObject.getSource()}.
*
* If the result of this method is used to access the
* event source, for example, to look up the object or get its attributes,
- * then it needs to be locked because implementations of Context
+ * then it needs to be locked because implementations of {@code Context}
* are not guaranteed to be thread-safe
- * (and EventContext is a subinterface of Context).
+ * (and {@code EventContext} is a subinterface of {@code Context}).
* See the
* package description
* for more information on threading issues.
@@ -213,16 +213,16 @@
* Retrieves the binding of the object before the change.
*
* The binding must be nonnull if the object existed before the change
- * relative to the source context (getEventContext()).
- * That is, it must be nonnull for OBJECT_REMOVED and
- * OBJECT_CHANGED.
- * For OBJECT_RENAMED, it is null if the object before the rename
+ * relative to the source context ({@code getEventContext()}).
+ * That is, it must be nonnull for {@code OBJECT_REMOVED} and
+ * {@code OBJECT_CHANGED}.
+ * For {@code OBJECT_RENAMED}, it is null if the object before the rename
* is outside of the scope for which the listener has registered interest;
* it is nonnull if the object is inside the scope before the rename.
*
* The name in the binding is to be resolved relative
- * to the event source getEventContext().
- * The object returned by Binding.getObject() may be null if
+ * to the event source {@code getEventContext()}.
+ * The object returned by {@code Binding.getObject()} may be null if
* such information is unavailable.
*
* @return The possibly null binding of the object before the change.
@@ -235,16 +235,16 @@
* Retrieves the binding of the object after the change.
*
* The binding must be nonnull if the object existed after the change
- * relative to the source context (getEventContext()).
- * That is, it must be nonnull for OBJECT_ADDED and
- * OBJECT_CHANGED. For OBJECT_RENAMED,
+ * relative to the source context ({@code getEventContext()}).
+ * That is, it must be nonnull for {@code OBJECT_ADDED} and
+ * {@code OBJECT_CHANGED}. For {@code OBJECT_RENAMED},
* it is null if the object after the rename is outside the scope for
* which the listener registered interest; it is nonnull if the object
* is inside the scope after the rename.
*
* The name in the binding is to be resolved relative
- * to the event source getEventContext().
- * The object returned by Binding.getObject() may be null if
+ * to the event source {@code getEventContext()}.
+ * The object returned by {@code Binding.getObject()} may be null if
* such information is unavailable.
*
* @return The possibly null binding of the object after the change.
@@ -268,8 +268,8 @@
* Invokes the appropriate listener method on this event.
* The default implementation of
* this method handles the following event types:
- * OBJECT_ADDED, OBJECT_REMOVED,
- * OBJECT_RENAMED, OBJECT_CHANGED.
+ * {@code OBJECT_ADDED, OBJECT_REMOVED,
+ * OBJECT_RENAMED, OBJECT_CHANGED}.
*
* The listener method is executed in the same thread
* as this method. See the
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/NamingExceptionEvent.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamingExceptionEvent.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamingExceptionEvent.java Wed Jul 05 20:44:51 2017 +0200
@@ -30,9 +30,9 @@
/**
* This class represents an event fired when the procedures/processes
* used to collect information for notifying listeners of
- * NamingEvents threw a NamingException.
+ * {@code NamingEvent}s threw a {@code NamingException}.
* This can happen, for example, if the server which the listener is using
- * aborts subsequent to the addNamingListener() call.
+ * aborts subsequent to the {@code addNamingListener()} call.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -50,12 +50,12 @@
private NamingException exception;
/**
- * Constructs an instance of NamingExceptionEvent using
- * the context in which the NamingException was thrown and the exception
+ * Constructs an instance of {@code NamingExceptionEvent} using
+ * the context in which the {@code NamingException} was thrown and the exception
* that was thrown.
*
* @param source The non-null context in which the exception was thrown.
- * @param exc The non-null NamingException that was thrown.
+ * @param exc The non-null {@code NamingException} that was thrown.
*
*/
public NamingExceptionEvent(EventContext source, NamingException exc) {
@@ -72,16 +72,16 @@
}
/**
- * Retrieves the EventContext that fired this event.
- * This returns the same object as EventObject.getSource().
- * @return The non-null EventContext that fired this event.
+ * Retrieves the {@code EventContext} that fired this event.
+ * This returns the same object as {@code EventObject.getSource()}.
+ * @return The non-null {@code EventContext} that fired this event.
*/
public EventContext getEventContext() {
return (EventContext)getSource();
}
/**
- * Invokes the namingExceptionThrown() method on
+ * Invokes the {@code namingExceptionThrown()} method on
* a listener using this event.
* @param listener The non-null naming listener on which to invoke
* the method.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/NamingListener.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/NamingListener.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/NamingListener.java Wed Jul 05 20:44:51 2017 +0200
@@ -27,22 +27,22 @@
/**
* This interface is the root of listener interfaces that
- * handle NamingEvents.
+ * handle {@code NamingEvent}s.
* It does not make sense for a listener to implement just this interface.
- * A listener typically implements a subinterface of NamingListener,
- * such as ObjectChangeListener or NamespaceChangeListener.
+ * A listener typically implements a subinterface of {@code NamingListener},
+ * such as {@code ObjectChangeListener} or {@code NamespaceChangeListener}.
*
- * This interface contains a single method, namingExceptionThrown(),
+ * This interface contains a single method, {@code namingExceptionThrown()},
* that must be implemented so that the listener can be notified of
* exceptions that are thrown (by the service provider) while gathering
* information about the events that they're interested in.
* When this method is invoked, the listener has been automatically deregistered
- * from the EventContext with which it has registered.
+ * from the {@code EventContext} with which it has registered.
*
- * For example, suppose a listener implements ObjectChangeListener and
- * registers with a EventContext.
+ * For example, suppose a listener implements {@code ObjectChangeListener} and
+ * registers with a {@code EventContext}.
* Then, if the connection to the server is subsequently broken,
- * the listener will receive a NamingExceptionEvent and may
+ * the listener will receive a {@code NamingExceptionEvent} and may
* take some corrective action, such as notifying the user of the application.
*
* @author Rosanna Lee
@@ -57,7 +57,7 @@
public interface NamingListener extends java.util.EventListener {
/**
* Called when a naming exception is thrown while attempting
- * to fire a NamingEvent.
+ * to fire a {@code NamingEvent}.
*
* @param evt The nonnull event.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/ObjectChangeListener.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/ObjectChangeListener.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/ObjectChangeListener.java Wed Jul 05 20:44:51 2017 +0200
@@ -26,27 +26,27 @@
package javax.naming.event;
/**
- * Specifies the method that a listener of a NamingEvent
- * with event type of OBJECT_CHANGED must implement.
+ * Specifies the method that a listener of a {@code NamingEvent}
+ * with event type of {@code OBJECT_CHANGED} must implement.
*
- * An OBJECT_CHANGED event type is fired when (the contents of)
+ * An {@code OBJECT_CHANGED} event type is fired when (the contents of)
* an object has changed. This might mean that its attributes have been modified,
* added, or removed, and/or that the object itself has been replaced.
* How the object has changed can be determined by examining the
- * NamingEvent's old and new bindings.
+ * {@code NamingEvent}'s old and new bindings.
*
- * A listener interested in OBJECT_CHANGED event types must:
+ * A listener interested in {@code OBJECT_CHANGED} event types must:
*
* The binding of the changed object can be obtained using
- * evt.getNewBinding(). Its old binding (before the change)
- * can be obtained using evt.getOldBinding().
+ * {@code evt.getNewBinding()}. Its old binding (before the change)
+ * can be obtained using {@code evt.getOldBinding()}.
* @param evt The nonnull naming event.
* @see NamingEvent#OBJECT_CHANGED
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/package.html
--- a/jdk/src/java.naming/share/classes/javax/naming/event/package.html Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/package.html Wed Jul 05 20:44:51 2017 +0200
@@ -42,21 +42,21 @@
-This package defines a NamingEvent class to represent an event
+This package defines a
-NamingEvent represents an event that occurs in a
+
An application, for example, can register its interest in changes to
objects in a context as follows:
@@ -82,19 +82,19 @@
-When a listener instance invokes NamingEvent.getEventContext(),
+When a listener instance invokes
- * Typically, ctl is a "basic" control containing
+ * Typically, {@code ctl} is a "basic" control containing
* BER encoded data. The factory is used to create a specialized
* control implementation, usually by decoding the BER encoded data,
* that provides methods to access that data in a type-safe and friendly
@@ -80,14 +80,14 @@
* it is the only intended factory and that no other control factories
* should be tried. This might happen, for example, if the BER data
* in the control does not match what is expected of a control with
- * the given OID. Since this method throws NamingException,
+ * the given OID. Since this method throws {@code NamingException},
* any other internally generated exception that should be propagated
- * must be wrapped inside a NamingException.
+ * must be wrapped inside a {@code NamingException}.
*
* @param ctl A non-null control.
*
* @return A possibly null Control.
- * @exception NamingException If ctl contains invalid data that prevents it
+ * @exception NamingException If {@code ctl} contains invalid data that prevents it
* from being used to create a control. A factory should only throw
* an exception if it knows how to produce the control (identified by the OID)
* but is unable to because of, for example invalid BER data.
@@ -100,14 +100,14 @@
* The following rule is used to create the control:
*
* For example, suppose the LDAP server supported a 'get time' extended operation.
@@ -90,7 +90,7 @@
* Retrieves the object identifier of the request.
*
* @return The non-null object identifier string representing the LDAP
- * ExtendedRequest.requestName component.
+ * {@code ExtendedRequest.requestName} component.
*/
public String getID();
@@ -104,7 +104,7 @@
* put into the extended operation to be sent to the LDAP server.
*
* @return A possibly null byte array representing the ASN.1 BER encoded
- * contents of the LDAP ExtendedRequest.requestValue
+ * contents of the LDAP {@code ExtendedRequest.requestValue}
* component.
* @exception IllegalStateException If the encoded value cannot be retrieved
* because the request contains insufficient or invalid data/state.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedResponse.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedResponse.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedResponse.java Wed Jul 05 20:44:51 2017 +0200
@@ -78,7 +78,7 @@
* If the server does not send it, the response will contain no ID (i.e. null).
*
* @return A possibly null object identifier string representing the LDAP
- * ExtendedResponse.responseName component.
+ * {@code ExtendedResponse.responseName} component.
*/
public String getID();
@@ -90,7 +90,7 @@
* the response value. It does not include the response OID.
*
* @return A possibly null byte array representing the ASN.1 BER encoded
- * contents of the LDAP ExtendedResponse.response
+ * contents of the LDAP {@code ExtendedResponse.response}
* component.
*/
public byte[] getEncodedValue();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/HasControls.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/HasControls.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/HasControls.java Wed Jul 05 20:44:51 2017 +0200
@@ -60,10 +60,10 @@
public interface HasControls {
/**
- * Retrieves an array of Controls from the object that
+ * Retrieves an array of {@code Control}s from the object that
* implements this interface. It is null if there are no controls.
*
- * @return A possibly null array of Control objects.
+ * @return A possibly null array of {@code Control} objects.
* @throws NamingException If cannot return controls due to an error.
*/
public Control[] getControls() throws NamingException;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/InitialLdapContext.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/InitialLdapContext.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/InitialLdapContext.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,24 +34,24 @@
* This class is the starting context for performing
* LDAPv3-style extended operations and controls.
*
- * See javax.naming.InitialContext and
- * javax.naming.InitialDirContext for details on synchronization,
+ * See {@code javax.naming.InitialContext} and
+ * {@code javax.naming.InitialDirContext} for details on synchronization,
* and the policy for how an initial context is created.
*
*
* The request controls supplied to the initial context constructor
* are not used as the context request controls
* for subsequent context operations such as searches and lookups.
* Context request controls are set and updated by using
- * setRequestControls().
+ * {@code setRequestControls()}.
*
* As shown, there can be two different sets of request controls
* associated with a context: connection request controls and context
@@ -67,14 +67,14 @@
* Controls[] respCtls = lctx.getResponseControls();
*
* Service provider implementors should read the "Service Provider" section
- * in the LdapContext class description for implementation details.
+ * in the {@code LdapContext} class description for implementation details.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -94,7 +94,7 @@
/**
* Constructs an initial context using no environment properties or
* connection request controls.
- * Equivalent to new InitialLdapContext(null, null).
+ * Equivalent to {@code new InitialLdapContext(null, null)}.
*
* @throws NamingException if a naming exception is encountered
*/
@@ -105,15 +105,15 @@
/**
* Constructs an initial context
* using environment properties and connection request controls.
- * See javax.naming.InitialContext for a discussion of
+ * See {@code javax.naming.InitialContext} for a discussion of
* environment properties.
*
* This constructor will not modify its parameters or
* save references to them, but may save a clone or copy.
* Caller should not modify mutable keys and values in
- * environment after it has been passed to the constructor.
+ * {@code environment} after it has been passed to the constructor.
*
- * connCtls is used as the underlying context instance's
+ * {@code connCtls} is used as the underlying context instance's
* connection request controls. See the class description
* for details.
*
@@ -159,7 +159,7 @@
*
* @return The non-null cached initial context.
* @exception NotContextException If the initial context is not an
- * instance of LdapContext.
+ * instance of {@code LdapContext}.
* @exception NamingException If a naming exception was encountered.
*/
private LdapContext getDefaultLdapInitCtx() throws NamingException{
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapContext.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,7 +35,7 @@
* extended operations.
*
* For applications that do not require such controls or extended
- * operations, the more generic javax.naming.directory.DirContext
+ * operations, the more generic {@code javax.naming.directory.DirContext}
* should be used instead.
*
*
* Unlike environment properties, request controls of a context instance
* are not inherited by context instances that are derived from
- * it. Derived context instances have null as their context
+ * it. Derived context instances have {@code null} as their context
* request controls. You must set the request controls of a derived context
- * instance explicitly using setRequestControls().
+ * instance explicitly using {@code setRequestControls()}.
*
* A context instance's request controls are retrieved using
- * the method getRequestControls().
+ * the method {@code getRequestControls()}.
*
*
* Like environment properties, connection request controls of a context
* are inherited by contexts that are derived from it.
* Typically, you initialize the connection request controls using the
- * InitialLdapContext constructor or
- * LdapReferralContext.getReferralContext(). These connection
+ * {@code InitialLdapContext} constructor or
+ * {@code LdapReferralContext.getReferralContext()}. These connection
* request controls are inherited by contexts that share the same
* connection--that is, contexts derived from the initial or referral
* contexts.
*
- * Use reconnect() to change the connection request controls of
+ * Use {@code reconnect()} to change the connection request controls of
* a context.
- * Invoking ldapContext.reconnect() affects only the
- * connection used by ldapContext and any new contexts instances that are
- * derived form ldapContext. Contexts that previously shared the
- * connection with ldapContext remain unchanged. That is, a context's
+ * Invoking {@code ldapContext.reconnect()} affects only the
+ * connection used by {@code ldapContext} and any new contexts instances that are
+ * derived form {@code ldapContext}. Contexts that previously shared the
+ * connection with {@code ldapContext} remain unchanged. That is, a context's
* connection request controls must be explicitly changed and is not
* affected by changes to another context's connection request
* controls.
*
* A context instance's connection request controls are retrieved using
- * the method getConnectControls().
+ * the method {@code getConnectControls()}.
*
*
- * This method sets this context's connCtls
+ * This method sets this context's {@code connCtls}
* to be its new connection request controls. This context's
* context request controls are not affected.
* After this method has been invoked, any subsequent
- * implicit reconnections will be done using connCtls.
- * connCtls are also used as
+ * implicit reconnections will be done using {@code connCtls}.
+ * {@code connCtls} are also used as
* connection request controls for new context instances derived from this
* context.
* These connection request controls are not
- * affected by setRequestControls().
+ * affected by {@code setRequestControls()}.
*
* Service provider implementors should read the "Service Provider" section
* in the class description for implementation details.
@@ -266,17 +266,17 @@
* caller.
*
* This removes any previous request controls and adds
- * requestControls
+ * {@code requestControls}
* for use by subsequent methods invoked on this context.
* This method does not affect this context's connection request controls.
*
- * Note that requestControls will be in effect until the next
- * invocation of setRequestControls(). You need to explicitly
- * invoke setRequestControls() with null or an empty
+ * Note that {@code requestControls} will be in effect until the next
+ * invocation of {@code setRequestControls()}. You need to explicitly
+ * invoke {@code setRequestControls()} with {@code null} or an empty
* array to clear the controls if you don't want them to affect the
* context methods any more.
* To check what request controls are in effect for this context, use
- * getRequestControls().
+ * {@code getRequestControls()}.
* @param requestControls The possibly null controls to use. If null, no
* controls are used.
* @exception NamingException If an error occurred while setting the
@@ -312,10 +312,10 @@
*
* When a context method that may return response controls is invoked,
* response controls from the previous method invocation are cleared.
- * getResponseControls() returns all of the response controls
+ * {@code getResponseControls()} returns all of the response controls
* generated by LDAP operations used by the context method in the order
* received from the LDAP server.
- * Invoking getResponseControls() does not
+ * Invoking {@code getResponseControls()} does not
* clear the response controls. You can call it many times (and get
* back the same controls) until the next context method that may return
* controls is invoked.
@@ -333,7 +333,7 @@
* of the property should be a colon-separated list of the fully
* qualified class names of factory classes that will create a control
* given another control. See
- * ControlFactory.getControlInstance() for details.
+ * {@code ControlFactory.getControlInstance()} for details.
* This property may be specified in the environment, a system property,
* or one or more resource files.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/LdapName.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapName.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/LdapName.java Wed Jul 05 20:44:51 2017 +0200
@@ -59,7 +59,7 @@
* characters (unescaped) are accepted.
*
- * String names passed to
- *
* Concurrent multithreaded read-only access of an instance of
- * LdapName need not be synchronized.
+ * {@code LdapName} need not be synchronized.
*
* Unless otherwise noted, the behavior of passing a null argument
* to a constructor or method in this class will cause a
@@ -129,7 +129,7 @@
* The indexing of RDNs in the list follows the numbering of
* RDNs described in the class description.
*
- * @param rdns The non-null list of Rdns forming this LDAP name.
+ * @param rdns The non-null list of {@code Rdn}s forming this LDAP name.
*/
public LdapName(List
- * A Control[] array passed as a parameter to
- * the getReferralContext() method is owned by the caller.
+ * A {@code Control[]} array passed as a parameter to
+ * the {@code getReferralContext()} method is owned by the caller.
* The service provider will not modify the array or keep a reference to it,
- * although it may keep references to the individual Control objects
+ * although it may keep references to the individual {@code Control} objects
* in the array.
*
* @author Rosanna Lee
@@ -73,20 +73,20 @@
* Retrieves the context at which to continue the method using the
* context's environment and no controls.
* The referral context is created using the environment properties of
- * the context that threw the ReferralException and no controls.
+ * the context that threw the {@code ReferralException} and no controls.
*
* This method is equivalent to
*
* It is overridden in this class for documentation purposes only.
- * See ReferralException for how to use this method.
+ * See {@code ReferralException} for how to use this method.
*
* @return The non-null context at which to continue the method.
* @exception NamingException If a naming exception was encountered.
- * Call either retryReferral() or skipReferral()
+ * Call either {@code retryReferral()} or {@code skipReferral()}
* to continue processing referrals.
*/
public abstract Context getReferralContext() throws NamingException;
@@ -94,7 +94,7 @@
/**
* Retrieves the context at which to continue the method using
* environment properties and no controls.
- * The referral context is created using env as its environment
+ * The referral context is created using {@code env} as its environment
* properties and no controls.
*
* This method is equivalent to
@@ -103,14 +103,14 @@
*
*
* It is overridden in this class for documentation purposes only.
- * See ReferralException for how to use this method.
+ * See {@code ReferralException} for how to use this method.
*
* @param env The possibly null environment to use when retrieving the
* referral context. If null, no environment properties will be used.
*
* @return The non-null context at which to continue the method.
* @exception NamingException If a naming exception was encountered.
- * Call either retryReferral() or skipReferral()
+ * Call either {@code retryReferral()} or {@code skipReferral()}
* to continue processing referrals.
*/
public abstract Context
@@ -127,12 +127,12 @@
* To continue the operation, the client program should re-invoke
* the method using the same arguments as the original invocation.
*
- * reqCtls is used when creating the connection to the referred
+ * {@code reqCtls} is used when creating the connection to the referred
* server. These controls will be used as the connection request controls for
* the context and context instances
* derived from the context.
- * reqCtls will also be the context's request controls for
- * subsequent context operations. See the LdapContext class
+ * {@code reqCtls} will also be the context's request controls for
+ * subsequent context operations. See the {@code LdapContext} class
* description for details.
*
* This method should be used instead of the other two overloaded forms
@@ -141,7 +141,7 @@
* it needs to supply special controls relating to authentication.
*
* Service provider implementors should read the "Service Provider" section
- * in the LdapContext class description for implementation details.
+ * in the {@code LdapContext} class description for implementation details.
*
* @param reqCtls The possibly null request controls to use for the new context.
* If null or the empty array means use no request controls.
@@ -150,7 +150,7 @@
* properties.
* @return The non-null context at which to continue the method.
* @exception NamingException If a naming exception was encountered.
- * Call either retryReferral() or skipReferral()
+ * Call either {@code retryReferral()} or {@code skipReferral()}
* to continue processing referrals.
*/
public abstract Context
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/Rdn.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/Rdn.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/Rdn.java Wed Jul 05 20:44:51 2017 +0200
@@ -50,7 +50,7 @@
* An example of an RDN is "OU=Sales+CN=J.Smith". In this example,
* the RDN consist of multiple attribute type/value pairs. The
* RDN is parsed as described in the class description for
- * {@link javax.naming.ldap.LdapName LdapName}.
+ * {@link javax.naming.ldap.LdapName LdapName}.
*
* The Rdn class represents an RDN as attribute type/value mappings,
* which can be viewed using
@@ -79,11 +79,11 @@
* Rdn rdn = new Rdn("cn", "Juicy, Fruit");
* System.out.println(rdn.toString());
*
- * The last line will print cn=Juicy\, Fruit. The
- * {@link #unescapeValue(String) unescapeValue()} method can be
+ * The last line will print {@code cn=Juicy\, Fruit}. The
+ * {@link #unescapeValue(String) unescapeValue()} method can be
* used to unescape the escaped comma resulting in the original
- * value "Juicy, Fruit". The {@link #escapeValue(Object)
- * escapeValue()} method adds the escape back preceding the comma.
+ * value {@code "Juicy, Fruit"}. The {@link #escapeValue(Object)
+ * escapeValue()} method adds the escape back preceding the comma.
*
* This class can be instantiated by a string representation
* of the RDN defined in RFC 2253 as shown in the following code example:
@@ -91,10 +91,10 @@
* Rdn rdn = new Rdn("cn=Juicy\\, Fruit");
* System.out.println(rdn.toString());
*
- * The last line will print cn=Juicy\, Fruit.
+ * The last line will print {@code cn=Juicy\, Fruit}.
*
* Concurrent multithreaded read-only access of an instance of
- * Rdn need not be synchronized.
+ * {@code Rdn} need not be synchronized.
*
* Unless otherwise noted, the behavior of passing a null argument
* to a constructor or method in this class will cause NullPointerException
@@ -123,7 +123,7 @@
*
* @param attrSet The non-null and non-empty attributes containing
* type/value mappings.
- * @throws InvalidNameException If contents of attrSet cannot
+ * @throws InvalidNameException If contents of {@code attrSet} cannot
* be used to construct a valid RDN.
*/
public Rdn(Attributes attrSet) throws InvalidNameException {
@@ -166,8 +166,8 @@
}
/**
- * Constructs an Rdn from the given rdn.
- * The contents of the rdn are simply copied into the newly
+ * Constructs an Rdn from the given {@code rdn}.
+ * The contents of the {@code rdn} are simply copied into the newly
* created Rdn.
* @param rdn The non-null Rdn to be copied.
*/
@@ -583,7 +583,7 @@
* This method is generous in accepting the values and does not
* catch all illegal values.
* Therefore, passing in an illegal value might not necessarily
- * trigger an IllegalArgumentException.
+ * trigger an {@code IllegalArgumentException}.
*
* @param val The non-null string to be unescaped.
* @return Unescaped value.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsRequest.java Wed Jul 05 20:44:51 2017 +0200
@@ -43,9 +43,9 @@
* The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037
* and no extended request value is defined.
*
- * StartTlsRequest/StartTlsResponse are used to establish
+ * {@code StartTlsRequest}/{@code StartTlsResponse} are used to establish
* a TLS connection over the existing LDAP connection associated with
- * the JNDI context on which extendedOperation() is invoked.
+ * the JNDI context on which {@code extendedOperation()} is invoked.
* Typically, a JNDI program uses these classes as follows.
*
* This method locates the implementation class by locating
* configuration files that have the name:
- *
* Each configuration file should contain a list of fully-qualified class
* names, one per line. Space and tab characters surrounding each name, as
- * well as blank lines, are ignored. The comment character is '#'
- * (0x23); on each line all characters following the first comment
+ * well as blank lines, are ignored. The comment character is {@code '#'}
+ * ({@code 0x23}); on each line all characters following the first comment
* character are ignored. The file must be encoded in UTF-8.
*
* This method will return an instance of the first implementation
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsResponse.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsResponse.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/StartTlsResponse.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,7 +42,7 @@
*
* The Start TLS extended request and response are used to establish
* a TLS connection over the existing LDAP connection associated with
- * the JNDI context on which extendedOperation() is invoked.
+ * the JNDI context on which {@code extendedOperation()} is invoked.
* Typically, a JNDI program uses the StartTLS extended request and response
* classes as follows.
*
- * This method is equivalent to negotiate(null).
+ * This method is equivalent to {@code negotiate(null)}.
*
* @return The negotiated SSL session
* @throws IOException If an IO error was encountered while establishing
@@ -167,16 +167,16 @@
* attaches it to the existing connection. Performs the TLS handshake
* and returns the negotiated session information.
*
- * If cipher suites have been set via setEnabledCipherSuites
+ * If cipher suites have been set via {@code setEnabledCipherSuites}
* then they are enabled before the TLS handshake begins.
*
* Hostname verification is performed after the TLS handshake completes.
* The default hostname verification performs a match of the server's
* hostname against the hostname information found in the server's certificate.
* If this verification fails and no callback has been set via
- * setHostnameVerifier then the negotiation fails.
+ * {@code setHostnameVerifier} then the negotiation fails.
* If this verification fails and a callback has been set via
- * setHostnameVerifier, then the callback is used to determine whether
+ * {@code setHostnameVerifier}, then the callback is used to determine whether
* the negotiation succeeds.
*
* If an error occurs then the SSL socket is closed and an IOException
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotification.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotification.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotification.java Wed Jul 05 20:44:51 2017 +0200
@@ -32,7 +32,7 @@
* RFC 2251.
* An unsolicited notification is sent by the LDAP server to the LDAP
* client without any provocation from the client.
- * Its format is that of an extended response (ExtendedResponse).
+ * Its format is that of an extended response ({@code ExtendedResponse}).
*
* @author Rosanna Lee
* @author Scott Seligman
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationEvent.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationEvent.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationEvent.java Wed Jul 05 20:44:51 2017 +0200
@@ -49,7 +49,7 @@
private UnsolicitedNotification notice;
/**
- * Constructs a new instance of UnsolicitedNotificationEvent.
+ * Constructs a new instance of {@code UnsolicitedNotificationEvent}.
*
* @param src The non-null source that fired the event.
* @param notice The non-null unsolicited notification.
@@ -71,10 +71,10 @@
}
/**
- * Invokes the notificationReceived() method on
+ * Invokes the {@code notificationReceived()} method on
* a listener using this event.
* @param listener The non-null listener on which to invoke
- * notificationReceived.
+ * {@code notificationReceived}.
*/
public void dispatch(UnsolicitedNotificationListener listener) {
listener.notificationReceived(this);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationListener.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationListener.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/UnsolicitedNotificationListener.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,20 +28,20 @@
import javax.naming.event.NamingListener;
/**
- * This interface is for handling UnsolicitedNotificationEvent.
+ * This interface is for handling {@code UnsolicitedNotificationEvent}.
* "Unsolicited notification" is defined in
* RFC 2251.
* It allows the server to send unsolicited notifications to the client.
- * A UnsolicitedNotificationListener must:
+ * A {@code UnsolicitedNotificationListener} must:
*
-This package defines the interface ExtendedRequest
+This package defines the interface
For example, suppose an LDAP server supports a "get time" extended operation.
It would supply classes such as
-GetTimeRequest and GetTimeResponse,
+
-The GetTimeRequest and GetTimeResponse classes might
+The
For example, suppose an LDAP server supports a "signed results"
request control, which when sent with a request, asks the
-server to digitally sign the results of an operation.
-It would supply a class SignedResultsControl so that applications
+server to digitally sign the results of an operation.
+It would supply a class
When a service provider receives response controls, it uses
-the ControlFactory class to produce specific classes
-that implement the Control interface.
+the
An LDAP server can send back response controls with an LDAP operation
and also with enumeration results, such as those returned
by a list or search operation.
-The LdapContext provides a method (getResponseControls())
+The
For example, suppose an LDAP server sends back a "change ID" control in response
-to a successful modification. It would supply a class ChangeIDControl
+to a successful modification. It would supply a class
This package defines the notion of a context, represented
-by the Context interface.
+by the
-lookup() is the most commonly used operation.
-You supply lookup()
+
-Every naming method in the Context
+Every naming method in the
-The overloads that accept Name
+The overloads that accept
-The Binding class is actually a subclass of
-NameClassPair, which consists
+The
* The JNDI framework allows for object implementations to
* be loaded in dynamically via object factories. See
- * ObjectFactory for details.
+ * {@code ObjectFactory} for details.
*
- * A DirObjectFactory extends ObjectFactory by allowing
- * an Attributes instance
- * to be supplied to the getObjectInstance() method.
- * DirObjectFactory implementations are intended to be used by DirContext
+ * A {@code DirObjectFactory} extends {@code ObjectFactory} by allowing
+ * an {@code Attributes} instance
+ * to be supplied to the {@code getObjectInstance()} method.
+ * {@code DirObjectFactory} implementations are intended to be used by {@code DirContext}
* service providers. The service provider, in addition reading an
* object from the directory, might already have attributes that
* are useful for the object factory to check to see whether the
@@ -71,34 +71,34 @@
* An example of such an environment property is user identity
* information.
*
- * DirectoryManager.getObjectInstance()
- * successively loads in object factories. If it encounters a DirObjectFactory,
- * it will invoke DirObjectFactory.getObjectInstance();
+ * {@code DirectoryManager.getObjectInstance()}
+ * successively loads in object factories. If it encounters a {@code DirObjectFactory},
+ * it will invoke {@code DirObjectFactory.getObjectInstance()};
* otherwise, it invokes
- * ObjectFactory.getObjectInstance(). It does this until a factory
+ * {@code ObjectFactory.getObjectInstance()}. It does this until a factory
* produces a non-null answer.
* When an exception
* is thrown by an object factory, the exception is passed on to the caller
- * of DirectoryManager.getObjectInstance(). The search for other factories
+ * of {@code DirectoryManager.getObjectInstance()}. The search for other factories
* that may produce a non-null answer is halted.
* An object factory should only throw an exception if it is sure that
* it is the only intended factory and that no other object factories
* should be tried.
* If this factory cannot create an object using the arguments supplied,
* it should return null.
- * Since DirObjectFactory extends ObjectFactory, it
+ * Since {@code DirObjectFactory} extends {@code ObjectFactory}, it
* effectively
- * has two getObjectInstance() methods, where one differs from the other by
- * the attributes argument. Given a factory that implements DirObjectFactory,
- * DirectoryManager.getObjectInstance() will only
+ * has two {@code getObjectInstance()} methods, where one differs from the other by
+ * the attributes argument. Given a factory that implements {@code DirObjectFactory},
+ * {@code DirectoryManager.getObjectInstance()} will only
* use the method that accepts the attributes argument, while
- * NamingManager.getObjectInstance() will only use the one that does not accept
+ * {@code NamingManager.getObjectInstance()} will only use the one that does not accept
* the attributes argument.
*
- * See ObjectFactory for a description URL context factories and other
- * properties of object factories that apply equally to DirObjectFactory.
+ * See {@code ObjectFactory} for a description URL context factories and other
+ * properties of object factories that apply equally to {@code DirObjectFactory}.
*
- * The name, attrs, and environment parameters
+ * The {@code name}, {@code attrs}, and {@code environment} parameters
* are owned by the caller.
* The implementation will not modify these objects or keep references
* to them, although it may keep references to clones or copies.
@@ -112,10 +112,10 @@
* relative to the default initial context.
* @param environment The possibly null environment that is used in
* creating the object.
- * @param attrs The possibly null attributes containing some of obj's
- * attributes. attrs might not necessarily have all of obj's
+ * @param attrs The possibly null attributes containing some of {@code obj}'s
+ * attributes. {@code attrs} might not necessarily have all of {@code obj}'s
* attributes. If the object factory requires more attributes, it needs
- * to get it, either using obj, or name and nameCtx.
+ * to get it, either using {@code obj}, or {@code name} and {@code nameCtx}.
* The factory must not modify attrs.
* @return The object created; null if an object cannot be created.
* @exception Exception If this object factory encountered an exception
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/DirStateFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -33,17 +33,17 @@
* object and corresponding attributes for binding.
*
* The JNDI framework allows for object implementations to
- * be loaded in dynamically via object factories.
+ * be loaded in dynamically via {@code object factories}.
*
- * A DirStateFactory extends StateFactory
- * by allowing an Attributes instance
- * to be supplied to and be returned by the getStateToBind() method.
- * DirStateFactory implementations are intended to be used by
- * DirContext service providers.
- * When a caller binds an object using DirContext.bind(),
+ * A {@code DirStateFactory} extends {@code StateFactory}
+ * by allowing an {@code Attributes} instance
+ * to be supplied to and be returned by the {@code getStateToBind()} method.
+ * {@code DirStateFactory} implementations are intended to be used by
+ * {@code DirContext} service providers.
+ * When a caller binds an object using {@code DirContext.bind()},
* he might also specify a set of attributes to be bound with the object.
* The object and attributes to be bound are passed to
- * the getStateToBind() method of a factory.
+ * the {@code getStateToBind()} method of a factory.
* If the factory processes the object and attributes, it returns
* a corresponding pair of object and attributes to be bound.
* If the factory does not process the object, it must return null.
@@ -53,23 +53,23 @@
* Since DirStateFactory extends StateFactory, it
- * has two getStateToBind() methods, where one
+ * Since {@code DirStateFactory} extends {@code StateFactory}, it
+ * has two {@code getStateToBind()} methods, where one
* differs from the other by the attributes
- * argument. DirectoryManager.getStateToBind() will only use
+ * argument. {@code DirectoryManager.getStateToBind()} will only use
* the form that accepts the attributes argument, while
- * NamingManager.getStateToBind() will only use the form that
+ * {@code NamingManager.getStateToBind()} will only use the form that
* does not accept the attributes argument.
*
- * Either form of the getStateToBind() method of a
+ * Either form of the {@code getStateToBind()} method of a
* DirStateFactory may be invoked multiple times, possibly using different
* parameters. The implementation is thread-safe.
*
@@ -85,15 +85,15 @@
* Retrieves the state of an object for binding given the object and attributes
* to be transformed.
*
- * DirectoryManager.getStateToBind()
+ * {@code DirectoryManager.getStateToBind()}
* successively loads in state factories. If a factory implements
- * DirStateFactory, DirectoryManager invokes this method;
- * otherwise, it invokes StateFactory.getStateToBind().
+ * {@code DirStateFactory}, {@code DirectoryManager} invokes this method;
+ * otherwise, it invokes {@code StateFactory.getStateToBind()}.
* It does this until a factory produces a non-null answer.
*
* When an exception is thrown by a factory,
* the exception is passed on to the caller
- * of DirectoryManager.getStateToBind(). The search for other factories
+ * of {@code DirectoryManager.getStateToBind()}. The search for other factories
* that may produce a non-null answer is halted.
* A factory should only throw an exception if it is sure that
* it is the only intended factory and that no other factories
@@ -101,36 +101,36 @@
* If this factory cannot create an object using the arguments supplied,
* it should return null.
*
- * The
- * The name, inAttrs, and environment parameters
+ * The {@code name}, {@code inAttrs}, and {@code environment} parameters
* are owned by the caller.
* The implementation will not modify these objects or keep references
* to them, although it may keep references to clones or copies.
* The object returned by this method is owned by the caller.
* The implementation will not subsequently modify it.
- * It will contain either a new Attributes object that is
+ * It will contain either a new {@code Attributes} object that is
* likewise owned by the caller, or a reference to the original
- * inAttrs parameter.
+ * {@code inAttrs} parameter.
*
* @param obj A possibly null object whose state is to be retrieved.
- * @param name The name of this object relative to
- * This class is an extension of NamingManager. It contains methods
+ * This class is an extension of {@code NamingManager}. It contains methods
* for use by service providers for accessing object factories and
* state factories, and for getting continuation contexts for
* supporting federation.
*
- * DirectoryManager is safe for concurrent access by multiple threads.
+ * {@code DirectoryManager} is safe for concurrent access by multiple threads.
*
* Except as otherwise noted,
- * a Name, Attributes, or environment parameter
+ * a {@code Name}, {@code Attributes}, or environment parameter
* passed to any method is owned by the caller.
* The implementation will not modify the object or keep a reference
* to it, although it may keep a reference to a clone or copy.
@@ -73,13 +73,13 @@
DirectoryManager() {}
/**
- * Creates a context in which to continue a DirContext operation.
- * Operates just like NamingManager.getContinuationContext(),
- * only the continuation context returned is a DirContext.
+ * Creates a context in which to continue a {@code DirContext} operation.
+ * Operates just like {@code NamingManager.getContinuationContext()},
+ * only the continuation context returned is a {@code DirContext}.
*
* @param cpe
* The non-null exception that triggered this continuation.
- * @return A non-null DirContext object for continuing the operation.
+ * @return A non-null {@code DirContext} object for continuing the operation.
* @exception NamingException If a naming exception occurred.
*
* @see NamingManager#getContinuationContext(CannotProceedException)
@@ -104,37 +104,37 @@
* Creates an instance of an object for the specified object,
* attributes, and environment.
*
- * This method is the same as NamingManager.getObjectInstance
+ * This method is the same as {@code NamingManager.getObjectInstance}
* except for the following differences:
*
- * This method is like NamingManager.getStateToBind except
+ * This method is like {@code NamingManager.getStateToBind} except
* for the following differences:
*
* See NamingManager.getStateToBind() for a description of how
* the list of state factories to be tried is determined.
*
* The object returned by this method is owned by the caller.
* The implementation will not subsequently modify it.
- * It will contain either a new Attributes object that is
+ * It will contain either a new {@code Attributes} object that is
* likewise owned by the caller, or a reference to the original
- * attrs parameter.
+ * {@code attrs} parameter.
*
* @param obj The non-null object for which to get state to bind.
- * @param name The name of this object relative to
* Except as otherwise noted,
- * a Name or environment parameter
+ * a {@code Name} or environment parameter
* passed to any method is owned by the caller.
* The implementation will not modify the object or keep a reference
* to it, although it may keep a reference to a clone or copy.
@@ -164,8 +164,8 @@
/**
* Creates an object using the factories specified in the
- * Context.OBJECT_FACTORIES property of the environment
- * or of the provider resource file associated with nameCtx.
+ * {@code Context.OBJECT_FACTORIES} property of the environment
+ * or of the provider resource file associated with {@code nameCtx}.
*
* @return factory created; null if cannot create
*/
@@ -205,69 +205,69 @@
* create a factory for creating the object.
* Otherwise, the following rules are used to create the object:
*
- * Service providers that implement the DirContext
+ * Service providers that implement the {@code DirContext}
* interface should use
- * DirectoryManager.getObjectInstance(), not this method.
- * Service providers that implement only the Context
+ * {@code DirectoryManager.getObjectInstance()}, not this method.
+ * Service providers that implement only the {@code Context}
* interface should use this method.
*
* Note that an object factory (an object that implements the ObjectFactory
* interface) must be public and must have a public constructor that
* accepts no arguments.
*
- * The
* The resulting context is for resolving URLs of the
- * scheme
@@ -488,7 +488,7 @@
* has the naming convention scheme-idURLContextFactory
* (e.g. "ftpURLContextFactory" for the "ftp" scheme-id),
* in the package specified as follows.
- * The Context.URL_PKG_PREFIXES environment property (which
+ * The {@code Context.URL_PKG_PREFIXES} environment property (which
* may contain values taken from system properties,
* or application resource files)
* contains a colon-separated list of package prefixes.
@@ -500,7 +500,7 @@
* concatenated with the scheme id.
*
* For example, if the scheme id is "ldap", and the
- * Context.URL_PKG_PREFIXES property
+ * {@code Context.URL_PKG_PREFIXES} property
* contains "com.widget:com.wiz.jndi",
* the naming manager would attempt to load the following classes
* until one is successfully instantiated:
@@ -514,7 +514,7 @@
* If a factory is instantiated, it is invoked with the following
* parameters to produce the resulting context.
*
- *
* For example, invoking getObjectInstance() as shown above
* on a LDAP URL context factory would return a
@@ -530,8 +530,8 @@
* @param environment The possibly null environment properties to be
* used in the creation of the object factory and the context.
* @return A context for resolving URLs with the
- * scheme id
- * Before making use of the cpe parameter, this method
+ * Before making use of the {@code cpe} parameter, this method
* updates the environment associated with that object by setting
- * the value of the property CPE
- * to cpe. This property will be inherited by the
+ * the value of the property {@code CPE}
+ * to {@code cpe}. This property will be inherited by the
* continuation context, and may be used by that context's
* service provider to inspect the fields of this exception.
*
@@ -826,15 +826,15 @@
/**
* Retrieves the state of an object for binding.
*
- * Service providers that implement the DirContext interface
- * should use DirectoryManager.getStateToBind(), not this method.
- * Service providers that implement only the Context interface
+ * Service providers that implement the {@code DirContext} interface
+ * should use {@code DirectoryManager.getStateToBind()}, not this method.
+ * Service providers that implement only the {@code Context} interface
* should use this method.
*
* This method uses the specified state factories in
- * the Context.STATE_FACTORIES property from the environment
+ * the {@code Context.STATE_FACTORIES} property from the environment
* properties, and from the provider resource file associated with
- * nameCtx, in that order.
+ * {@code nameCtx}, in that order.
* The value of this property is a colon-separated list of factory
* class names that are tried in order, and the first one that succeeds
* in returning the object's state is the one used.
@@ -848,35 +848,35 @@
* interface) must be public and must have a public constructor that
* accepts no arguments.
*
- * The
- * This method may return a Referenceable object. The
+ * This method may return a {@code Referenceable} object. The
* service provider obtaining this object may choose to store it
* directly, or to extract its reference (using
- * Referenceable.getReference()) and store that instead.
+ * {@code Referenceable.getReference()}) and store that instead.
*
* @param obj The non-null object for which to get state to bind.
- * @param name The name of this object relative to An ObjectFactory is responsible
+ * An {@code ObjectFactory} is responsible
* for creating objects of a specific type. In the above example,
* you may have a PrinterObjectFactory for creating Printer objects.
*
- * An object factory must implement the ObjectFactory interface.
+ * An object factory must implement the {@code ObjectFactory} interface.
* In addition, the factory class must be public and must have a
* public constructor that accepts no parameters.
*
- * The getObjectInstance() method of an object factory may
+ * The {@code getObjectInstance()} method of an object factory may
* be invoked multiple times, possibly using different parameters.
* The implementation is thread-safe.
*
@@ -73,15 +73,15 @@
* specified.
*
* Special requirements of this object are supplied
- * using
- * NamingManager.getObjectInstance()
+ * {@code NamingManager.getObjectInstance()}
* successively loads in object factories and invokes this method
* on them until one produces a non-null answer. When an exception
* is thrown by an object factory, the exception is passed on to the caller
- * of NamingManager.getObjectInstance()
+ * of {@code NamingManager.getObjectInstance()}
* (and no search is made for other factories
* that may produce a non-null answer).
* An object factory should only throw an exception if it is sure that
@@ -92,27 +92,27 @@
*
* A URL context factory is a special ObjectFactory that
* creates contexts for resolving URLs or objects whose locations
- * are specified by URLs. The getObjectInstance() method
+ * are specified by URLs. The {@code getObjectInstance()} method
* of a URL context factory will obey the following rules.
*
- * The name and environment parameters
+ * The {@code name} and {@code environment} parameters
* are owned by the caller.
* The implementation will not modify these objects or keep references
* to them, although it may keep references to clones or copies.
@@ -135,27 +135,27 @@
* Name and Context Parameters.
*
*
- * The
- * A Name parameter passed to any method is owned
+ * A {@code Name} parameter passed to any method is owned
* by the caller. The service provider will not modify the object
* or keep a reference to it.
- * A ResolveResult object returned by any
+ * A {@code ResolveResult} object returned by any
* method is owned by the caller. The caller may subsequently modify it;
* the service provider may not.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/StateFactory.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/StateFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/StateFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,14 +34,14 @@
* The JNDI framework allows for object implementations to
* be loaded in dynamically via object factories.
* For example, when looking up a printer bound in the name space,
- * if the print service binds printer names to References, the printer
- * Reference could be used to create a printer object, so that
+ * if the print service binds printer names to {@code Reference}s, the printer
+ * {@code Reference} could be used to create a printer object, so that
* the caller of lookup can directly operate on the printer object
* after the lookup.
- * An ObjectFactory is responsible
+ * An {@code ObjectFactory} is responsible
* for creating objects of a specific type. In the above example,
- * you may have a PrinterObjectFactory for creating
- * Printer objects.
+ * you may have a {@code PrinterObjectFactory} for creating
+ * {@code Printer} objects.
*
* For the reverse process, when an object is bound into the namespace,
* JNDI provides state factories.
@@ -50,23 +50,23 @@
*
- * A state factory must implement the StateFactory interface.
+ * A state factory must implement the {@code StateFactory} interface.
* In addition, the factory class must be public and must have a
* public constructor that accepts no parameters.
*
- * The getStateToBind() method of a state factory may
+ * The {@code getStateToBind()} method of a state factory may
* be invoked multiple times, possibly using different parameters.
* The implementation is thread-safe.
*
- * StateFactory is intended for use with service providers
- * that implement only the Context interface.
- * DirStateFactory is intended for use with service providers
- * that implement the DirContext interface.
+ * {@code StateFactory} is intended for use with service providers
+ * that implement only the {@code Context} interface.
+ * {@code DirStateFactory} is intended for use with service providers
+ * that implement the {@code DirContext} interface.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -81,18 +81,18 @@
/**
* Retrieves the state of an object for binding.
*
- * NamingManager.getStateToBind()
+ * {@code NamingManager.getStateToBind()}
* successively loads in state factories and invokes this method
* on them until one produces a non-null answer.
- * DirectoryManager.getStateToBind()
+ * {@code DirectoryManager.getStateToBind()}
* successively loads in state factories. If a factory implements
- * DirStateFactory, then DirectoryManager
- * invokes DirStateFactory.getStateToBind(); otherwise
- * it invokes StateFactory.getStateToBind().
+ * {@code DirStateFactory}, then {@code DirectoryManager}
+ * invokes {@code DirStateFactory.getStateToBind()}; otherwise
+ * it invokes {@code StateFactory.getStateToBind()}.
* When an exception
* is thrown by a factory, the exception is passed on to the caller
- * of NamingManager.getStateToBind() and
- * DirectoryManager.getStateToBind().
+ * of {@code NamingManager.getStateToBind()} and
+ * {@code DirectoryManager.getStateToBind()}.
* The search for other factories
* that may produce a non-null answer is halted.
* A factory should only throw an exception if it is sure that
@@ -110,7 +110,7 @@
* against concurrent access, since context implementations are not
* guaranteed to be thread-safe.
*
- * The name and environment parameters
+ * The {@code name} and {@code environment} parameters
* are owned by the caller.
* The implementation will not modify these objects or keep references
* to them, although it may keep references to clones or copies.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/package.html
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/package.html Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/package.html Wed Jul 05 20:44:51 2017 +0200
@@ -29,7 +29,7 @@
@@ -58,9 +58,9 @@
This class is for Preferences implementers only.
- * Normal users of the Preferences facility should have no need to
+ * This class is for {@code Preferences} implementers only.
+ * Normal users of the {@code Preferences} facility should have no need to
* consult this documentation. The {@link Preferences} documentation
* should suffice.
*
@@ -56,11 +56,11 @@
* performance.
*
* The SPI methods fall into three groups concerning exception
- * behavior. The getSpi method should never throw exceptions, but it
+ * behavior. The {@code getSpi} method should never throw exceptions, but it
* doesn't really matter, as any exception thrown by this method will be
* intercepted by {@link #get(String,String)}, which will return the specified
- * default value to the caller. The removeNodeSpi, keysSpi,
- * childrenNamesSpi, syncSpi and flushSpi methods are specified
+ * default value to the caller. The {@code removeNodeSpi, keysSpi,
+ * childrenNamesSpi, syncSpi} and {@code flushSpi} methods are specified
* to throw {@link BackingStoreException}, and the implementation is required
* to throw this checked exception if it is unable to perform the operation.
* The exception propagates outward, causing the corresponding API method
@@ -69,7 +69,7 @@
* The remaining SPI methods {@link #putSpi(String,String)}, {@link
* #removeSpi(String)} and {@link #childSpi(String)} have more complicated
* exception behavior. They are not specified to throw
- * BackingStoreException, as they can generally obey their contracts
+ * {@code BackingStoreException}, as they can generally obey their contracts
* even if the backing store is unavailable. This is true because they return
* no information and their effects are not required to become permanent until
* a subsequent call to {@link Preferences#flush()} or
@@ -79,11 +79,11 @@
* later processing. Even under these circumstances it is generally better to
* simply ignore the invocation and return, rather than throwing an
* exception. Under these circumstances, however, subsequently invoking
- * flush() or sync would not imply that all previous
+ * {@code flush()} or {@code sync} would not imply that all previous
* operations had successfully been made permanent.
*
- * There is one circumstance under which putSpi, removeSpi and
- * childSpi should throw an exception: if the caller lacks
+ * There is one circumstance under which {@code putSpi, removeSpi and
+ * childSpi} should throw an exception: if the caller lacks
* sufficient privileges on the underlying operating system to perform the
* requested operation. This will, for instance, occur on most systems
* if a non-privileged user attempts to modify system preferences.
@@ -103,18 +103,18 @@
* backing store. It is the implementation's responsibility to recreate the
* node if it has been deleted.
*
- * Implementation note: In Sun's default Preferences
+ * Implementation note: In Sun's default {@code Preferences}
* implementations, the user's identity is inherited from the underlying
* operating system and does not change for the lifetime of the virtual
- * machine. It is recognized that server-side Preferences
+ * machine. It is recognized that server-side {@code Preferences}
* implementations may have the user identity change from request to request,
- * implicitly passed to Preferences methods via the use of a
+ * implicitly passed to {@code Preferences} methods via the use of a
* static {@link ThreadLocal} instance. Authors of such implementations are
* strongly encouraged to determine the user at the time preferences
* are accessed (for example by the {@link #get(String,String)} or {@link
* #put(String,String)} method) rather than permanently associating a user
- * with each Preferences instance. The latter behavior conflicts
- * with normal Preferences usage and would lead to great confusion.
+ * with each {@code Preferences} instance. The latter behavior conflicts
+ * with normal {@code Preferences} usage and would lead to great confusion.
*
* @author Josh Bloch
* @see Preferences
@@ -149,7 +149,7 @@
private final AbstractPreferences root; // Relative to this node
/**
- * This field should be true if this node did not exist in the
+ * This field should be {@code true} if this node did not exist in the
* backing store prior to the creation of this object. The field
* is initialized to false, but may be set to true by a subclass
* constructor (and should not be modified thereafter). This field
@@ -197,10 +197,10 @@
* @param parent the parent of this preference node, or null if this
* is the root.
* @param name the name of this preference node, relative to its parent,
- * or "" if this is the root.
- * @throws IllegalArgumentException if name contains a slash
- * ('/'), or parent is null and
- * name isn't "".
+ * or {@code ""} if this is the root.
+ * @throws IllegalArgumentException if {@code name} contains a slash
+ * ({@code '/'}), or {@code parent} is {@code null} and
+ * name isn't {@code ""}.
*/
protected AbstractPreferences(AbstractPreferences parent, String name) {
if (parent==null) {
@@ -225,7 +225,7 @@
}
/**
- * Implements the put method as per the specification in
+ * Implements the {@code put} method as per the specification in
* {@link Preferences#put(String,String)}.
*
* This implementation checks that the key and value are legal,
@@ -236,10 +236,10 @@
*
* @param key key with which the specified value is to be associated.
* @param value value to be associated with the specified key.
- * @throws NullPointerException if key or value is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH or if value.length exceeds
- * MAX_VALUE_LENGTH.
+ * @throws NullPointerException if key or value is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH} or if {@code value.length} exceeds
+ * {@code MAX_VALUE_LENGTH}.
* @throws IllegalArgumentException if either key or value contain
* the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -267,26 +267,26 @@
}
/**
- * Implements the get method as per the specification in
+ * Implements the {@code get} method as per the specification in
* {@link Preferences#get(String,String)}.
*
- * This implementation first checks to see if key is
- * null throwing a NullPointerException if this is
+ * This implementation first checks to see if {@code key} is
+ * {@code null} throwing a {@code NullPointerException} if this is
* the case. Then it obtains this preference node's lock,
* checks that the node has not been removed, invokes {@link
- * #getSpi(String)}, and returns the result, unless the getSpi
- * invocation returns null or throws an exception, in which case
- * this invocation returns def.
+ * #getSpi(String)}, and returns the result, unless the {@code getSpi}
+ * invocation returns {@code null} or throws an exception, in which case
+ * this invocation returns {@code def}.
*
* @param key key whose associated value is to be returned.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key.
- * @return the value associated with key, or def
- * if no value is associated with key.
+ * preference node has no value associated with {@code key}.
+ * @return the value associated with {@code key}, or {@code def}
+ * if no value is associated with {@code key}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null. (A
- * null default is permitted.)
+ * @throws NullPointerException if key is {@code null}. (A
+ * {@code null} default is permitted.)
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -310,7 +310,7 @@
}
/**
- * Implements the remove(String) method as per the specification
+ * Implements the {@code remove(String)} method as per the specification
* in {@link Preferences#remove(String)}.
*
* This implementation obtains this preference node's lock,
@@ -340,7 +340,7 @@
}
/**
- * Implements the clear method as per the specification in
+ * Implements the {@code clear} method as per the specification in
* {@link Preferences#clear()}.
*
* This implementation obtains this preference node's lock,
@@ -361,18 +361,18 @@
}
/**
- * Implements the putInt method as per the specification in
+ * Implements the {@code putInt} method as per the specification in
* {@link Preferences#putInt(String,int)}.
*
- * This implementation translates value to a string with
+ * This implementation translates {@code value} to a string with
* {@link Integer#toString(int)} and invokes {@link #put(String,String)}
* on the result.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if key is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalArgumentException if key contains
* the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -383,26 +383,26 @@
}
/**
- * Implements the getInt method as per the specification in
+ * Implements the {@code getInt} method as per the specification in
* {@link Preferences#getInt(String,int)}.
*
- * This implementation invokes {@link #get(String,String) get(key,
- * null)}. If the return value is non-null, the implementation
- * attempts to translate it to an int with
+ * This implementation invokes {@link #get(String,String) get(key,
+ * null)}. If the return value is non-null, the implementation
+ * attempts to translate it to an {@code int} with
* {@link Integer#parseInt(String)}. If the attempt succeeds, the return
- * value is returned by this method. Otherwise, def is returned.
+ * value is returned by this method. Otherwise, {@code def} is returned.
*
* @param key key whose associated value is to be returned as an int.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as an int.
* @return the int value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* an int.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -420,18 +420,18 @@
}
/**
- * Implements the putLong method as per the specification in
+ * Implements the {@code putLong} method as per the specification in
* {@link Preferences#putLong(String,long)}.
*
- * This implementation translates value to a string with
+ * This implementation translates {@code value} to a string with
* {@link Long#toString(long)} and invokes {@link #put(String,String)}
* on the result.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if key is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalArgumentException if key contains
* the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -442,26 +442,26 @@
}
/**
- * Implements the getLong method as per the specification in
+ * Implements the {@code getLong} method as per the specification in
* {@link Preferences#getLong(String,long)}.
*
- * This implementation invokes {@link #get(String,String) get(key,
- * null)}. If the return value is non-null, the implementation
- * attempts to translate it to a long with
+ * This implementation invokes {@link #get(String,String) get(key,
+ * null)}. If the return value is non-null, the implementation
+ * attempts to translate it to a {@code long} with
* {@link Long#parseLong(String)}. If the attempt succeeds, the return
- * value is returned by this method. Otherwise, def is returned.
+ * value is returned by this method. Otherwise, {@code def} is returned.
*
* @param key key whose associated value is to be returned as a long.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a long.
* @return the long value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a long.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -479,18 +479,18 @@
}
/**
- * Implements the putBoolean method as per the specification in
+ * Implements the {@code putBoolean} method as per the specification in
* {@link Preferences#putBoolean(String,boolean)}.
*
- * This implementation translates value to a string with
+ * This implementation translates {@code value} to a string with
* {@link String#valueOf(boolean)} and invokes {@link #put(String,String)}
* on the result.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if key is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalArgumentException if key contains
* the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -501,29 +501,29 @@
}
/**
- * Implements the getBoolean method as per the specification in
+ * Implements the {@code getBoolean} method as per the specification in
* {@link Preferences#getBoolean(String,boolean)}.
*
- * This implementation invokes {@link #get(String,String) get(key,
- * null)}. If the return value is non-null, it is compared with
- * "true" using {@link String#equalsIgnoreCase(String)}. If the
- * comparison returns true, this invocation returns
- * true. Otherwise, the original return value is compared with
- * "false", again using {@link String#equalsIgnoreCase(String)}.
- * If the comparison returns true, this invocation returns
- * false. Otherwise, this invocation returns def.
+ * This implementation invokes {@link #get(String,String) get(key,
+ * null)}. If the return value is non-null, it is compared with
+ * {@code "true"} using {@link String#equalsIgnoreCase(String)}. If the
+ * comparison returns {@code true}, this invocation returns
+ * {@code true}. Otherwise, the original return value is compared with
+ * {@code "false"}, again using {@link String#equalsIgnoreCase(String)}.
+ * If the comparison returns {@code true}, this invocation returns
+ * {@code false}. Otherwise, this invocation returns {@code def}.
*
* @param key key whose associated value is to be returned as a boolean.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a boolean.
* @return the boolean value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a boolean.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -541,18 +541,18 @@
}
/**
- * Implements the putFloat method as per the specification in
+ * Implements the {@code putFloat} method as per the specification in
* {@link Preferences#putFloat(String,float)}.
*
- * This implementation translates value to a string with
+ * This implementation translates {@code value} to a string with
* {@link Float#toString(float)} and invokes {@link #put(String,String)}
* on the result.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if key is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalArgumentException if key contains
* the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -563,26 +563,26 @@
}
/**
- * Implements the getFloat method as per the specification in
+ * Implements the {@code getFloat} method as per the specification in
* {@link Preferences#getFloat(String,float)}.
*
- * This implementation invokes {@link #get(String,String) get(key,
- * null)}. If the return value is non-null, the implementation
- * attempts to translate it to an float with
+ * This implementation invokes {@link #get(String,String) get(key,
+ * null)}. If the return value is non-null, the implementation
+ * attempts to translate it to an {@code float} with
* {@link Float#parseFloat(String)}. If the attempt succeeds, the return
- * value is returned by this method. Otherwise, def is returned.
+ * value is returned by this method. Otherwise, {@code def} is returned.
*
* @param key key whose associated value is to be returned as a float.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a float.
* @return the float value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a float.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -600,18 +600,18 @@
}
/**
- * Implements the putDouble method as per the specification in
+ * Implements the {@code putDouble} method as per the specification in
* {@link Preferences#putDouble(String,double)}.
*
- * This implementation translates value to a string with
+ * This implementation translates {@code value} to a string with
* {@link Double#toString(double)} and invokes {@link #put(String,String)}
* on the result.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if key is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalArgumentException if key contains
* the null control character, code point U+0000.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -622,26 +622,26 @@
}
/**
- * Implements the getDouble method as per the specification in
+ * Implements the {@code getDouble} method as per the specification in
* {@link Preferences#getDouble(String,double)}.
*
- * This implementation invokes {@link #get(String,String) get(key,
- * null)}. If the return value is non-null, the implementation
- * attempts to translate it to an double with
+ * This implementation invokes {@link #get(String,String) get(key,
+ * null)}. If the return value is non-null, the implementation
+ * attempts to translate it to an {@code double} with
* {@link Double#parseDouble(String)}. If the attempt succeeds, the return
- * value is returned by this method. Otherwise, def is returned.
+ * value is returned by this method. Otherwise, {@code def} is returned.
*
* @param key key whose associated value is to be returned as a double.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a double.
* @return the double value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a double.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -659,12 +659,12 @@
}
/**
- * Implements the putByteArray method as per the specification in
+ * Implements the {@code putByteArray} method as per the specification in
* {@link Preferences#putByteArray(String,byte[])}.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key or value is null.
+ * @throws NullPointerException if key or value is {@code null}.
* @throws IllegalArgumentException if key.length() exceeds MAX_KEY_LENGTH
* or if value.length exceeds MAX_VALUE_LENGTH*3/4.
* @throws IllegalArgumentException if key contains
@@ -677,21 +677,21 @@
}
/**
- * Implements the getByteArray method as per the specification in
+ * Implements the {@code getByteArray} method as per the specification in
* {@link Preferences#getByteArray(String,byte[])}.
*
* @param key key whose associated value is to be returned as a byte array.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a byte array.
* @return the byte array value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a byte array.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null. (A
- * null value for def is permitted.)
+ * @throws NullPointerException if {@code key} is {@code null}. (A
+ * {@code null} value for {@code def} is permitted.)
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -710,7 +710,7 @@
}
/**
- * Implements the keys method as per the specification in
+ * Implements the {@code keys} method as per the specification in
* {@link Preferences#keys()}.
*
* This implementation obtains this preference node's lock, checks that
@@ -734,15 +734,15 @@
}
/**
- * Implements the children method as per the specification in
+ * Implements the {@code children} method as per the specification in
* {@link Preferences#childrenNames()}.
*
* This implementation obtains this preference node's lock, checks that
- * the node has not been removed, constructs a TreeSet initialized
+ * the node has not been removed, constructs a {@code TreeSet} initialized
* to the names of children already cached (the children in this node's
* "child-cache"), invokes {@link #childrenNamesSpi()}, and adds all of the
* returned child-names into the set. The elements of the tree set are
- * dumped into a String array using the toArray method,
+ * dumped into a {@code String} array using the {@code toArray} method,
* and this array is returned.
*
* @return the names of the children of this preference node.
@@ -780,7 +780,7 @@
= new AbstractPreferences[0];
/**
- * Implements the parent method as per the specification in
+ * Implements the {@code parent} method as per the specification in
* {@link Preferences#parent()}.
*
* This implementation obtains this preference node's lock, checks that
@@ -801,35 +801,35 @@
}
/**
- * Implements the node method as per the specification in
+ * Implements the {@code node} method as per the specification in
* {@link Preferences#node(String)}.
*
* This implementation obtains this preference node's lock and checks
- * that the node has not been removed. If path is "",
- * this node is returned; if path is "/", this node's
- * root is returned. If the first character in path is
- * not '/', the implementation breaks path into
+ * that the node has not been removed. If {@code path} is {@code ""},
+ * this node is returned; if {@code path} is {@code "/"}, this node's
+ * root is returned. If the first character in {@code path} is
+ * not {@code '/'}, the implementation breaks {@code path} into
* tokens and recursively traverses the path from this node to the
- * named node, "consuming" a name and a slash from path at
+ * named node, "consuming" a name and a slash from {@code path} at
* each step of the traversal. At each step, the current node is locked
* and the node's child-cache is checked for the named node. If it is
* not found, the name is checked to make sure its length does not
- * exceed MAX_NAME_LENGTH. Then the {@link #childSpi(String)}
+ * exceed {@code MAX_NAME_LENGTH}. Then the {@link #childSpi(String)}
* method is invoked, and the result stored in this node's child-cache.
- * If the newly created Preferences object's {@link #newNode}
- * field is true and there are any node change listeners,
+ * If the newly created {@code Preferences} object's {@link #newNode}
+ * field is {@code true} and there are any node change listeners,
* a notification event is enqueued for processing by the event dispatch
* thread.
*
* When there are no more tokens, the last value found in the
- * child-cache or returned by childSpi is returned by this
- * method. If during the traversal, two "/" tokens occur
- * consecutively, or the final token is "/" (rather than a name),
- * an appropriate IllegalArgumentException is thrown.
+ * child-cache or returned by {@code childSpi} is returned by this
+ * method. If during the traversal, two {@code "/"} tokens occur
+ * consecutively, or the final token is {@code "/"} (rather than a name),
+ * an appropriate {@code IllegalArgumentException} is thrown.
*
- * If the first character of path is '/'
+ * If the first character of {@code path} is {@code '/'}
* (indicating an absolute path name) this preference node's
- * lock is dropped prior to breaking path into tokens, and
+ * lock is dropped prior to breaking {@code path} into tokens, and
* this method recursively traverses the path starting from the root
* (rather than starting from this node). The traversal is otherwise
* identical to the one described for relative path names. Dropping
@@ -889,7 +889,7 @@
}
/**
- * Implements the nodeExists method as per the specification in
+ * Implements the {@code nodeExists} method as per the specification in
* {@link Preferences#nodeExists(String)}.
*
* This implementation is very similar to {@link #node(String)},
@@ -906,7 +906,7 @@
* with a slash character and is more than one character long).
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method and
- * pathname is not the empty string ("").
+ * {@code pathname} is not the empty string ({@code ""}).
*/
public boolean nodeExists(String path)
throws BackingStoreException
@@ -953,7 +953,7 @@
/**
- * Implements the removeNode() method as per the specification in
+ * Implements the {@code removeNode()} method as per the specification in
* {@link Preferences#removeNode()}.
*
* This implementation checks to see that this node is the root; if so,
@@ -964,7 +964,7 @@
* of its children are cached: The {@link #childrenNamesSpi()} method is
* invoked and each returned child name is checked for containment in the
* child-cache. If a child is not already cached, the {@link
- * #childSpi(String)} method is invoked to create a Preferences
+ * #childSpi(String)} method is invoked to create a {@code Preferences}
* instance for it, and this instance is put into the child-cache. Then
* the helper method calls itself recursively on each node contained in its
* child-cache. Next, it invokes {@link #removeNodeSpi()}, marks itself
@@ -1024,7 +1024,7 @@
}
/**
- * Implements the name method as per the specification in
+ * Implements the {@code name} method as per the specification in
* {@link Preferences#name()}.
*
* This implementation merely returns the name that was
@@ -1037,7 +1037,7 @@
}
/**
- * Implements the absolutePath method as per the specification in
+ * Implements the {@code absolutePath} method as per the specification in
* {@link Preferences#absolutePath()}.
*
* This implementation merely returns the absolute path name that
@@ -1052,7 +1052,7 @@
}
/**
- * Implements the isUserNode method as per the specification in
+ * Implements the {@code isUserNode} method as per the specification in
* {@link Preferences#isUserNode()}.
*
* This implementation compares this node's root node (which is stored
@@ -1060,8 +1060,8 @@
* {@link Preferences#userRoot()}. If the two object references are
* identical, this method returns true.
*
- * @return true if this preference node is in the user
- * preference tree, false if it's in the system
+ * @return {@code true} if this preference node is in the user
+ * preference tree, {@code false} if it's in the system
* preference tree.
*/
public boolean isUserNode() {
@@ -1160,7 +1160,7 @@
/**
* Put the given key-value association into this preference node. It is
- * guaranteed that key and value are non-null and of
+ * guaranteed that {@code key} and {@code value} are non-null and of
* legal length. Also, it is guaranteed that this node has not been
* removed. (The implementor needn't check for any of these things.)
*
@@ -1172,29 +1172,29 @@
/**
* Return the value associated with the specified key at this preference
- * node, or null if there is no association for this key, or the
+ * node, or {@code null} if there is no association for this key, or the
* association cannot be determined at this time. It is guaranteed that
- * key is non-null. Also, it is guaranteed that this node has
+ * {@code key} is non-null. Also, it is guaranteed that this node has
* not been removed. (The implementor needn't check for either of these
* things.)
*
* Generally speaking, this method should not throw an exception
* under any circumstances. If, however, if it does throw an exception,
- * the exception will be intercepted and treated as a null
+ * the exception will be intercepted and treated as a {@code null}
* return value.
*
* This method is invoked with the lock on this node held.
*
* @param key the key
* @return the value associated with the specified key at this preference
- * node, or null if there is no association for this
+ * node, or {@code null} if there is no association for this
* key, or the association cannot be determined at this time.
*/
protected abstract String getSpi(String key);
/**
* Remove the association (if any) for the specified key at this
- * preference node. It is guaranteed that key is non-null.
+ * preference node. It is guaranteed that {@code key} is non-null.
* Also, it is guaranteed that this node has not been removed.
* (The implementor needn't check for either of these things.)
*
@@ -1215,9 +1215,9 @@
* result of a single invocation to {@link Preferences#removeNode()}).
*
* The removal of a node needn't become persistent until the
- * flush method is invoked on this node (or an ancestor).
+ * {@code flush} method is invoked on this node (or an ancestor).
*
- * If this node throws a BackingStoreException, the exception
+ * If this node throws a {@code BackingStoreException}, the exception
* will propagate out beyond the enclosing {@link #removeNode()}
* invocation.
*
@@ -1235,7 +1235,7 @@
*
* This method is invoked with the lock on this node held.
*
- * If this node throws a BackingStoreException, the exception
+ * If this node throws a {@code BackingStoreException}, the exception
* will propagate out beyond the enclosing {@link #keys()} invocation.
*
* @return an array of the keys that have an associated value in this
@@ -1254,7 +1254,7 @@
*
* This method is invoked with the lock on this node held.
*
- * If this node throws a BackingStoreException, the exception
+ * If this node throws a {@code BackingStoreException}, the exception
* will propagate out beyond the enclosing {@link #childrenNames()}
* invocation.
*
@@ -1268,8 +1268,8 @@
throws BackingStoreException;
/**
- * Returns the named child if it exists, or null if it does not.
- * It is guaranteed that nodeName is non-null, non-empty,
+ * Returns the named child if it exists, or {@code null} if it does not.
+ * It is guaranteed that {@code nodeName} is non-null, non-empty,
* does not contain the slash character ('/'), and is no longer than
* {@link #MAX_NAME_LENGTH} characters. Also, it is guaranteed
* that this node has not been removed. (The implementor needn't check
@@ -1288,7 +1288,7 @@
* with the specified node name. If a child node has the correct name,
* the {@link #childSpi(String)} method is invoked and the resulting
* node is returned. If the iteration completes without finding the
- * specified name, null is returned.
+ * specified name, {@code null} is returned.
*
* @param nodeName name of the child to be searched for.
* @return the named child if it exists, or null if it does not.
@@ -1310,7 +1310,7 @@
/**
* Returns the named child of this preference node, creating it if it does
- * not already exist. It is guaranteed that name is non-null,
+ * not already exist. It is guaranteed that {@code name} is non-null,
* non-empty, does not contain the slash character ('/'), and is no longer
* than {@link #MAX_NAME_LENGTH} characters. Also, it is guaranteed that
* this node has not been removed. (The implementor needn't check for any
@@ -1325,12 +1325,12 @@
*
* The implementer must ensure that the returned node has not been
* removed. If a like-named child of this node was previously removed, the
- * implementer must return a newly constructed AbstractPreferences
- * node; once removed, an AbstractPreferences node
+ * implementer must return a newly constructed {@code AbstractPreferences}
+ * node; once removed, an {@code AbstractPreferences} node
* cannot be "resuscitated."
*
* If this method causes a node to be created, this node is not
- * guaranteed to be persistent until the flush method is
+ * guaranteed to be persistent until the {@code flush} method is
* invoked on this node or one of its ancestors (or descendants).
*
* This method is invoked with the lock on this node held.
@@ -1350,7 +1350,7 @@
}
/**
- * Implements the sync method as per the specification in
+ * Implements the {@code sync} method as per the specification in
* {@link Preferences#sync()}.
*
* This implementation calls a recursive helper method that locks this
@@ -1398,7 +1398,7 @@
* entire subtree at once, the implementer is encouraged to override
* sync(), rather than merely overriding this method.
*
- * If this node throws a BackingStoreException, the exception
+ * If this node throws a {@code BackingStoreException}, the exception
* will propagate out beyond the enclosing {@link #sync()} invocation.
*
* @throws BackingStoreException if this operation cannot be completed
@@ -1408,7 +1408,7 @@
protected abstract void syncSpi() throws BackingStoreException;
/**
- * Implements the flush method as per the specification in
+ * Implements the {@code flush} method as per the specification in
* {@link Preferences#flush()}.
*
* This implementation calls a recursive helper method that locks this
@@ -1459,7 +1459,7 @@
* encouraged to override flush(), rather than merely overriding this
* method.
*
- * If this node throws a BackingStoreException, the exception
+ * If this node throws a {@code BackingStoreException}, the exception
* will propagate out beyond the enclosing {@link #flush()} invocation.
*
* @throws BackingStoreException if this operation cannot be completed
@@ -1469,12 +1469,12 @@
protected abstract void flushSpi() throws BackingStoreException;
/**
- * Returns true iff this node (or an ancestor) has been
+ * Returns {@code true} iff this node (or an ancestor) has been
* removed with the {@link #removeNode()} method. This method
* locks this node prior to returning the contents of the private
* field used to track this state.
*
- * @return true iff this node (or an ancestor) has been
+ * @return {@code true} iff this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
*/
protected boolean isRemoved() {
@@ -1630,12 +1630,12 @@
}
/**
- * Implements the exportNode method as per the specification in
+ * Implements the {@code exportNode} method as per the specification in
* {@link Preferences#exportNode(OutputStream)}.
*
* @param os the output stream on which to emit the XML document.
* @throws IOException if writing to the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws BackingStoreException if preference data cannot be read from
* backing store.
*/
@@ -1646,12 +1646,12 @@
}
/**
- * Implements the exportSubtree method as per the specification in
+ * Implements the {@code exportSubtree} method as per the specification in
* {@link Preferences#exportSubtree(OutputStream)}.
*
* @param os the output stream on which to emit the XML document.
* @throws IOException if writing to the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws BackingStoreException if preference data cannot be read from
* backing store.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Base64.java Wed Jul 05 20:44:51 2017 +0200
@@ -124,7 +124,7 @@
* Translates the specified Base64 string (as per Preferences.get(byte[]))
* into a byte array.
*
- * @throw IllegalArgumentException if s is not a valid Base64
+ * @throw IllegalArgumentException if {@code s} is not a valid Base64
* string.
*/
static byte[] base64ToByteArray(String s) {
@@ -136,7 +136,7 @@
* into a byte array.
*
* @throw IllegalArgumentException or ArrayOutOfBoundsException
- * if s is not a valid alternate representation
+ * if {@code s} is not a valid alternate representation
* Base64 string.
*/
static byte[] altBase64ToByteArray(String s) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/NodeChangeEvent.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/NodeChangeEvent.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/NodeChangeEvent.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
import java.io.NotSerializableException;
/**
- * An event emitted by a Preferences node to indicate that
+ * An event emitted by a {@code Preferences} node to indicate that
* a child of that node has been added or removed.
*
* Note, that although NodeChangeEvent inherits Serializable interface from
@@ -52,7 +52,7 @@
private Preferences child;
/**
- * Constructs a new
*
* Note, that although PreferenceChangeEvent inherits Serializable interface
@@ -52,18 +52,18 @@
private String key;
/**
- * New value for preference, or null if it was removed.
+ * New value for preference, or {@code null} if it was removed.
*
* @serial
*/
private String newValue;
/**
- * Constructs a new The root node has an absolute path name of "/". Children of
- * the root node have absolute path names of "/" + <node
+ * The root node has an absolute path name of {@code "/"}. Children of
+ * the root node have absolute path names of {@code "/" + }<node
* name>. All other nodes have absolute path names of <parent's
- * absolute path name> + "/" + <node name>.
+ * absolute path name>{@code + "/" + }<node name>.
* Note that all absolute path names begin with the slash character.
*
* A node n's path name relative to its ancestor a
@@ -102,18 +102,18 @@
* All of the methods that modify preferences data are permitted to operate
* asynchronously; they may return immediately, and changes will eventually
* propagate to the persistent backing store with an implementation-dependent
- * delay. The flush method may be used to synchronously force
+ * delay. The {@code flush} method may be used to synchronously force
* updates to the backing store. Normal termination of the Java Virtual
* Machine will not result in the loss of pending updates -- an explicit
- * flush invocation is not required upon termination to ensure
+ * {@code flush} invocation is not required upon termination to ensure
* that pending updates are made persistent.
*
- * All of the methods that read preferences from a Preferences
+ * All of the methods that read preferences from a {@code Preferences}
* object require the invoker to provide a default value. The default value is
* returned if no value has been previously set or if the backing store is
* unavailable. The intent is to allow applications to operate, albeit
* with slightly degraded functionality, even if the backing store becomes
- * unavailable. Several methods, like flush, have semantics that
+ * unavailable. Several methods, like {@code flush}, have semantics that
* prevent them from operating if the backing store is unavailable. Ordinary
* applications should have no need to invoke any of these methods, which can
* be identified by the fact that they are declared to throw {@link
@@ -181,31 +181,31 @@
* value CDATA #REQUIRED >
* } Implementation note: In Sun's JRE, the PreferencesFactory
+ * Implementation note: In Sun's JRE, the {@code PreferencesFactory}
* implementation is located as follows:
*
* If the system property
- * java.util.prefs.PreferencesFactory is defined, then it is
+ * {@code java.util.prefs.PreferencesFactory} is defined, then it is
* taken to be the fully-qualified name of a class implementing the
- * PreferencesFactory interface. The class is loaded and
+ * {@code PreferencesFactory} interface. The class is loaded and
* instantiated; if this process fails then an unspecified error is
* thrown. If a PreferencesFactory implementation class file
+ * If a {@code PreferencesFactory} implementation class file
* has been installed in a jar file that is visible to the
* {@link java.lang.ClassLoader#getSystemClassLoader system class loader},
* and that jar file contains a provider-configuration file named
- * java.util.prefs.PreferencesFactory in the resource
- * directory META-INF/services, then the first class name
+ * {@code java.util.prefs.PreferencesFactory} in the resource
+ * directory {@code META-INF/services}, then the first class name
* specified in that file is taken. If more than one such jar file is
* provided, the first one found will be used. The class is loaded
* and instantiated; if this process fails then an unspecified error
@@ -213,7 +213,7 @@
*
* Finally, if neither the above-mentioned system property nor
* an extension jar file is provided, then the system-wide default
- * PreferencesFactory implementation for the underlying
+ * {@code PreferencesFactory} implementation for the underlying
* platform is loaded and instantiated. This convention does not apply to the unnamed package, whose
- * associated preference node is <unnamed>. This node
+ * associated preference node is {@code A class Foo wishing to access preferences pertaining to its
+ * A class {@code Foo} wishing to access preferences pertaining to its
* package can obtain a preference node as follows: This convention does not apply to the unnamed package, whose
- * associated preference node is <unnamed>. This node
+ * associated preference node is {@code A class Foo wishing to access preferences pertaining to its
+ * A class {@code Foo} wishing to access preferences pertaining to its
* package can obtain a preference node as follows: If this implementation supports stored defaults, and there is
* such a default for the specified preference, the stored default will be
* "exposed" by this call, in the sense that it will be returned
- * by a succeeding call to get.
+ * by a succeeding call to {@code get}.
*
* @param key key whose mapping is to be removed from the preference node.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if key contains the null control
@@ -545,7 +545,7 @@
* If this implementation supports stored defaults, and this
* node in the preferences hierarchy contains any such defaults,
* the stored defaults will be "exposed" by this call, in the sense that
- * they will be returned by succeeding calls to get.
+ * they will be returned by succeeding calls to {@code get}.
*
* @throws BackingStoreException if this operation cannot be completed
* due to a failure in the backing store, or inability to
@@ -565,9 +565,9 @@
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if {@code key} is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if key contains
@@ -582,27 +582,27 @@
* an integer as by {@link Integer#parseInt(String)}. Returns the
* specified default if there is no value associated with the key,
* the backing store is inaccessible, or if
- * Integer.parseInt(String) would throw a {@link
+ * {@code Integer.parseInt(String)} would throw a {@link
* NumberFormatException} if the associated value were passed. This
* method is intended for use in conjunction with {@link #putInt}.
*
* If the implementation supports stored defaults and such a
* default exists, is accessible, and could be converted to an int
- * with Integer.parseInt, this int is returned in preference to
+ * with {@code Integer.parseInt}, this int is returned in preference to
* the specified default.
*
* @param key key whose associated value is to be returned as an int.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as an int,
* or the backing store is inaccessible.
* @return the int value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* an int.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
* @see #putInt(String,int)
@@ -619,9 +619,9 @@
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if {@code key} is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if key contains
@@ -636,27 +636,27 @@
* a long as by {@link Long#parseLong(String)}. Returns the
* specified default if there is no value associated with the key,
* the backing store is inaccessible, or if
- * Long.parseLong(String) would throw a {@link
+ * {@code Long.parseLong(String)} would throw a {@link
* NumberFormatException} if the associated value were passed. This
* method is intended for use in conjunction with {@link #putLong}.
*
* If the implementation supports stored defaults and such a
* default exists, is accessible, and could be converted to a long
- * with Long.parseLong, this long is returned in preference to
+ * with {@code Long.parseLong}, this long is returned in preference to
* the specified default.
*
* @param key key whose associated value is to be returned as a long.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a long,
* or the backing store is inaccessible.
* @return the long value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a long.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
* @see #putLong(String,long)
@@ -667,15 +667,15 @@
/**
* Associates a string representing the specified boolean value with the
* specified key in this preference node. The associated string is
- * "true" if the value is true, and "false" if it is
+ * {@code "true"} if the value is true, and {@code "false"} if it is
* false. This method is intended for use in conjunction with
* {@link #getBoolean}.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if {@code key} is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if key contains
@@ -688,34 +688,34 @@
/**
* Returns the boolean value represented by the string associated with the
* specified key in this preference node. Valid strings
- * are "true", which represents true, and "false", which
- * represents false. Case is ignored, so, for example, "TRUE"
- * and "False" are also valid. This method is intended for use in
+ * are {@code "true"}, which represents true, and {@code "false"}, which
+ * represents false. Case is ignored, so, for example, {@code "TRUE"}
+ * and {@code "False"} are also valid. This method is intended for use in
* conjunction with {@link #putBoolean}.
*
* Returns the specified default if there is no value
* associated with the key, the backing store is inaccessible, or if the
- * associated value is something other than "true" or
- * "false", ignoring case.
+ * associated value is something other than {@code "true"} or
+ * {@code "false"}, ignoring case.
*
* If the implementation supports stored defaults and such a
* default exists and is accessible, it is used in preference to the
* specified default, unless the stored default is something other than
- * "true" or "false", ignoring case, in which case the
+ * {@code "true"} or {@code "false"}, ignoring case, in which case the
* specified default is used.
*
* @param key key whose associated value is to be returned as a boolean.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a boolean,
* or the backing store is inaccessible.
* @return the boolean value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a boolean.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
* @see #get(String,String)
@@ -732,9 +732,9 @@
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if {@code key} is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if key contains
@@ -748,27 +748,27 @@
* specified key in this preference node. The string is converted to an
* integer as by {@link Float#parseFloat(String)}. Returns the specified
* default if there is no value associated with the key, the backing store
- * is inaccessible, or if Float.parseFloat(String) would throw a
+ * is inaccessible, or if {@code Float.parseFloat(String)} would throw a
* {@link NumberFormatException} if the associated value were passed.
* This method is intended for use in conjunction with {@link #putFloat}.
*
* If the implementation supports stored defaults and such a
* default exists, is accessible, and could be converted to a float
- * with Float.parseFloat, this float is returned in preference to
+ * with {@code Float.parseFloat}, this float is returned in preference to
* the specified default.
*
* @param key key whose associated value is to be returned as a float.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a float,
* or the backing store is inaccessible.
* @return the float value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a float.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
* @see #putFloat(String,float)
@@ -785,9 +785,9 @@
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH.
+ * @throws NullPointerException if {@code key} is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if key contains
@@ -801,27 +801,27 @@
* specified key in this preference node. The string is converted to an
* integer as by {@link Double#parseDouble(String)}. Returns the specified
* default if there is no value associated with the key, the backing store
- * is inaccessible, or if Double.parseDouble(String) would throw a
+ * is inaccessible, or if {@code Double.parseDouble(String)} would throw a
* {@link NumberFormatException} if the associated value were passed.
* This method is intended for use in conjunction with {@link #putDouble}.
*
* If the implementation supports stored defaults and such a
* default exists, is accessible, and could be converted to a double
- * with Double.parseDouble, this double is returned in preference
+ * with {@code Double.parseDouble}, this double is returned in preference
* to the specified default.
*
* @param key key whose associated value is to be returned as a double.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a double,
* or the backing store is inaccessible.
* @return the double value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a double.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null.
+ * @throws NullPointerException if {@code key} is {@code null}.
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
* @see #putDouble(String,double)
@@ -837,14 +837,14 @@
* with one minor change: the string will consist solely of characters
* from the Base64 Alphabet; it will not contain any newline
* characters. Note that the maximum length of the byte array is limited
- * to three quarters of MAX_VALUE_LENGTH so that the length
- * of the Base64 encoded String does not exceed MAX_VALUE_LENGTH.
+ * to three quarters of {@code MAX_VALUE_LENGTH} so that the length
+ * of the Base64 encoded String does not exceed {@code MAX_VALUE_LENGTH}.
* This method is intended for use in conjunction with
* {@link #getByteArray}.
*
* @param key key with which the string form of value is to be associated.
* @param value value whose string form is to be associated with key.
- * @throws NullPointerException if key or value is null.
+ * @throws NullPointerException if key or value is {@code null}.
* @throws IllegalArgumentException if key.length() exceeds MAX_KEY_LENGTH
* or if value.length exceeds MAX_VALUE_LENGTH*3/4.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -879,17 +879,17 @@
*
* @param key key whose associated value is to be returned as a byte array.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key
+ * preference node has no value associated with {@code key}
* or the associated value cannot be interpreted as a byte array,
* or the backing store is inaccessible.
* @return the byte array value represented by the string associated with
- * key in this preference node, or def if the
+ * {@code key} in this preference node, or {@code def} if the
* associated value does not exist or cannot be interpreted as
* a byte array.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null. (A
- * null value for def is permitted.)
+ * @throws NullPointerException if {@code key} is {@code null}. (A
+ * {@code null} value for {@code def} is permitted.)
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
* @see #get(String,String)
@@ -932,7 +932,7 @@
public abstract String[] childrenNames() throws BackingStoreException;
/**
- * Returns the parent of this preference node, or null if this is
+ * Returns the parent of this preference node, or {@code null} if this is
* the root.
*
* @return the parent of this preference node.
@@ -945,12 +945,12 @@
* Returns the named preference node in the same tree as this node,
* creating it and any of its ancestors if they do not already exist.
* Accepts a relative or absolute path name. Relative path names
- * (which do not begin with the slash character ('/')) are
+ * (which do not begin with the slash character {@code ('/')}) are
* interpreted relative to this preference node.
*
* If the returned node did not exist prior to this call, this node and
* any ancestors that were created by this call are not guaranteed
- * to become permanent until the flush method is called on
+ * to become permanent until the {@code flush} method is called on
* the returned node (or one of its ancestors or descendants).
*
* @param pathName the path name of the preference node to return.
@@ -958,7 +958,7 @@
* @throws IllegalArgumentException if the path name is invalid (i.e.,
* it contains multiple consecutive slash characters, or ends
* with a slash character and is more than one character long).
- * @throws NullPointerException if path name is null.
+ * @throws NullPointerException if path name is {@code null}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @see #flush()
@@ -968,14 +968,14 @@
/**
* Returns true if the named preference node exists in the same tree
* as this node. Relative path names (which do not begin with the slash
- * character ('/')) are interpreted relative to this preference
+ * character {@code ('/')}) are interpreted relative to this preference
* node.
*
* If this node (or an ancestor) has already been removed with the
* {@link #removeNode()} method, it is legal to invoke this method,
- * but only with the path name ""; the invocation will return
- * false. Thus, the idiom p.nodeExists("") may be
- * used to test whether p has been removed.
+ * but only with the path name {@code ""}; the invocation will return
+ * {@code false}. Thus, the idiom {@code p.nodeExists("")} may be
+ * used to test whether {@code p} has been removed.
*
* @param pathName the path name of the node whose existence
* is to be checked.
@@ -986,10 +986,10 @@
* @throws IllegalArgumentException if the path name is invalid (i.e.,
* it contains multiple consecutive slash characters, or ends
* with a slash character and is more than one character long).
- * @throws NullPointerException if path name is null.
+ * @throws NullPointerException if path name is {@code null}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method and
- * pathName is not the empty string ("").
+ * {@code pathName} is not the empty string ({@code ""}).
*/
public abstract boolean nodeExists(String pathName)
throws BackingStoreException;
@@ -1000,19 +1000,19 @@
* removed, attempting any method other than {@link #name()},
* {@link #absolutePath()}, {@link #isUserNode()}, {@link #flush()} or
* {@link #node(String) nodeExists("")} on the corresponding
- * Preferences instance will fail with an
- * IllegalStateException. (The methods defined on {@link Object}
+ * {@code Preferences} instance will fail with an
+ * {@code IllegalStateException}. (The methods defined on {@link Object}
* can still be invoked on a node after it has been removed; they will not
- * throw IllegalStateException.)
+ * throw {@code IllegalStateException}.)
*
* The removal is not guaranteed to be persistent until the
- * flush method is called on this node (or an ancestor).
+ * {@code flush} method is called on this node (or an ancestor).
*
* If this implementation supports stored defaults, removing a
* node exposes any stored defaults at or below this node. Thus, a
- * subsequent call to nodeExists on this node's path name may
- * return true, and a subsequent call to node on this
- * path name may return a (different) Preferences instance
+ * subsequent call to {@code nodeExists} on this node's path name may
+ * return {@code true}, and a subsequent call to {@code node} on this
+ * path name may return a (different) {@code Preferences} instance
* representing a non-empty collection of preferences and/or children.
*
* @throws BackingStoreException if this operation cannot be completed
@@ -1041,19 +1041,19 @@
public abstract String absolutePath();
/**
- * Returns true if this preference node is in the user
- * preference tree, false if it's in the system preference tree.
+ * Returns {@code true} if this preference node is in the user
+ * preference tree, {@code false} if it's in the system preference tree.
*
- * @return true if this preference node is in the user
- * preference tree, false if it's in the system
+ * @return {@code true} if this preference node is in the user
+ * preference tree, {@code false} if it's in the system
* preference tree.
*/
public abstract boolean isUserNode();
/**
* Returns a string representation of this preferences node,
- * as if computed by the expression:(this.isUserNode() ? "User" :
- * "System") + " Preference Node: " + this.absolutePath().
+ * as if computed by the expression:{@code (this.isUserNode() ? "User" :
+ * "System") + " Preference Node: " + this.absolutePath()}.
*/
public abstract String toString();
@@ -1086,9 +1086,9 @@
/**
* Ensures that future reads from this preference node and its
* descendants reflect any changes that were committed to the persistent
- * store (from any VM) prior to the sync invocation. As a
+ * store (from any VM) prior to the {@code sync} invocation. As a
* side-effect, forces any changes in the contents of this preference node
- * and its descendants to the persistent store, as if the flush
+ * and its descendants to the persistent store, as if the {@code flush}
* method had been invoked on this node.
*
* @throws BackingStoreException if this operation cannot be completed
@@ -1107,7 +1107,7 @@
* node, or when the value associated with a preference is changed.
* (Preference change events are not generated by the {@link
* #removeNode()} method, which generates a node change event.
- * Preference change events are generated by the clear
+ * Preference change events are generated by the {@code clear}
* method.)
*
* Events are only guaranteed for changes made within the same JVM
@@ -1118,7 +1118,7 @@
* desiring such events must register with each descendant.
*
* @param pcl The preference change listener to add.
- * @throws NullPointerException if pcl is null.
+ * @throws NullPointerException if {@code pcl} is null.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @see #removePreferenceChangeListener(PreferenceChangeListener)
@@ -1132,7 +1132,7 @@
* receives preference change events.
*
* @param pcl The preference change listener to remove.
- * @throws IllegalArgumentException if pcl was not a registered
+ * @throws IllegalArgumentException if {@code pcl} was not a registered
* preference change listener on this node.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
@@ -1163,8 +1163,8 @@
* circumstances, implementations are neither required to generate node
* change events nor prohibited from doing so.
*
- * @param ncl The NodeChangeListener to add.
- * @throws NullPointerException if ncl is null.
+ * @param ncl The {@code NodeChangeListener} to add.
+ * @throws NullPointerException if {@code ncl} is null.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @see #removeNodeChangeListener(NodeChangeListener)
@@ -1173,12 +1173,12 @@
public abstract void addNodeChangeListener(NodeChangeListener ncl);
/**
- * Removes the specified NodeChangeListener, so it no longer
+ * Removes the specified {@code NodeChangeListener}, so it no longer
* receives change events.
*
- * @param ncl The NodeChangeListener to remove.
- * @throws IllegalArgumentException if ncl was not a registered
- * NodeChangeListener on this node.
+ * @param ncl The {@code NodeChangeListener} to remove.
+ * @throws IllegalArgumentException if {@code ncl} was not a registered
+ * {@code NodeChangeListener} on this node.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @see #addNodeChangeListener(NodeChangeListener)
@@ -1206,7 +1206,7 @@
*
* @param os the output stream on which to emit the XML document.
* @throws IOException if writing to the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws BackingStoreException if preference data cannot be read from
* backing store.
* @see #importPreferences(InputStream)
@@ -1237,7 +1237,7 @@
*
* @param os the output stream on which to emit the XML document.
* @throws IOException if writing to the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws BackingStoreException if preference data cannot be read from
* backing store.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -1273,11 +1273,11 @@
*
* @param is the input stream from which to read the XML document.
* @throws IOException if reading from the specified input stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws InvalidPreferencesFormatException Data on input stream does not
* constitute a valid XML document with the mandated document type.
* @throws SecurityException If a security manager is present and
- * it denies RuntimePermission("preferences").
+ * it denies {@code RuntimePermission("preferences")}.
* @see RuntimePermission
*/
public static void importPreferences(InputStream is)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/PreferencesFactory.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/PreferencesFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/PreferencesFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -29,12 +29,12 @@
/**
* A factory object that generates Preferences objects. Providers of
* new {@link Preferences} implementations should provide corresponding
- * PreferencesFactory implementations so that the new
- * Preferences implementation can be installed in place of the
+ * {@code PreferencesFactory} implementations so that the new
+ * {@code Preferences} implementation can be installed in place of the
* platform-specific default implementation.
*
- * This class is for Preferences implementers only.
- * Normal users of the Preferences facility should have no need to
+ * This class is for {@code Preferences} implementers only.
+ * Normal users of the {@code Preferences} facility should have no need to
* consult this documentation.
*
* @author Josh Bloch
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/XmlSupport.java Wed Jul 05 20:44:51 2017 +0200
@@ -88,7 +88,7 @@
* an XML document conforming to the definition in the Preferences spec.
*
* @throws IOException if writing to the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws BackingStoreException if preference data cannot be read from
* backing store.
* @throws IllegalStateException if this node (or an ancestor) has been
@@ -188,7 +188,7 @@
* spec.
*
* @throws IOException if reading from the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
* @throws InvalidPreferencesFormatException Data on input stream does not
* constitute a valid XML document with the mandated document type.
*/
@@ -337,7 +337,7 @@
* as the internal (undocumented) format for FileSystemPrefs.
*
* @throws IOException if writing to the specified output stream
- * results in an IOException.
+ * results in an {@code IOException}.
*/
static void exportMap(OutputStream os, Map
* altBase64 encoding is used, if java string does contain at least
* one character less, than 0x0020, or greater, than 0x007f.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferencesFactory.java
--- a/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferencesFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/windows/classes/java/util/prefs/WindowsPreferencesFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -25,7 +25,7 @@
package java.util.prefs;
/**
- * Implementation of PreferencesFactory to return
+ * Implementation of {@code PreferencesFactory} to return
* WindowsPreferences objects.
*
* @author Konstantin Kladko
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/jgss/GSSCredentialImpl.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/GSSCredentialImpl.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/GSSCredentialImpl.java Wed Jul 05 20:44:51 2017 +0200
@@ -547,8 +547,8 @@
/**
* Returns the specified mechanism's credential-element.
*
- * @param mechOid - the oid for mechanism to retrieve
- * @param throwExcep - boolean indicating if the function is
+ * @param mechOid the oid for mechanism to retrieve
+ * @param initiate boolean indicating if the function is
* to throw exception or return null when element is not
* found.
* @return mechanism credential object
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/jgss/GSSToken.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/GSSToken.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/GSSToken.java Wed Jul 05 20:44:51 2017 +0200
@@ -84,7 +84,7 @@
*
* @param data the array containing the bytes of the integer value
* @param pos the offset in the array
- * @size the number of bytes to read from the array.
+ * @param size the number of bytes to read from the array.
* @return the integer value
*/
public static final int readLittleEndian(byte[] data, int pos, int size) {
@@ -141,7 +141,7 @@
* Reads a two byte integer value from an InputStream.
*
* @param is the InputStream to read from
- * @returns the integer value
+ * @return the integer value
* @throws IOException if some errors occurs while reading the integer
* bytes.
*/
@@ -155,7 +155,7 @@
*
* @param src the byte arra to read from
* @param pos the offset to start reading from
- * @returns the integer value
+ * @return the integer value
*/
public static final int readInt(byte[] src, int pos) {
return ((0xFF & src[pos])<<8 | (0xFF & src[pos+1]));
@@ -167,8 +167,8 @@
*
* @param is the InputStream to read from
* @param buffer the buffer to store the bytes into
- * @param throws EOFException if EOF is reached before all bytes are
- * read.
+ * @throws EOFException if EOF is reached before all bytes are
+ * read.
* @throws IOException is an error occurs while reading
*/
public static final void readFully(InputStream is, byte[] buffer)
@@ -184,8 +184,8 @@
* @param buffer the buffer to store the bytes into
* @param offset the offset to start storing at
* @param len the number of bytes to read
- * @param throws EOFException if EOF is reached before all bytes are
- * read.
+ * @throws EOFException if EOF is reached before all bytes are
+ * read.
* @throws IOException is an error occurs while reading
*/
public static final void readFully(InputStream is,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/jgss/LoginConfigImpl.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/LoginConfigImpl.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/LoginConfigImpl.java Wed Jul 05 20:44:51 2017 +0200
@@ -48,7 +48,7 @@
* A new instance of LoginConfigImpl must be created for each login request
* since it's only used by a single (caller, mech) pair
* @param caller defined in GSSUtil as CALLER_XXX final fields
- * @param oid defined in GSSUtil as XXX_MECH_OID final fields
+ * @param mech defined in GSSUtil as XXX_MECH_OID final fields
*/
public LoginConfigImpl(GSSCaller caller, Oid mech) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/jgss/ProviderList.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/ProviderList.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/ProviderList.java Wed Jul 05 20:44:51 2017 +0200
@@ -46,7 +46,7 @@
* queries this class whenever it needs a mechanism's factory.
*
* This class stores an ordered list of pairs of the form
- *
*
* If a mechanism's factory is being obtained from a provider as a
- * result of encountering a entryof the form
+ *
*
* Context establishment tokens are defined in a mechanism independent
* format in section 3.1 of RFC 2743. The GSS-Framework will add
* and remove the mechanism independent header portion of this token format
* depending on whether a token is received or is being sent. The mechanism
- * should only generate or expect to read the inner-context token portion..
- *
+ * should only generate or expect to read the inner-context token portion.
+ *
* An exported name will generally be passed in using this method.
*
- * @param nameBytes the bytes describing this entity to the mechanism
+ * @param name the bytes describing this entity to the mechanism
* @param nameType an Oid serving as a clue as to how the mechanism should
* interpret the nameStr
* @throws GSSException if any of the errors described in RFC 2743 for
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/Checksum.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Checksum.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Checksum.java Wed Jul 05 20:44:51 2017 +0200
@@ -128,8 +128,8 @@
/**
* Constructs a new Checksum using the raw data and type.
- * @data the byte array of checksum.
- * @new_cksumType the type of checksum.
+ * @param data the byte array of checksum.
+ * @param new_cksumType the type of checksum.
*
*/
// used in InitialToken
@@ -141,8 +141,8 @@
/**
* Constructs a new Checksum by calculating the checksum over the data
* using specified checksum type.
- * @new_cksumType the type of checksum.
- * @data the data that needs to be performed a checksum calculation on.
+ * @param new_cksumType the type of checksum.
+ * @param data the data that needs to be performed a checksum calculation on.
*/
public Checksum(int new_cksumType, byte[] data)
throws KdcErrException, KrbCryptoException {
@@ -159,8 +159,8 @@
/**
* Constructs a new Checksum by calculating the keyed checksum
* over the data using specified checksum type.
- * @new_cksumType the type of checksum.
- * @data the data that needs to be performed a checksum calculation on.
+ * @param new_cksumType the type of checksum.
+ * @param data the data that needs to be performed a checksum calculation on.
*/
// KrbSafe, KrbTgsReq
public Checksum(int new_cksumType, byte[] data,
@@ -238,12 +238,12 @@
/**
* Encodes a Checksum object.
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java Wed Jul 05 20:44:51 2017 +0200
@@ -330,7 +330,7 @@
*
* @param s the string duration
* @return time in seconds
- * @throw KrbException if format is illegal
+ * @throws KrbException if format is illegal
*/
public static int duration(String s) throws KrbException {
@@ -392,7 +392,7 @@
* @param keys the keys
* @return the int value, Integer.MIN_VALUE is returned if it cannot be
* found or the value is not a legal integer.
- * @throw IllegalArgumentException if any of the keys is illegal
+ * @throws IllegalArgumentException if any of the keys is illegal
* @see #get(java.lang.String[])
*/
public int getIntValue(String... keys) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/Credentials.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Credentials.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Credentials.java Wed Jul 05 20:44:51 2017 +0200
@@ -279,7 +279,7 @@
* @param ticketCache the path to the tickets file. A value
* of null will be accepted to indicate that the default
* path should be searched
- * @returns the TGT credentials or null if none were found. If the tgt
+ * @return the TGT credentials or null if none were found. If the tgt
* expired, it is the responsibility of the caller to determine this.
*/
public static Credentials acquireTGTFromCache(PrincipalName princ,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/EncryptedData.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/EncryptedData.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/EncryptedData.java Wed Jul 05 20:44:51 2017 +0200
@@ -259,20 +259,20 @@
/**
* Returns an ASN.1 encoded EncryptedData type.
*
- *
* This definition reflects the Network Working Group RFC 4120
* specification available at
*
* http://www.ietf.org/rfc/rfc4120.txt.
- *
+ *
* @return byte array of encoded EncryptedData object.
* @exception Asn1Exception if an error occurs while decoding an
* ASN1 encoded data.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java Wed Jul 05 20:44:51 2017 +0200
@@ -101,11 +101,11 @@
* Obtains all versions of the secret key of the principal from a
* keytab.
*
- * @Param princ the principal whose secret key is desired
+ * @param princ the principal whose secret key is desired
* @param keytab the path to the keytab file. A value of null
* will be accepted to indicate that the default path should be
* searched.
- * @returns an array of secret keys or null if none were found.
+ * @return an array of secret keys or null if none were found.
*/
public static EncryptionKey[] acquireSecretKeys(PrincipalName princ,
String keytab) {
@@ -127,7 +127,7 @@
* @param password NOT null
* @param etype
* @param snp can be NULL
- * @returns never null
+ * @return never null
*/
public static EncryptionKey acquireSecretKey(PrincipalName cname,
char[] password, int etype, PAData.SaltAndParams snp)
@@ -150,7 +150,7 @@
* @param salt NOT null
* @param etype
* @param s2kparams can be NULL
- * @returns never null
+ * @return never null
*/
public static EncryptionKey acquireSecretKey(char[] password,
String salt, int etype, byte[] s2kparams)
@@ -388,11 +388,11 @@
/**
* Returns the ASN.1 encoding of this EncryptionKey.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReqBuilder.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReqBuilder.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReqBuilder.java Wed Jul 05 20:44:51 2017 +0200
@@ -110,7 +110,7 @@
* realm, where default realm will be used. This realm will be the target
* realm for AS-REQ. I believe a client should only get initial TGT from
* its own realm.
- * @param keys must not be null. if empty, might be quite useless.
+ * @param ktab must not be null. If empty, might be quite useless.
* This argument will neither be modified nor stored by the method.
* @throws KrbException
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/KrbCred.java Wed Jul 05 20:44:51 2017 +0200
@@ -34,8 +34,6 @@
import sun.security.krb5.internal.*;
import sun.security.krb5.internal.crypto.KeyUsage;
import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
import sun.security.util.DerValue;
@@ -65,7 +63,6 @@
PrincipalName client = tgt.getClient();
PrincipalName tgService = tgt.getServer();
- PrincipalName server = serviceTicket.getServer();
if (!serviceTicket.getClient().equals(client))
throw new KrbException(Krb5.KRB_ERR_GENERIC,
"Client principal does not match");
@@ -78,28 +75,10 @@
options.set(KDCOptions.FORWARDED, true);
options.set(KDCOptions.FORWARDABLE, true);
- HostAddresses sAddrs = null;
-
- // GSSName.NT_HOSTBASED_SERVICE should display with KRB_NT_SRV_HST
- if (server.getNameType() == PrincipalName.KRB_NT_SRV_HST) {
- sAddrs = new HostAddresses(server);
- } else if (server.getNameType() == PrincipalName.KRB_NT_UNKNOWN) {
- // Sometimes this is also a server
- if (server.getNameStrings().length >= 2) {
- String host = server.getNameStrings()[1];
- try {
- InetAddress[] addr = InetAddress.getAllByName(host);
- if (addr != null && addr.length > 0) {
- sAddrs = new HostAddresses(addr);
- }
- } catch (UnknownHostException ioe) {
- // maybe we guessed wrong, let sAddrs be null
- }
- }
- }
-
KrbTgsReq tgsReq = new KrbTgsReq(options, tgt, tgService,
- null, null, null, null, sAddrs, null, null, null);
+ null, null, null, null,
+ null, // No easy way to get addresses right
+ null, null, null);
credMessg = createMessage(tgsReq.sendAndGetCreds(), key);
obuf = credMessg.asn1Encode();
@@ -111,7 +90,6 @@
EncryptionKey sessionKey
= delegatedCreds.getSessionKey();
PrincipalName princ = delegatedCreds.getClient();
- Realm realm = princ.getRealm();
PrincipalName tgService = delegatedCreds.getServer();
KrbCredInfo credInfo = new KrbCredInfo(sessionKey,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/PrincipalName.java Wed Jul 05 20:44:51 2017 +0200
@@ -45,14 +45,14 @@
/**
* Implements the ASN.1 PrincipalName type and its realm in a single class.
- *
* This definition reflects the Network Working Group RFC 4120
@@ -638,7 +638,8 @@
* name, the second component is returned.
* Null is returned if there are not two or more
* components in the name.
- * @returns instance component of a multi-component name.
+ *
+ * @return instance component of a multi-component name.
*/
public String getInstanceComponent()
{
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/Realm.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Realm.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Realm.java Wed Jul 05 20:44:51 2017 +0200
@@ -41,9 +41,8 @@
/**
* Implements the ASN.1 Realm type.
*
- *
* This definition reflects the Network Working Group RFC4120
* specification available at
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/APRep.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/APRep.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/APRep.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,13 +39,13 @@
/**
* Implements the ASN.1 AP-REP type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/APReq.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/APReq.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/APReq.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,7 +38,7 @@
/**
* Implements the ASN.1 AP-REQ type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/Authenticator.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/Authenticator.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/Authenticator.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,7 +38,7 @@
/**
* Implements the ASN.1 Authenticator type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncAPRepPart.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncAPRepPart.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncAPRepPart.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,14 +39,14 @@
/**
* Implements the ASN.1 EncAPRepPart type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKDCRepPart.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKDCRepPart.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKDCRepPart.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,7 +40,7 @@
/**
* Implements the ASN.1 EncKDCRepPart type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKrbCredPart.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKrbCredPart.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKrbCredPart.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,7 +40,7 @@
/**
* Implements the ASN.1 EncKrbCredPart type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKrbPrivPart.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKrbPrivPart.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncKrbPrivPart.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,7 +38,7 @@
/**
* Implements the ASN.1 EncKrbPrivPart type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncTicketPart.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncTicketPart.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/EncTicketPart.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,7 +39,7 @@
/**
* Implements the ASN.1 EncTicketPart type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,16 +39,17 @@
import java.net.Inet6Address;
import java.net.UnknownHostException;
import java.io.IOException;
+import java.util.Arrays;
/**
* Implements the ASN.1 HostAddress type.
*
- *
* This definition reflects the Network Working Group RFC 4120
@@ -131,7 +132,7 @@
/**
* Gets the InetAddress of this HostAddress.
* @return the IP address for this specified host.
- * @exception if no IP address for the host could be found.
+ * @exception UnknownHostException if no IP address for the host could be found.
*
*/
public InetAddress getInetAddress() throws UnknownHostException {
@@ -295,4 +296,11 @@
}
}
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(Arrays.toString(address));
+ sb.append('(').append(addrType).append(')');
+ return sb.toString();
+ }
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java Wed Jul 05 20:44:51 2017 +0200
@@ -45,7 +45,7 @@
/**
* Implements the ASN.1 HostAddresses type.
*
- *
* This definition reflects the Network Working Group RFC 4120
@@ -338,4 +338,9 @@
for (int i = 0; i < inetAddresses.length; i++)
addresses[i] = new HostAddress(inetAddresses[i]);
}
+
+ @Override
+ public String toString() {
+ return Arrays.toString(addresses);
+ }
}
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCOptions.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCOptions.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCOptions.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,7 +40,7 @@
/**
* Implements the ASN.1 KDCOptions type.
*
- *
* This definition reflects the Network Working Group RFC 4120
@@ -115,7 +115,7 @@
* in the addresses field of the request.
*
+ *
*/
public class KDCOptions extends KerberosFlags {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCRep.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCRep.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCRep.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,7 +38,7 @@
/**
* Implements the ASN.1 KDC-REP type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCReq.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCReq.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCReq.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,7 +39,7 @@
/**
* Implements the ASN.1 KRB_KDC_REQ type.
*
- *
* This definition reflects the Network Working Group RFC 4120
@@ -95,7 +95,7 @@
* @param req_type a encoded asn1 type value.
* @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data.
* @exception IOException if an I/O error occurs while reading encoded data.
- * @exceptoin KrbErrException
+ * @exception KrbErrException
*/
public KDCReq(DerValue der, int req_type) throws Asn1Exception,
IOException, KrbException {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCReqBody.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCReqBody.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KDCReqBody.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,7 +39,7 @@
/**
* Implements the ASN.1 KDC-REQ-BODY type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBCred.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBCred.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBCred.java Wed Jul 05 20:44:51 2017 +0200
@@ -41,14 +41,14 @@
/**
* Implements the ASN.1 Authenticator type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBError.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBError.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBError.java Wed Jul 05 20:44:51 2017 +0200
@@ -48,7 +48,7 @@
/**
* Implements the ASN.1 KRBError type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBPriv.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBPriv.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBPriv.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,14 +39,14 @@
/**
* Implements the ASN.1 KRB-PRIV type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBSafe.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBSafe.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBSafe.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,14 +40,14 @@
/**
* Implements the ASN.1 KRBSafe type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBSafeBody.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBSafeBody.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBSafeBody.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,7 +39,7 @@
/**
* Implements the ASN.1 KRBSafeBody type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KerberosTime.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KerberosTime.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/KerberosTime.java Wed Jul 05 20:44:51 2017 +0200
@@ -46,9 +46,7 @@
/**
* Implements the ASN.1 KerberosTime type. This is an immutable class.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/LastReq.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/LastReq.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/LastReq.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,12 +38,12 @@
/**
* Implements the ASN.1 LastReq type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/LoginOptions.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/LoginOptions.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/LoginOptions.java Wed Jul 05 20:44:51 2017 +0200
@@ -36,7 +36,7 @@
/**
* Implements the ASN.1 KDCOptions type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/MethodData.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/MethodData.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/MethodData.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,12 +38,12 @@
/**
* Implements the ASN.1 EncKrbPrivPart type.
*
- *
* This definition reflects the Network Working Group RFC 4120
@@ -140,11 +140,14 @@
/**
* Gets the preferred etype from the PAData array.
- * 1. ETYPE-INFO2-ENTRY with unknown s2kparams ignored
- * 2. ETYPE-INFO2 preferred to ETYPE-INFO
- * 3. multiple entries for same etype in one PA-DATA, use the first one.
- * 4. Multiple PA-DATA with same type, choose the last one
+ *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/PAForUserEnc.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/PAForUserEnc.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/PAForUserEnc.java Wed Jul 05 20:44:51 2017 +0200
@@ -36,7 +36,7 @@
/**
* Implements the ASN.1 PA-FOR-USER type.
*
- *
* This definition reflects MS-SFU.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/Ticket.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/Ticket.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/Ticket.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,14 +42,14 @@
/**
* Implements the ASN.1 Ticket type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/TransitedEncoding.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/TransitedEncoding.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/TransitedEncoding.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,12 +38,12 @@
/**
* Implements the ASN.1 TransitedEncoding type.
*
- *
* This definition reflects the Network Working Group RFC 4120
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Des.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Des.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/Des.java Wed Jul 05 20:44:51 2017 +0200
@@ -226,7 +226,7 @@
/**
* Generates DES key from the password.
- * @param password a char[] used to create the key.
+ * @param passwdChars a char[] used to create the key.
* @return DES key.
*
* @modified by Yanni Zhang, Dec 6, 99
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/DesMacCksumType.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/DesMacCksumType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/DesMacCksumType.java Wed Jul 05 20:44:51 2017 +0200
@@ -125,7 +125,7 @@
* @param data the data.
* @param size the length of data.
* @param key the key used to encrypt the checksum.
- * @param checksum
+ * @param checksum the checksum.
* @return true if verification is successful.
*
* @modified by Yanni Zhang, 12/08/99.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacMd5ArcFourCksumType.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacMd5ArcFourCksumType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacMd5ArcFourCksumType.java Wed Jul 05 20:44:51 2017 +0200
@@ -95,7 +95,7 @@
* @param data the data.
* @param size the length of data.
* @param key the key used to encrypt the checksum.
- * @param checksum
+ * @param checksum the checksum.
* @return true if verification is successful.
*/
public boolean verifyKeyedChecksum(byte[] data, int size,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Aes128CksumType.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Aes128CksumType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Aes128CksumType.java Wed Jul 05 20:44:51 2017 +0200
@@ -95,7 +95,7 @@
* @param data the data.
* @param size the length of data.
* @param key the key used to encrypt the checksum.
- * @param checksum
+ * @param checksum the checksum.
* @return true if verification is successful.
*/
public boolean verifyKeyedChecksum(byte[] data, int size,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Aes256CksumType.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Aes256CksumType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Aes256CksumType.java Wed Jul 05 20:44:51 2017 +0200
@@ -95,7 +95,7 @@
* @param data the data.
* @param size the length of data.
* @param key the key used to encrypt the checksum.
- * @param checksum
+ * @param checksum the checksum.
* @return true if verification is successful.
*/
public boolean verifyKeyedChecksum(byte[] data, int size,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Des3KdCksumType.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Des3KdCksumType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/HmacSha1Des3KdCksumType.java Wed Jul 05 20:44:51 2017 +0200
@@ -89,7 +89,7 @@
* @param data the data.
* @param size the length of data.
* @param key the key used to encrypt the checksum.
- * @param checksum
+ * @param checksum the checksum.
* @return true if verification is successful.
*/
public boolean verifyKeyedChecksum(byte[] data, int size,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/RsaMd5DesCksumType.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/RsaMd5DesCksumType.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/RsaMd5DesCksumType.java Wed Jul 05 20:44:51 2017 +0200
@@ -120,7 +120,7 @@
* @param data the data.
* @param size the length of data.
* @param key the key used to encrypt the checksum.
- * @param checksum
+ * @param checksum the checksum.
* @return true if verification is successful.
*
* @modified by Yanni Zhang, 12/08/99.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ktab/KeyTab.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ktab/KeyTab.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/ktab/KeyTab.java Wed Jul 05 20:44:51 2017 +0200
@@ -513,7 +513,7 @@
/**
* Creates key table file version.
* @param file the key table file.
- * @exception IOException.
+ * @exception IOException
*/
public synchronized void createVersion(File file) throws IOException {
try (KeyTabOutputStream kos =
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/AuthList.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/AuthList.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/rcache/AuthList.java Wed Jul 05 20:44:51 2017 +0200
@@ -45,7 +45,7 @@
* self-cleanup of expired items in the cache.
*
* AuthTimeWithHash objects inside a cache are always sorted from big (new) to
- * small (old) as determined by {@see AuthTimeWithHash#compareTo}. In the most
+ * small (old) as determined by {@link AuthTimeWithHash#compareTo}. In the most
* common case a newcomer should be newer than the first element.
*
* @author Yanni Zhang
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Kinit.java
--- a/jdk/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Kinit.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Kinit.java Wed Jul 05 20:44:51 2017 +0200
@@ -59,26 +59,25 @@
* We currently support only file-based credentials cache to
* store the tickets obtained from the KDC.
* By default, for all Unix platforms a cache file named
- * /tmp/krb5cc_<uid> will be generated. The <uid> is the
+ * {@code /tmp/krb5cc_
- * <USER_HOME> is obtained from
+ *
* For instance, on Windows NT, it could be
- * c:\winnt\profiles\duke\krb5cc_duke, in
- * which duke is the <USER_NAME>, and c:\winnt\profile\duke is the
- * <USER_HOME>.
- *
+ * {@code c:\winnt\profiles\duke\krb5cc_duke}, in
+ * which duke is the {@code
* A single user could have multiple principal names,
* but the primary principal of the credentials cache could only be one,
* which means one cache file could only store tickets for one
@@ -88,10 +87,8 @@
* To avoid overwriting, you need to specify
* a different cache file name when you request a
* new ticket.
- *
+ *
* You can specify the location of the cache file by using the -c option
- *
*/
public static void main(String[] args) {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java
--- a/jdk/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Klist.java Wed Jul 05 20:44:51 2017 +0200
@@ -69,8 +69,10 @@
*
+ * interface CK_CREATEMUTEX.
*
- * @author Karl Scheibelhofer ArrayType
instances are immutable, the
+ * As {@code ArrayType} instances are immutable, the
* string representation for this instance is calculated
- * once, on the first call to toString
, and
+ * once, on the first call to {@code toString}, and
* then the same value is returned for subsequent calls.
*
- * @return a string representation of this ArrayType
instance
+ * @return a string representation of this {@code ArrayType} instance
*/
public String toString() {
@@ -795,12 +813,12 @@
*
* @param CompositeData
instance for equality.
+ * {@code CompositeData} instance for equality.
*
*
* CompositeData
interface,CompositeData
interface, with the restrictions mentioned in the
+ * {@code CompositeData} interface, with the restrictions mentioned in the
* {@link java.util.Collection#equals(Object) equals}
- * method of the java.util.Collection interface.
+ * method of the {@code java.util.Collection} interface.
*
* @param obj the object to be compared for equality with this
- * CompositeData
instance.
- * @return true
if the specified object is equal to this
- * CompositeData
instance.
+ * {@code CompositeData} instance.
+ * @return {@code true} if the specified object is equal to this
+ * {@code CompositeData} instance.
*/
public boolean equals(Object obj) ;
/**
- * Returns the hash code value for this CompositeData
instance.
+ * Returns the hash code value for this {@code CompositeData} instance.
* CompositeData
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of a {@code CompositeData} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its composite type and all the item values).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two CompositeData
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code CompositeData} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
* CompositeData
instance
+ * @return the hash code value for this {@code CompositeData} instance
*/
public int hashCode() ;
/**
- * Returns a string representation of this CompositeData
instance.
+ * Returns a string representation of this {@code CompositeData} instance.
* CompositeData
instance
+ * @return a string representation of this {@code CompositeData} instance
*/
public String toString() ;
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/CompositeDataSupport.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/CompositeDataSupport.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/CompositeDataSupport.java Wed Jul 05 20:44:51 2017 +0200
@@ -45,8 +45,8 @@
/**
- * The CompositeDataSupport class is the open data class which
- * implements the CompositeData interface.
+ * The {@code CompositeDataSupport} class is the open data class which
+ * implements the {@code CompositeData} interface.
*
*
* @since 1.5
@@ -70,15 +70,15 @@
private final CompositeType compositeType;
/**
- * CompositeDataSupport
instance for equality.
*
*
* CompositeData
interface,CompositeData
interface, with the restrictions mentioned in the
* {@link java.util.Collection#equals(Object) equals}
- * method of the java.util.Collection interface.
+ * method of the {@code java.util.Collection} interface.
*
* @param obj the object to be compared for equality with this
* CompositeDataSupport
instance.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -53,27 +53,28 @@
// (these will be removed when MBeanAttributeInfo is made a parent interface of this interface)
/**
- * Returns true if the attribute described by this OpenMBeanAttributeInfo instance is readable,
- * false otherwise.
+ * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo}
+ * instance is readable, {@code false} otherwise.
*
* @return true if the attribute is readable.
*/
public boolean isReadable() ;
/**
- * Returns true if the attribute described by this OpenMBeanAttributeInfo instance is writable,
- * false otherwise.
+ * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo}
+ * instance is writable, {@code false} otherwise.
*
* @return true if the attribute is writable.
*/
public boolean isWritable() ;
/**
- * Returns true if the attribute described by this OpenMBeanAttributeInfo instance
- * is accessed through a isXXX getter (applies only to boolean and Boolean values),
- * false otherwise.
+ * Returns {@code true} if the attribute described by this {@code OpenMBeanAttributeInfo} instance
+ * is accessed through a isXXX
getter
+ * (applies only to {@code boolean} and {@code Boolean} values),
+ * {@code false} otherwise.
*
- * @return true if the attribute is accessed through isXXX.
+ * @return true if the attribute is accessed through isXXX
.
*/
public boolean isIs() ;
@@ -82,50 +83,52 @@
//
/**
- * Compares the specified obj parameter with this OpenMBeanAttributeInfo
instance for equality.
+ * Compares the specified obj parameter with this
+ * {@code OpenMBeanAttributeInfo} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the OpenMBeanAttributeInfo
interface,OpenMBeanAttributeInfo
interface.
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code OpenMBeanAttributeInfo} interface.
*
- * @param obj the object to be compared for equality with this OpenMBeanAttributeInfo
instance;
+ * @param obj the object to be compared for equality with this {@code OpenMBeanAttributeInfo} instance;
*
- * @return true
if the specified object is equal to this OpenMBeanAttributeInfo
instance.
+ * @return {@code true} if the specified object is equal to this {@code OpenMBeanAttributeInfo} instance.
*/
public boolean equals(Object obj);
/**
- * Returns the hash code value for this OpenMBeanAttributeInfo
instance.
+ * Returns the hash code value for this {@code OpenMBeanAttributeInfo} instance.
* OpenMBeanAttributeInfo
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of an {@code OpenMBeanAttributeInfo} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its name, its open type, and its default, min, max and legal values).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two OpenMBeanAttributeInfo
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code OpenMBeanAttributeInfo} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
- * @return the hash code value for this OpenMBeanAttributeInfo
instance
+ * @return the hash code value for this {@code OpenMBeanAttributeInfo} instance
*/
public int hashCode();
/**
- * Returns a string representation of this OpenMBeanAttributeInfo
instance.
+ * Returns a string representation of this {@code OpenMBeanAttributeInfo} instance.
* javax.management.openmbean.OpenMBeanAttributeInfo
),
+ * The string representation consists of the name of this class
+ * (ie {@code javax.management.openmbean.OpenMBeanAttributeInfo}),
* the string representation of the name and open type of the described attribute,
* and the string representation of its default, min, max and legal values.
*
- * @return a string representation of this OpenMBeanAttributeInfo
instance
+ * @return a string representation of this {@code OpenMBeanAttributeInfo} instance
*/
public String toString();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java Wed Jul 05 20:44:51 2017 +0200
@@ -114,7 +114,7 @@
* exposed for management.
*
* @param isIs {@code true} if the attribute's getter is of the
- * form isXXX.
+ * form isXXX
.
*
* @throws IllegalArgumentException if {@code name} or {@code
* description} are null or empty string, or {@code openType} is
@@ -154,7 +154,7 @@
* exposed for management.
*
* @param isIs {@code true} if the attribute's getter is of the
- * form isXXX.
+ * form isXXX
.
*
* @param descriptor The descriptor for the attribute. This may be null
* which is equivalent to an empty descriptor.
@@ -221,7 +221,7 @@
* exposed for management.
*
* @param isIs {@code true} if the attribute's getter is of the
- * form isXXX.
+ * form isXXX
.
*
* @param defaultValue must be a valid value for the {@code
* openType} specified for this attribute; default value not
@@ -278,7 +278,7 @@
* exposed for management.
*
* @param isIs {@code true} if the attribute's getter is of the
- * form isXXX.
+ * form isXXX
.
*
* @param defaultValue must be a valid value
* for the {@code
@@ -345,7 +345,7 @@
* exposed for management.
*
* @param isIs {@code true} if the attribute's getter is of the
- * form isXXX.
+ * form isXXX
.
*
* @param defaultValue must be a valid value for the {@code
* openType} specified for this attribute; default value not
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanConstructorInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -60,7 +60,7 @@
/**
* Returns a human readable description of the constructor
- * described by this OpenMBeanConstructorInfo instance.
+ * described by this {@code OpenMBeanConstructorInfo} instance.
*
* @return the description.
*/
@@ -68,16 +68,16 @@
/**
* Returns the name of the constructor
- * described by this OpenMBeanConstructorInfo instance.
+ * described by this {@code OpenMBeanConstructorInfo} instance.
*
* @return the name.
*/
public String getName() ;
/**
- * Returns an array of OpenMBeanParameterInfo instances
+ * Returns an array of {@code OpenMBeanParameterInfo} instances
* describing each parameter in the signature of the constructor
- * described by this OpenMBeanConstructorInfo instance.
+ * described by this {@code OpenMBeanConstructorInfo} instance.
*
* @return the signature.
*/
@@ -88,48 +88,49 @@
//
/**
- * Compares the specified obj parameter with this OpenMBeanConstructorInfo
instance for equality.
+ * Compares the specified obj parameter with this {@code OpenMBeanConstructorInfo} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the OpenMBeanConstructorInfo
interface,OpenMBeanConstructorInfo
interface.
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code OpenMBeanConstructorInfo} interface.
*
- * @param obj the object to be compared for equality with this OpenMBeanConstructorInfo
instance;
+ * @param obj the object to be compared for equality with this {@code OpenMBeanConstructorInfo} instance;
*
- * @return true
if the specified object is equal to this OpenMBeanConstructorInfo
instance.
+ * @return {@code true} if the specified object is equal to this {@code OpenMBeanConstructorInfo} instance.
*/
public boolean equals(Object obj);
/**
- * Returns the hash code value for this OpenMBeanConstructorInfo
instance.
+ * Returns the hash code value for this {@code OpenMBeanConstructorInfo} instance.
* OpenMBeanConstructorInfo
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of an {@code OpenMBeanConstructorInfo} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its name and signature, where the signature hashCode is calculated by a call to
- * java.util.Arrays.asList(this.getSignature).hashCode()).
+ * {@code java.util.Arrays.asList(this.getSignature).hashCode()}).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two OpenMBeanConstructorInfo
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code OpenMBeanConstructorInfo} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
- * @return the hash code value for this OpenMBeanConstructorInfo
instance
+ * @return the hash code value for this {@code OpenMBeanConstructorInfo} instance
*/
public int hashCode();
/**
- * Returns a string representation of this OpenMBeanConstructorInfo
instance.
+ * Returns a string representation of this {@code OpenMBeanConstructorInfo} instance.
* javax.management.openmbean.OpenMBeanConstructorInfo
),
+ * The string representation consists of the name of this class
+ * (ie {@code javax.management.openmbean.OpenMBeanConstructorInfo}),
* and the name and signature of the described constructor.
*
- * @return a string representation of this OpenMBeanConstructorInfo
instance
+ * @return a string representation of this {@code OpenMBeanConstructorInfo} instance
*/
public String toString();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -70,7 +70,7 @@
/**
* Returns the fully qualified Java class name of the open MBean
- * instances this OpenMBeanInfo describes.
+ * instances this {@code OpenMBeanInfo} describes.
*
* @return the class name.
*/
@@ -78,19 +78,19 @@
/**
* Returns a human readable description of the type of open MBean
- * instances this OpenMBeanInfo describes.
+ * instances this {@code OpenMBeanInfo} describes.
*
* @return the description.
*/
public String getDescription() ;
/**
- * Returns an array of OpenMBeanAttributeInfo instances
+ * Returns an array of {@code OpenMBeanAttributeInfo} instances
* describing each attribute in the open MBean described by this
- * OpenMBeanInfo instance. Each instance in the returned
+ * {@code OpenMBeanInfo} instance. Each instance in the returned
* array should actually be a subclass of
- * MBeanAttributeInfo which implements the
- * OpenMBeanAttributeInfo interface (typically {@link
+ * {@code MBeanAttributeInfo} which implements the
+ * {@code OpenMBeanAttributeInfo} interface (typically {@link
* OpenMBeanAttributeInfoSupport}).
*
* @return the attribute array.
@@ -98,12 +98,12 @@
public MBeanAttributeInfo[] getAttributes() ;
/**
- * Returns an array of OpenMBeanOperationInfo instances
+ * Returns an array of {@code OpenMBeanOperationInfo} instances
* describing each operation in the open MBean described by this
- * OpenMBeanInfo instance. Each instance in the returned
+ * {@code OpenMBeanInfo} instance. Each instance in the returned
* array should actually be a subclass of
- * MBeanOperationInfo which implements the
- * OpenMBeanOperationInfo interface (typically {@link
+ * {@code MBeanOperationInfo} which implements the
+ * {@code OpenMBeanOperationInfo} interface (typically {@link
* OpenMBeanOperationInfoSupport}).
*
* @return the operation array.
@@ -111,12 +111,12 @@
public MBeanOperationInfo[] getOperations() ;
/**
- * Returns an array of OpenMBeanConstructorInfo instances
+ * Returns an array of {@code OpenMBeanConstructorInfo} instances
* describing each constructor in the open MBean described by this
- * OpenMBeanInfo instance. Each instance in the returned
+ * {@code OpenMBeanInfo} instance. Each instance in the returned
* array should actually be a subclass of
- * MBeanConstructorInfo which implements the
- * OpenMBeanConstructorInfo interface (typically {@link
+ * {@code MBeanConstructorInfo} which implements the
+ * {@code OpenMBeanConstructorInfo} interface (typically {@link
* OpenMBeanConstructorInfoSupport}).
*
* @return the constructor array.
@@ -124,9 +124,9 @@
public MBeanConstructorInfo[] getConstructors() ;
/**
- * Returns an array of MBeanNotificationInfo instances
+ * Returns an array of {@code MBeanNotificationInfo} instances
* describing each notification emitted by the open MBean
- * described by this OpenMBeanInfo instance.
+ * described by this {@code OpenMBeanInfo} instance.
*
* @return the notification array.
*/
@@ -137,50 +137,51 @@
//
/**
- * Compares the specified obj parameter with this OpenMBeanInfo
instance for equality.
+ * Compares the specified obj parameter with this {@code OpenMBeanInfo} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the OpenMBeanInfo
interface,OpenMBeanInfo
interface.
- *
- * @param obj the object to be compared for equality with this OpenMBeanInfo
instance;
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code OpenMBeanInfo} interface.
*
- * @return true
if the specified object is equal to this OpenMBeanInfo
instance.
+ * @param obj the object to be compared for equality with this {@code OpenMBeanInfo} instance;
+ *
+ * @return {@code true} if the specified object is equal to this {@code OpenMBeanInfo} instance.
*/
public boolean equals(Object obj);
/**
- * Returns the hash code value for this OpenMBeanInfo
instance.
+ * Returns the hash code value for this {@code OpenMBeanInfo} instance.
* OpenMBeanInfo
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of an {@code OpenMBeanInfo} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its class name, and its infos on attributes, constructors, operations and notifications,
* where the hashCode of each of these arrays is calculated by a call to
- * new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()).
+ * {@code new java.util.HashSet(java.util.Arrays.asList(this.getSignature)).hashCode()}).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two OpenMBeanInfo
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code OpenMBeanInfo} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
- * @return the hash code value for this OpenMBeanInfo
instance
+ * @return the hash code value for this {@code OpenMBeanInfo} instance
*/
public int hashCode();
/**
- * Returns a string representation of this OpenMBeanInfo
instance.
+ * Returns a string representation of this {@code OpenMBeanInfo} instance.
* javax.management.openmbean.OpenMBeanInfo
),
- * the MBean class name,
- * and the string representation of infos on attributes, constructors, operations and notifications of the described MBean.
+ * The string representation consists of the name of this class
+ * (ie {@code javax.management.openmbean.OpenMBeanInfo}), the MBean class name,
+ * and the string representation of infos on attributes, constructors,
+ * operations and notifications of the described MBean.
*
- * @return a string representation of this OpenMBeanInfo
instance
+ * @return a string representation of this {@code OpenMBeanInfo} instance
*/
public String toString();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanOperationInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -58,7 +58,7 @@
/**
* Returns a human readable description of the operation
- * described by this OpenMBeanOperationInfo instance.
+ * described by this {@code OpenMBeanOperationInfo} instance.
*
* @return the description.
*/
@@ -66,19 +66,19 @@
/**
* Returns the name of the operation
- * described by this OpenMBeanOperationInfo instance.
+ * described by this {@code OpenMBeanOperationInfo} instance.
*
* @return the name.
*/
public String getName() ;
/**
- * Returns an array of OpenMBeanParameterInfo instances
+ * Returns an array of {@code OpenMBeanParameterInfo} instances
* describing each parameter in the signature of the operation
- * described by this OpenMBeanOperationInfo instance.
+ * described by this {@code OpenMBeanOperationInfo} instance.
* Each instance in the returned array should actually be a
- * subclass of MBeanParameterInfo which implements the
- * OpenMBeanParameterInfo interface (typically {@link
+ * subclass of {@code MBeanParameterInfo} which implements the
+ * {@code OpenMBeanParameterInfo} interface (typically {@link
* OpenMBeanParameterInfoSupport}).
*
* @return the signature.
@@ -86,8 +86,8 @@
public MBeanParameterInfo[] getSignature() ;
/**
- * Returns an int constant qualifying the impact of the
- * operation described by this OpenMBeanOperationInfo
+ * Returns an {@code int} constant qualifying the impact of the
+ * operation described by this {@code OpenMBeanOperationInfo}
* instance.
*
* The returned constant is one of {@link
@@ -103,9 +103,9 @@
/**
* Returns the fully qualified Java class name of the values
* returned by the operation described by this
- * OpenMBeanOperationInfo instance. This method should
+ * {@code OpenMBeanOperationInfo} instance. This method should
* return the same value as a call to
- * getReturnOpenType().getClassName().
+ * {@code getReturnOpenType().getClassName()}.
*
* @return the return type.
*/
@@ -117,7 +117,7 @@
/**
* Returns the open type of the values returned by the
- * operation described by this OpenMBeanOperationInfo
+ * operation described by this {@code OpenMBeanOperationInfo}
* instance.
*
* @return the return type.
@@ -129,51 +129,53 @@
//
/**
- * Compares the specified obj parameter with this OpenMBeanOperationInfo
instance for equality.
+ * Compares the specified obj parameter with this {@code OpenMBeanOperationInfo} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the OpenMBeanOperationInfo
interface,OpenMBeanOperationInfo
interface.
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code OpenMBeanOperationInfo} interface.
*
- * @param obj the object to be compared for equality with this OpenMBeanOperationInfo
instance;
+ * @param obj the object to be compared for equality with this {@code OpenMBeanOperationInfo} instance;
*
- * @return true
if the specified object is equal to this OpenMBeanOperationInfo
instance.
+ * @return {@code true} if the specified object is equal to this {@code OpenMBeanOperationInfo} instance.
*/
public boolean equals(Object obj);
/**
- * Returns the hash code value for this OpenMBeanOperationInfo
instance.
+ * Returns the hash code value for this {@code OpenMBeanOperationInfo} instance.
* OpenMBeanOperationInfo
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
- * (ie: its name, return open type, impact and signature, where the signature hashCode is calculated by a call to
- * java.util.Arrays.asList(this.getSignature).hashCode()).
+ * The hash code of an {@code OpenMBeanOperationInfo} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
+ * (ie: its name, return open type, impact and signature,
+ * where the signature hashCode is calculated by a call to
+ * {@code java.util.Arrays.asList(this.getSignature).hashCode()}).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two OpenMBeanOperationInfo
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code OpenMBeanOperationInfo} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
*
- * @return the hash code value for this OpenMBeanOperationInfo
instance
+ * @return the hash code value for this {@code OpenMBeanOperationInfo} instance
*/
public int hashCode();
/**
- * Returns a string representation of this OpenMBeanOperationInfo
instance.
+ * Returns a string representation of this {@code OpenMBeanOperationInfo} instance.
* javax.management.openmbean.OpenMBeanOperationInfo
),
+ * The string representation consists of the name of this class
+ * (ie {@code javax.management.openmbean.OpenMBeanOperationInfo}),
* and the name, signature, return open type and impact of the described operation.
*
- * @return a string representation of this OpenMBeanOperationInfo
instance
+ * @return a string representation of this {@code OpenMBeanOperationInfo} instance
*/
public String toString();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/OpenMBeanParameterInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -57,7 +57,7 @@
/**
* Returns a human readable description of the parameter
- * described by this OpenMBeanParameterInfo instance.
+ * described by this {@code OpenMBeanParameterInfo} instance.
*
* @return the description.
*/
@@ -65,7 +65,7 @@
/**
* Returns the name of the parameter
- * described by this OpenMBeanParameterInfo instance.
+ * described by this {@code OpenMBeanParameterInfo} instance.
*
* @return the name.
*/
@@ -77,7 +77,7 @@
/**
* Returns the open type of the values of the parameter
- * described by this OpenMBeanParameterInfo instance.
+ * described by this {@code OpenMBeanParameterInfo} instance.
*
* @return the open type.
*/
@@ -85,7 +85,7 @@
/**
* Returns the default value for this parameter, if it has one, or
- * null otherwise.
+ * {@code null} otherwise.
*
* @return the default value.
*/
@@ -93,7 +93,7 @@
/**
* Returns the set of legal values for this parameter, if it has
- * one, or null otherwise.
+ * one, or {@code null} otherwise.
*
* @return the set of legal values.
*/
@@ -101,7 +101,7 @@
/**
* Returns the minimal value for this parameter, if it has one, or
- * null otherwise.
+ * {@code null} otherwise.
*
* @return the minimum value.
*/
@@ -109,39 +109,39 @@
/**
* Returns the maximal value for this parameter, if it has one, or
- * null otherwise.
+ * {@code null} otherwise.
*
* @return the maximum value.
*/
public Comparable> getMaxValue() ;
/**
- * Returns true if this parameter has a specified default
- * value, or false otherwise.
+ * Returns {@code true} if this parameter has a specified default
+ * value, or {@code false} otherwise.
*
* @return true if there is a default value.
*/
public boolean hasDefaultValue() ;
/**
- * Returns true if this parameter has a specified set of
- * legal values, or false otherwise.
+ * Returns {@code true} if this parameter has a specified set of
+ * legal values, or {@code false} otherwise.
*
* @return true if there is a set of legal values.
*/
public boolean hasLegalValues() ;
/**
- * Returns true if this parameter has a specified minimal
- * value, or false otherwise.
+ * Returns {@code true} if this parameter has a specified minimal
+ * value, or {@code false} otherwise.
*
* @return true if there is a minimum value.
*/
public boolean hasMinValue() ;
/**
- * Returns true if this parameter has a specified maximal
- * value, or false otherwise.
+ * Returns {@code true} if this parameter has a specified maximal
+ * value, or {@code false} otherwise.
*
* @return true if there is a maximum value.
*/
@@ -149,62 +149,62 @@
/**
* Tests whether obj is a valid value for the parameter
- * described by this OpenMBeanParameterInfo
instance.
+ * described by this {@code OpenMBeanParameterInfo} instance.
*
* @param obj the object to be tested.
*
- * @return true
if obj is a valid value
+ * @return {@code true} if obj is a valid value
* for the parameter described by this
- * OpenMBeanParameterInfo
instance,
- * false
otherwise.
+ * {@code OpenMBeanParameterInfo} instance,
+ * {@code false} otherwise.
*/
public boolean isValue(Object obj) ;
/**
- * Compares the specified obj parameter with this OpenMBeanParameterInfo
instance for equality.
+ * Compares the specified obj parameter with this {@code OpenMBeanParameterInfo} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the OpenMBeanParameterInfo
interface,OpenMBeanParameterInfo
interface.
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code OpenMBeanParameterInfo} interface.
*
- * @param obj the object to be compared for equality with this OpenMBeanParameterInfo
instance;
+ * @param obj the object to be compared for equality with this {@code OpenMBeanParameterInfo} instance;
*
- * @return true
if the specified object is equal to this OpenMBeanParameterInfo
instance.
+ * @return {@code true} if the specified object is equal to this {@code OpenMBeanParameterInfo} instance.
*/
public boolean equals(Object obj);
/**
- * Returns the hash code value for this OpenMBeanParameterInfo
instance.
+ * Returns the hash code value for this {@code OpenMBeanParameterInfo} instance.
* OpenMBeanParameterInfo
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of an {@code OpenMBeanParameterInfo} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its name, its open type, and its default, min, max and legal values).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two OpenMBeanParameterInfo
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code OpenMBeanParameterInfo} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
- * @return the hash code value for this OpenMBeanParameterInfo
instance
+ * @return the hash code value for this {@code OpenMBeanParameterInfo} instance
*/
public int hashCode();
/**
- * Returns a string representation of this OpenMBeanParameterInfo
instance.
+ * Returns a string representation of this {@code OpenMBeanParameterInfo} instance.
* javax.management.openmbean.OpenMBeanParameterInfo
),
+ * The string representation consists of the name of this class (ie {@code javax.management.openmbean.OpenMBeanParameterInfo}),
* the string representation of the name and open type of the described parameter,
* and the string representation of its default, min, max and legal values.
*
- * @return a string representation of this OpenMBeanParameterInfo
instance
+ * @return a string representation of this {@code OpenMBeanParameterInfo} instance
*/
public String toString();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/TabularData.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/TabularData.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/TabularData.java Wed Jul 05 20:44:51 2017 +0200
@@ -37,7 +37,7 @@
/**
- * The TabularData interface specifies the behavior of a specific type of complex open data objects
+ * The {@code TabularData} interface specifies the behavior of a specific type of complex open data objects
* which represent tabular data structures.
*
* @since 1.5
@@ -50,7 +50,7 @@
/**
* Returns the tabular type describing this
- * TabularData instance.
+ * {@code TabularData} instance.
*
* @return the tabular type.
*/
@@ -58,21 +58,21 @@
/**
- * Calculates the index that would be used in this TabularData instance to refer to the specified
+ * Calculates the index that would be used in this {@code TabularData} instance to refer to the specified
* composite data value parameter if it were added to this instance.
* This method checks for the type validity of the specified value,
- * but does not check if the calculated index is already used to refer to a value in this TabularData instance.
+ * but does not check if the calculated index is already used to refer to a value in this {@code TabularData} instance.
*
* @param value the composite data value whose index in this
- * TabularData instance is to be calculated;
+ * {@code TabularData} instance is to be calculated;
* must be of the same composite type as this instance's row type;
* must not be null.
*
- * @return the index that the specified value would have in this TabularData instance.
+ * @return the index that the specified value would have in this {@code TabularData} instance.
*
- * @throws NullPointerException if value is null
+ * @throws NullPointerException if value is {@code null}
*
- * @throws InvalidOpenTypeException if value does not conform to this TabularData instance's
+ * @throws InvalidOpenTypeException if value does not conform to this {@code TabularData} instance's
* row type definition.
*/
public Object[] calculateIndex(CompositeData value) ;
@@ -83,8 +83,8 @@
/* *** Content information query methods *** */
/**
- * Returns the number of CompositeData values (ie the
- * number of rows) contained in this TabularData
+ * Returns the number of {@code CompositeData} values (ie the
+ * number of rows) contained in this {@code TabularData}
* instance.
*
* @return the number of values contained.
@@ -92,50 +92,50 @@
public int size() ;
/**
- * Returns true if the number of CompositeData
+ * Returns {@code true} if the number of {@code CompositeData}
* values (ie the number of rows) contained in this
- * TabularData instance is zero.
+ * {@code TabularData} instance is zero.
*
- * @return true if this TabularData is empty.
+ * @return true if this {@code TabularData} is empty.
*/
public boolean isEmpty() ;
/**
- * Returns true if and only if this TabularData instance contains a CompositeData value
- * (ie a row) whose index is the specified key. If key is null or does not conform to
- * this TabularData instance's TabularType definition, this method simply returns false.
+ * Returns {@code true} if and only if this {@code TabularData} instance contains a {@code CompositeData} value
+ * (ie a row) whose index is the specified key. If key is {@code null} or does not conform to
+ * this {@code TabularData} instance's {@code TabularType} definition, this method simply returns {@code false}.
*
- * @param key the index value whose presence in this TabularData instance is to be tested.
+ * @param key the index value whose presence in this {@code TabularData} instance is to be tested.
*
- * @return true if this TabularData indexes a row value with the specified key.
+ * @return {@code true} if this {@code TabularData} indexes a row value with the specified key.
*/
public boolean containsKey(Object[] key) ;
/**
- * Returns true if and only if this TabularData instance contains the specified
- * CompositeData value. If value is null or does not conform to
- * this TabularData instance's row type definition, this method simply returns false.
+ * Returns {@code true} if and only if this {@code TabularData} instance contains the specified
+ * {@code CompositeData} value. If value is {@code null} or does not conform to
+ * this {@code TabularData} instance's row type definition, this method simply returns {@code false}.
*
- * @param value the row value whose presence in this TabularData instance is to be tested.
+ * @param value the row value whose presence in this {@code TabularData} instance is to be tested.
*
- * @return true if this TabularData instance contains the specified row value.
+ * @return {@code true} if this {@code TabularData} instance contains the specified row value.
*/
public boolean containsValue(CompositeData value) ;
/**
- * Returns the CompositeData value whose index is
- * key, or null if there is no value mapping
- * to key, in this TabularData instance.
+ * Returns the {@code CompositeData} value whose index is
+ * key, or {@code null} if there is no value mapping
+ * to key, in this {@code TabularData} instance.
*
* @param key the key of the row to return.
*
* @return the value corresponding to key.
*
* @throws NullPointerException if the key is
- * null
+ * {@code null}
* @throws InvalidKeyException if the key does not
- * conform to this TabularData instance's *
- * TabularType definition
+ * conform to this {@code TabularData} instance's *
+ * {@code TabularType} definition
*/
public CompositeData get(Object[] key) ;
@@ -146,45 +146,45 @@
/**
- * Adds value to this TabularData instance.
+ * Adds value to this {@code TabularData} instance.
* The composite type of value must be the same as this
* instance's row type (ie the composite type returned by
- * this.getTabularType().{@link TabularType#getRowType
- * getRowType()}), and there must not already be an existing
- * value in this TabularData instance whose index is the
+ * this.getTabularType().{@link TabularType#getRowType
+ * getRowType()}
), and there must not already be an existing
+ * value in this {@code TabularData} instance whose index is the
* same as the one calculated for the value to be
* added. The index for value is calculated according
- * to this TabularData instance's TabularType
- * definition (see TabularType.{@link
- * TabularType#getIndexNames getIndexNames()}).
+ * to this {@code TabularData} instance's {@code TabularType}
+ * definition (see TabularType.{@link
+ * TabularType#getIndexNames getIndexNames()}
).
*
- * @param value the composite data value to be added as a new row to this TabularData instance;
+ * @param value the composite data value to be added as a new row to this {@code TabularData} instance;
* must be of the same composite type as this instance's row type;
* must not be null.
*
- * @throws NullPointerException if value is null
- * @throws InvalidOpenTypeException if value does not conform to this TabularData instance's
+ * @throws NullPointerException if value is {@code null}
+ * @throws InvalidOpenTypeException if value does not conform to this {@code TabularData} instance's
* row type definition.
* @throws KeyAlreadyExistsException if the index for value, calculated according to
- * this TabularData instance's TabularType definition
+ * this {@code TabularData} instance's {@code TabularType} definition
* already maps to an existing value in the underlying HashMap.
*/
public void put(CompositeData value) ;
/**
- * Removes the CompositeData value whose index is key from this TabularData instance,
- * and returns the removed value, or returns null if there is no value whose index is key.
+ * Removes the {@code CompositeData} value whose index is key from this {@code TabularData} instance,
+ * and returns the removed value, or returns {@code null} if there is no value whose index is key.
*
- * @param key the index of the value to get in this TabularData instance;
- * must be valid with this TabularData instance's row type definition;
+ * @param key the index of the value to get in this {@code TabularData} instance;
+ * must be valid with this {@code TabularData} instance's row type definition;
* must not be null.
*
- * @return previous value associated with specified key, or null
+ * @return previous value associated with specified key, or {@code null}
* if there was no mapping for key.
*
- * @throws NullPointerException if the key is null
- * @throws InvalidKeyException if the key does not conform to this TabularData instance's
- * TabularType definition
+ * @throws NullPointerException if the key is {@code null}
+ * @throws InvalidKeyException if the key does not conform to this {@code TabularData} instance's
+ * {@code TabularType} definition
*/
public CompositeData remove(Object[] key) ;
@@ -195,27 +195,27 @@
/**
- * Add all the elements in values to this TabularData instance.
- * If any element in values does not satisfy the constraints defined in {@link #put(CompositeData) put},
- * or if any two elements in values have the same index calculated according to this TabularData
- * instance's TabularType definition, then an exception describing the failure is thrown
- * and no element of values is added, thus leaving this TabularData instance unchanged.
+ * Add all the elements in values to this {@code TabularData} instance.
+ * If any element in values does not satisfy the constraints defined in {@link #put(CompositeData) put},
+ * or if any two elements in values have the same index calculated according to this {@code TabularData}
+ * instance's {@code TabularType} definition, then an exception describing the failure is thrown
+ * and no element of values is added, thus leaving this {@code TabularData} instance unchanged.
*
- * @param values the array of composite data values to be added as new rows to this TabularData instance;
- * if values is null or empty, this method returns without doing anything.
+ * @param values the array of composite data values to be added as new rows to this {@code TabularData} instance;
+ * if values is {@code null} or empty, this method returns without doing anything.
*
- * @throws NullPointerException if an element of values is null
+ * @throws NullPointerException if an element of values is {@code null}
* @throws InvalidOpenTypeException if an element of values does not conform to
- * this TabularData instance's row type definition
+ * this {@code TabularData} instance's row type definition
* @throws KeyAlreadyExistsException if the index for an element of values, calculated according to
- * this TabularData instance's TabularType definition
+ * this {@code TabularData} instance's {@code TabularType} definition
* already maps to an existing value in this instance,
* or two elements of values have the same index.
*/
public void putAll(CompositeData[] values) ;
/**
- * Removes all CompositeData values (ie rows) from this TabularData instance.
+ * Removes all {@code CompositeData} values (ie rows) from this {@code TabularData} instance.
*/
public void clear();
@@ -257,47 +257,47 @@
/**
- * Compares the specified obj parameter with this TabularData
instance for equality.
+ * Compares the specified obj parameter with this {@code TabularData} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the TabularData
interface,TabularData
interface.
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code TabularData} interface.
*
- * @param obj the object to be compared for equality with this TabularData
instance;
+ * @param obj the object to be compared for equality with this {@code TabularData} instance;
*
- * @return true
if the specified object is equal to this TabularData
instance.
+ * @return {@code true} if the specified object is equal to this {@code TabularData} instance.
*/
public boolean equals(Object obj);
/**
- * Returns the hash code value for this TabularData
instance.
+ * Returns the hash code value for this {@code TabularData} instance.
* TabularData
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of a {@code TabularData} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its tabular type and its content, where the content is defined as all the index to value mappings).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two TabularDataSupport
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code TabularDataSupport} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
*
- * @return the hash code value for this TabularDataSupport
instance
+ * @return the hash code value for this {@code TabularDataSupport} instance
*/
public int hashCode();
/**
- * Returns a string representation of this TabularData
instance.
+ * Returns a string representation of this {@code TabularData} instance.
* TabularData
instance
+ * @return a string representation of this {@code TabularData} instance
*/
public String toString();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java
--- a/jdk/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java Wed Jul 05 20:44:51 2017 +0200
@@ -51,8 +51,9 @@
/**
- * The TabularDataSupport class is the open data class which implements the TabularData
- * and the Map interfaces, and which is internally based on a hash map data structure.
+ * The {@code TabularDataSupport} class is the open data
+ * class which implements the {@code TabularData}
+ * and the {@code Map} interfaces, and which is internally based on a hash map data structure.
*
* @since 1.5
*/
@@ -102,13 +103,15 @@
/**
- * Creates an empty TabularDataSupport instance whose open-type is tabularType,
- * and whose underlying HashMap has a default initial capacity (101) and default load factor (0.75).
+ * Creates an empty {@code TabularDataSupport} instance
+ * whose open-type is tabularType,
+ * and whose underlying {@code HashMap} has a default
+ * initial capacity (101) and default load factor (0.75).
* TabularDataSupport
instance.
+ * Removes all rows from this {@code TabularDataSupport} instance.
*/
public void clear() {
@@ -541,9 +547,9 @@
/* *** Informational methods from java.util.Map *** */
/**
- * Returns the number of rows in this TabularDataSupport
instance.
+ * Returns the number of rows in this {@code TabularDataSupport} instance.
*
- * @return the number of rows in this TabularDataSupport
instance.
+ * @return the number of rows in this {@code TabularDataSupport} instance.
*/
public int size() {
@@ -551,9 +557,9 @@
}
/**
- * Returns true if this TabularDataSupport
instance contains no rows.
+ * Returns {@code true} if this {@code TabularDataSupport} instance contains no rows.
*
- * @return true if this TabularDataSupport
instance contains no rows.
+ * @return {@code true} if this {@code TabularDataSupport} instance contains no rows.
*/
public boolean isEmpty() {
@@ -656,9 +662,10 @@
/**
- * Returns a clone of this TabularDataSupport
instance:
- * the clone is obtained by calling super.clone(), and then cloning the underlying map.
- * Only a shallow clone of the underlying map is made, i.e. no cloning of the indexes and row values is made as they are immutable.
+ * Returns a clone of this {@code TabularDataSupport} instance:
+ * the clone is obtained by calling {@code super.clone()}, and then cloning the underlying map.
+ * Only a shallow clone of the underlying map is made, i.e.
+ * no cloning of the indexes and row values is made as they are immutable.
*/
/* We cannot use covariance here and return TabularDataSupport
because this would fail with existing code that subclassed
@@ -677,21 +684,21 @@
/**
- * Compares the specified obj parameter with this TabularDataSupport
instance for equality.
+ * Compares the specified obj parameter with this {@code TabularDataSupport} instance for equality.
*
*
- * This ensures that this equals method works properly for obj parameters which are
- * different implementations of the TabularData
interface,TabularData
interface.
+ * This ensures that this {@code equals} method works properly for obj parameters which are
+ * different implementations of the {@code TabularData} interface.
*
- * @param obj the object to be compared for equality with this TabularDataSupport
instance;
+ * @param obj the object to be compared for equality with this {@code TabularDataSupport} instance;
*
- * @return true
if the specified object is equal to this TabularDataSupport
instance.
+ * @return {@code true} if the specified object is equal to this {@code TabularDataSupport} instance.
*/
public boolean equals(Object obj) {
@@ -738,22 +745,22 @@
}
/**
- * Returns the hash code value for this TabularDataSupport
instance.
+ * Returns the hash code value for this {@code TabularDataSupport} instance.
* TabularDataSupport
instance is the sum of the hash codes
- * of all elements of information used in equals
comparisons
+ * The hash code of a {@code TabularDataSupport} instance is the sum of the hash codes
+ * of all elements of information used in {@code equals} comparisons
* (ie: its tabular type and its content, where the content is defined as all the CompositeData values).
* t1.equals(t2)
implies that t1.hashCode()==t2.hashCode()
- * for any two TabularDataSupport
instances t1
and t2
,
+ * This ensures that {@code t1.equals(t2)} implies that {@code t1.hashCode()==t2.hashCode()}
+ * for any two {@code TabularDataSupport} instances {@code t1} and {@code t2},
* as required by the general contract of the method
* {@link Object#hashCode() Object.hashCode()}.
* TabularData
interface
- * may be equal to this TabularDataSupport
instance as defined by {@link #equals},
+ * However, note that another instance of a class implementing the {@code TabularData} interface
+ * may be equal to this {@code TabularDataSupport} instance as defined by {@link #equals},
* but may have a different hash code if it is calculated differently.
*
- * @return the hash code value for this TabularDataSupport
instance
+ * @return the hash code value for this {@code TabularDataSupport} instance
*/
public int hashCode() {
@@ -768,14 +775,15 @@
}
/**
- * Returns a string representation of this TabularDataSupport
instance.
+ * Returns a string representation of this {@code TabularDataSupport} instance.
* javax.management.openmbean.TabularDataSupport
),
+ * The string representation consists of the name of this class
+ * (ie {@code javax.management.openmbean.TabularDataSupport}),
* the string representation of the tabular type of this instance, and the string representation of the contents
* (ie list the key=value mappings as returned by a call to
- * dataMap.{@link java.util.HashMap#toString() toString()}).
+ * {@code dataMap.}{@link java.util.HashMap#toString() toString()}).
*
- * @return a string representation of this TabularDataSupport
instance
+ * @return a string representation of this {@code TabularDataSupport} instance
*/
public String toString() {
@@ -796,14 +804,17 @@
/**
- * Returns the index for value, assuming value is valid for this TabularData instance
+ * Returns the index for value, assuming value is valid for this {@code TabularData} instance
* (ie value is not null, and its composite type is equal to row type).
*
- * The index is a List, and not an array, so that an index.equals(otherIndex) call will actually compare contents,
+ * The index is a List, and not an array, so that an
+ * index.equals(otherIndex) call will actually compare contents,
* not just the objects references as is done for an array object.
*
- * The returned List is unmodifiable so that once a row has been put into the dataMap, its index cannot be modified,
- * for example by a user that would attempt to modify an index contained in the Set returned by keySet().
+ * The returned List is unmodifiable so that once a row has been put
+ * into the dataMap, its index cannot be modified,
+ * for example by a user that would attempt to modify an
+ * index contained in the Set returned by keySet().
*/
private List> internalCalculateIndex(CompositeData value) {
@@ -811,7 +822,7 @@
}
/**
- * Checks if the specified key is valid for this TabularData instance.
+ * Checks if the specified key is valid for this {@code TabularData} instance.
*
* @throws NullPointerException
* @throws InvalidOpenTypeException
@@ -848,7 +859,7 @@
}
/**
- * Checks the specified value's type is valid for this TabularData instance
+ * Checks the specified value's type is valid for this {@code TabularData} instance
* (ie value is not null, and its composite type is equal to row type).
*
* @throws NullPointerException
@@ -872,7 +883,7 @@
}
/**
- * Checks if the specified value can be put (ie added) in this TabularData instance
+ * Checks if the specified value can be put (ie added) in this {@code TabularData} instance
* (ie value is not null, its composite type is equal to row type, and its index is not already used),
* and returns the index calculated for this value.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/relation/RoleInfo.java
--- a/jdk/src/java.management/share/classes/javax/management/relation/RoleInfo.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/relation/RoleInfo.java Wed Jul 05 20:44:51 2017 +0200
@@ -42,7 +42,7 @@
/**
* A RoleInfo object summarises a role in a relation type.
*
- * 2504952983494636987L
.
+ * true
if role is readable
- * @serialField isWritable boolean Write access mode: true
if role is writable
+ * @serialField isReadable boolean Read access mode: {@code true} if role is readable
+ * @serialField isWritable boolean Write access mode: {@code true} if role is writable
* @serialField description String Role description
* @serialField minDegree int Minimum degree (i.e. minimum number of referenced MBeans in corresponding role)
* @serialField maxDegree int Maximum degree (i.e. maximum number of referenced MBeans in corresponding role)
@@ -136,12 +136,12 @@
private String name = null;
/**
- * @serial Read access mode: true
if role is readable
+ * @serial Read access mode: {@code true} if role is readable
*/
private boolean isReadable;
/**
- * @serial Write access mode: true
if role is writable
+ * @serial Write access mode: {@code true} if role is writable
*/
private boolean isWritable;
@@ -183,11 +183,11 @@
* can be set
* @param min minimum degree for role, i.e. minimum number of
* MBeans to provide in corresponding role
- * Must be less than or equal to max.
+ * Must be less than or equal to {@code max}.
* (ROLE_CARDINALITY_INFINITY for unlimited)
* @param max maximum degree for role, i.e. maximum number of
* MBeans to provide in corresponding role
- * Must be greater than or equal to min
+ * Must be greater than or equal to {@code min}
* (ROLE_CARDINALITY_INFINITY for unlimited)
* @param descr description of the role (can be null)
*
@@ -316,7 +316,7 @@
/**
* Copy constructor.
*
- * @param roleInfo the RoleInfo instance to be copied.
+ * @param roleInfo the {@code RoleInfo} instance to be copied.
*
* @exception IllegalArgumentException if null parameter
*/
@@ -413,7 +413,7 @@
}
/**
- * Returns true if the value parameter is greater than or equal to
+ * Returns true if the {@code value} parameter is greater than or equal to
* the expected minimum degree, false otherwise.
*
* @param value the value to be checked
@@ -431,7 +431,7 @@
}
/**
- * Returns true if the value parameter is lower than or equal to
+ * Returns true if the {@code value} parameter is lower than or equal to
* the expected maximum degree, false otherwise.
*
* @param value the value to be checked
diff -r 51926b23f437 -r 620051149184 jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java
--- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java Wed Jul 05 20:44:51 2017 +0200
@@ -142,7 +142,7 @@
}
/**
- * RMIConnector
that will connect
+ * []
are not part of the
+ * url
+ * @exception IllegalArgumentException if {@code url}
* is null.
*/
public RMIConnector(JMXServiceURL url, MapRMIConnector
using the given RMI stub.
+ * rmiServer
+ * @exception IllegalArgumentException if {@code rmiServer}
* is null.
*/
public RMIConnector(RMIServer rmiServer, MaptoString
method returns a string that
+ * the {@code toString} method returns a string that
* "textually represents" this object. The result should be a
* concise but informative representation that is easy for a
* person to read.s.defaultReadObject()
and then initializes
+ * Calls {@code s.defaultReadObject()} and then initializes
* all transient variables that need initializing.
* @param s The ObjectInputStream to read from.
* @exception InvalidObjectException if none of rmiServer stub
@@ -1818,7 +1818,7 @@
* before serializing it. This is done using the environment
* map that was provided to the constructor, if any, and as documented
* in {@link javax.management.remote.rmi}.s.defaultWriteObject()
.
+ *
*
* @param env the environment Map passed to the connector.
* @param isIiop true if the stub is expected to be an IIOP stub.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java
--- a/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/com/sun/naming/internal/ResourceManager.java Wed Jul 05 20:44:51 2017 +0200
@@ -137,7 +137,7 @@
* context (never null). This is based on the environment
* parameter, the system properties, and all application resource files.
*
- * listBindings()
method)
* @param className The possibly null class name of the object
- * bound to name. If null, the class name of obj is
- * returned by getClassName(). If obj is also
- * null, getClassName() will return null.
+ * bound to {@code name}. If null, the class name of {@code obj} is
+ * returned by {@code getClassName()}. If {@code obj} is also
+ * null, {@code getClassName()} will return null.
* @param obj The possibly null object bound to name.
* @see NameClassPair#setClassName
*/
@@ -121,9 +121,9 @@
*
* @param name The non-null string name of the object.
* @param className The possibly null class name of the object
- * bound to name. If null, the class name of obj is
- * returned by getClassName(). If obj is also
- * null, getClassName() will return null.
+ * bound to {@code name}. If null, the class name of {@code obj} is
+ * returned by {@code getClassName()}. If {@code obj} is also
+ * null, {@code getClassName()} will return null.
* @param obj The possibly null object bound to name.
* @param isRelative true if name
is a name relative
* to the target context (which is named by
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/CannotProceedException.java
--- a/jdk/src/java.naming/share/classes/javax/naming/CannotProceedException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/CannotProceedException.java Wed Jul 05 20:44:51 2017 +0200
@@ -93,9 +93,9 @@
/**
* Contains the name of the resolved object, relative
- * to the context altNameCtx
. It is a composite name.
+ * to the context {@code altNameCtx}. It is a composite name.
* If null, then no name is specified.
- * See the javax.naming.spi.ObjectFactory.getObjectInstance
+ * See the {@code javax.naming.spi.ObjectFactory.getObjectInstance}
* method for details on how this is used.
* altName
is specified. If null, then the default initial
+ * {@code altName} is specified. If null, then the default initial
* context is implied.
- * See the javax.naming.spi.ObjectFactory.getObjectInstance
+ * See the {@code javax.naming.spi.ObjectFactory.getObjectInstance}
* method for details on how this is used.
* getRemainingNewName()
.
+ * This is the value returned by {@code getRemainingNewName()}.
*newName
is made and stored.
- * Subsequent changes to name
does not
+ * A copy of {@code newName} is made and stored.
+ * Subsequent changes to {@code name} does not
* affect the copy in this NamingException and vice versa.
*
* @param newName The possibly null name to set the "remaining new name" to.
@@ -214,13 +214,13 @@
}
/**
- * Retrieves the altName
field of this exception.
+ * Retrieves the {@code altName} field of this exception.
* This is the name of the resolved object, relative to the context
- * altNameCtx
. It will be used during a subsequent call to the
- * javax.naming.spi.ObjectFactory.getObjectInstance
method.
+ * {@code altNameCtx}. It will be used during a subsequent call to the
+ * {@code javax.naming.spi.ObjectFactory.getObjectInstance} method.
*
* @return The name of the resolved object, relative to
- * altNameCtx
.
+ * {@code altNameCtx}.
* It is a composite name. If null, then no name is specified.
*
* @see #setAltName
@@ -232,10 +232,10 @@
}
/**
- * Sets the altName
field of this exception.
+ * Sets the {@code altName} field of this exception.
*
* @param altName The name of the resolved object, relative to
- * altNameCtx
.
+ * {@code altNameCtx}.
* It is a composite name.
* If null, then no name is specified.
*
@@ -247,12 +247,12 @@
}
/**
- * Retrieves the altNameCtx
field of this exception.
- * This is the context relative to which altName
is named.
+ * Retrieves the {@code altNameCtx} field of this exception.
+ * This is the context relative to which {@code altName} is named.
* It will be used during a subsequent call to the
- * javax.naming.spi.ObjectFactory.getObjectInstance
method.
+ * {@code javax.naming.spi.ObjectFactory.getObjectInstance} method.
*
- * @return The context relative to which altName
is named.
+ * @return The context relative to which {@code altName} is named.
* If null, then the default initial context is implied.
*
* @see #setAltNameCtx
@@ -264,10 +264,10 @@
}
/**
- * Sets the altNameCtx
field of this exception.
+ * Sets the {@code altNameCtx} field of this exception.
*
* @param altNameCtx
- * The context relative to which altName
+ * The context relative to which {@code altName}
* is named. If null, then the default initial context
* is implied.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/CompositeName.java
--- a/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/CompositeName.java Wed Jul 05 20:44:51 2017 +0200
@@ -76,7 +76,7 @@
*Composite Name Examples
*This table shows examples of some composite names. Each row shows
*the string form of a composite name and its corresponding structural form
- *(CompositeName).
+ *({@code CompositeName}).
*
@@ -140,7 +140,7 @@
*
*
*Composition Examples
* Here are some composition examples. The right column shows composing
* string composite names while the left column shows composing the
- * corresponding CompositeNames. Notice that composing the
+ * corresponding {@code CompositeName}s. Notice that composing the
* string forms of two composite names simply involves concatenating
* their string forms together.
@@ -190,9 +190,9 @@
Multithreaded Access
- * A CompositeName instance is not synchronized against concurrent
+ * A {@code CompositeName} instance is not synchronized against concurrent
* multithreaded access. Multiple threads trying to access and modify a
- * CompositeName should lock the object.
+ * {@code CompositeName} should lock the object.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -557,8 +557,8 @@
/**
* Overridden to avoid implementation dependency.
- * @serialData The number of components (an int) followed by
- * the individual components (each a String).
+ * @serialData The number of components (an {@code int}) followed by
+ * the individual components (each a {@code String}).
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/CompoundName.java
--- a/jdk/src/java.naming/share/classes/javax/naming/CompoundName.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/CompoundName.java Wed Jul 05 20:44:51 2017 +0200
@@ -137,9 +137,9 @@
* of the original compound name.
*
*Multithreaded Access
- * A CompoundName instance is not synchronized against concurrent
+ * A {@code CompoundName} instance is not synchronized against concurrent
* multithreaded access. Multiple threads trying to access and modify a
- * CompoundName should lock the object.
+ * {@code CompoundName} should lock the object.
*
* @author Rosanna Lee
* @author Scott Seligman
@@ -194,7 +194,7 @@
* this compound name. See class description for
* contents of properties.
* @exception InvalidNameException If 'n' violates the syntax specified
- * by syntax
.
+ * by {@code syntax}.
*/
public CompoundName(String n, Properties syntax) throws InvalidNameException {
if (syntax == null) {
@@ -549,9 +549,9 @@
/**
* Overridden to avoid implementation dependency.
- * @serialData The syntax Properties, followed by
- * the number of components (an int), and the individual
- * components (each a String).
+ * @serialData The syntax {@code Properties}, followed by
+ * the number of components (an {@code int}), and the individual
+ * components (each a {@code String}).
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/Context.java
--- a/jdk/src/java.naming/share/classes/javax/naming/Context.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/Context.java Wed Jul 05 20:44:51 2017 +0200
@@ -33,7 +33,7 @@
* It contains methods for examining and updating these bindings.
*
* Names
- * Each name passed as an argument to a Context method is relative
+ * Each name passed as an argument to a {@code Context} method is relative
* to that context. The empty name is used to name the context itself.
* A name parameter may never be null.
* Exceptions
- * All the methods in this interface can throw a NamingException or
- * any of its subclasses. See NamingException and their subclasses
+ * All the methods in this interface can throw a {@code NamingException} or
+ * any of its subclasses. See {@code NamingException} and their subclasses
* for details on each exception.
*
*Concurrent Access
@@ -80,26 +80,26 @@
* a single Context instance concurrently should synchronize amongst
* themselves and provide the necessary locking. Multiple threads
* each manipulating a different Context instance need not
- * synchronize. Note that the {@link #lookup(Name) lookup}
+ * synchronize. Note that the {@link #lookup(Name) lookup}
* method, when passed an empty name, will return a new Context instance
* representing the same naming context.
*Parameters
- * A Name parameter passed to any method of the
- * Context interface or one of its subinterfaces
+ * A {@code Name} parameter passed to any method of the
+ * {@code Context} interface or one of its subinterfaces
* will not be modified by the service provider.
* The service provider may keep a reference to it
* for the duration of the operation, including any enumeration of the
* method's results and the processing of any referrals generated.
* The caller should not modify the object during this time.
- * A Name returned by any such method is owned by the caller.
+ * A {@code Name} returned by any such method is owned by the caller.
* The caller may subsequently modify it; the service provider may not.
*
*
@@ -111,7 +111,7 @@
* require specification of security credentials in order to access
* the service. Another context might require that server configuration
* information be supplied. These are referred to as the environment
- * of a context. The Context interface provides methods for
+ * of a context. The {@code Context} interface provides methods for
* retrieving and updating this environment.
*
- * [prefix/]jndiprovider.properties
+ * [prefix/]{@code jndiprovider.properties}
*
* where prefix is
* the package name of the provider's context implementation(s),
* with each period (".") converted to a slash ("/").
*
* For example, suppose a service provider defines a context
- * implementation with class name com.sun.jndi.ldap.LdapCtx.
+ * implementation with class name {@code com.sun.jndi.ldap.LdapCtx}.
* The provider resource for this provider is named
- * com/sun/jndi/ldap/jndiprovider.properties. If the class is
+ * {@code com/sun/jndi/ldap/jndiprovider.properties}. If the class is
* not in a package, the resource's name is simply
- * jndiprovider.properties.
+ * {@code jndiprovider.properties}.
*
*
*
* For each property found in both of these two sources,
@@ -278,14 +278,14 @@
/**
* Retrieves the named object.
- * If name is empty, returns a new instance of this context
+ * If {@code name} is empty, returns a new instance of this context
* (which represents the same naming context as this context, but its
* environment may be modified independently and it may be accessed
* concurrently).
*
* @param name
* the name of the object to look up
- * @return the object bound to name
+ * @return the object bound to {@code name}
* @throws NamingException if a naming exception is encountered
*
* @see #lookup(String)
@@ -298,7 +298,7 @@
* See {@link #lookup(Name)} for details.
* @param name
* the name of the object to look up
- * @return the object bound to name
+ * @return the object bound to {@code name}
* @throws NamingException if a naming exception is encountered
*/
public Object lookup(String name) throws NamingException;
@@ -344,7 +344,7 @@
* All intermediate contexts and the target context (that named by all
* but terminal atomic component of the name) must already exist.
*
- * name
is made and stored.
- * Subsequent changes to name
do not
+ * A copy of {@code name} is made and stored.
+ * Subsequent changes to {@code name} do not
* affect the copy in this NamingException and vice versa.
*
* @param name The possibly null name to set resolved name to.
@@ -218,14 +218,14 @@
/**
* Sets the remaining name field of this exception.
*name
is made and stored.
- * Subsequent changes to name
do not
+ * A copy of {@code name} is made and stored.
+ * Subsequent changes to {@code name} do not
* affect the copy in this NamingException and vice versa.
* @param name The possibly null name to set remaining name to.
* If null, it sets the remaining name field to null.
@@ -275,11 +275,11 @@
* Add components from 'name' as the last components in
* remaining name.
*name
do not
+ * Subsequent changes to {@code name} do not
* affect the remaining name field in this NamingException and vice versa.
* @param name The possibly null name containing ordered components to add.
* If name is null, this method does not do anything.
@@ -326,7 +326,7 @@
/**
* Records the root cause of this NamingException.
- * If e is this, this method does not do anything.
+ * If {@code e} is {@code this}, this method does not do anything.
*null
if the cause is nonexistent or
+ * Returns {@code null} if the cause is nonexistent or
* unknown.
*
- * @return the cause of this exception, or null
if the
+ * @return the cause of this exception, or {@code null} if the
* cause is nonexistent or unknown.
* @see #initCause(Throwable)
* @since 1.4
@@ -368,10 +368,10 @@
* This method may be called at most once.
*
* @param cause the cause, which is saved for later retrieval by
- * the {@link #getCause()} method. A null value
+ * the {@link #getCause()} method. A {@code null} value
* indicates that the cause is nonexistent or unknown.
- * @return a reference to this NamingException
instance.
- * @throws IllegalArgumentException if cause
is this
+ * @return a reference to this {@code NamingException} instance.
+ * @throws IllegalArgumentException if {@code cause} is this
* exception. (A throwable cannot be its own cause.)
* @throws IllegalStateException if this method has already
* been called on this exception.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/Reference.java
--- a/jdk/src/java.naming/share/classes/javax/naming/Reference.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/Reference.java Wed Jul 05 20:44:51 2017 +0200
@@ -250,7 +250,7 @@
* its effects on this enumeration are undefined.
*
* @return An non-null enumeration of the addresses
- * (RefAddr) in this reference.
+ * ({@code RefAddr}) in this reference.
* If this reference has zero addresses, an enumeration with
* zero elements is returned.
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ReferralException.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ReferralException.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ReferralException.java Wed Jul 05 20:44:51 2017 +0200
@@ -33,12 +33,12 @@
* such as that returned by LDAP v3 servers.
* {@code
+ * The following code sample shows how {@code ReferralException} can be used.
+ *
*
+ * }{@code
* while (true) {
* try {
* bindings = ctx.listBindings(name);
@@ -51,12 +51,12 @@
* ctx = e.getReferralContext();
* }
* }
- * }
getReferralContext
to allow the processing of
+ * {@code getReferralContext} to allow the processing of
* other referrals to continue.
* The following code fragment shows a typical usage pattern.
*
* It specifies first the critical controls for creating the initial context
- * (critConnCtls), and then sets the context's request controls
- * (critModCtls) for the context operation. If for some reason
- * lctx needs to reconnect to the server, it will use
- * critConnCtls. See the LdapContext interface for
+ * ({@code critConnCtls}), and then sets the context's request controls
+ * ({@code critModCtls}) for the context operation. If for some reason
+ * {@code lctx} needs to reconnect to the server, it will use
+ * {@code critConnCtls}. See the {@code LdapContext} interface for
* more discussion about request controls.
*
@@ -174,7 +174,7 @@
/**
* Retries the referral currently being processed.
* A call to this method should be followed by a call to
- *
getReferralContext
to allow the current
+ * {@code getReferralContext} to allow the current
* referral to be retried.
* The following code fragment shows a typical usage pattern.
*
* When an object named "x/y" is subsequently deleted, the corresponding
- * NamingEvent (evt) must contain:
+ * {@code NamingEvent} ({@code evt}) must contain:
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/Attribute.java
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/Attribute.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/Attribute.java Wed Jul 05 20:44:51 2017 +0200
@@ -37,34 +37,34 @@
* This interface represents an attribute associated with a named object.
*
Names
- * Each name passed as an argument to a DirContext method is relative
+ * Each name passed as an argument to a {@code DirContext} method is relative
* to that context. The empty name is used to name the context itself.
* The name parameter may never be null.
* Attribute Models
* There are two basic models of what attributes should be
@@ -82,7 +82,7 @@
* within the parent object and associated with the object's name.
*
* Attribute Type Names
- * In the getAttributes() and search() methods,
+ * In the {@code getAttributes()} and {@code search()} methods,
* you can supply the attributes to return by supplying a list of
* attribute names (strings).
* The attributes that you get back might not have the same names as the
@@ -120,9 +120,9 @@
* purposes. An example of operational attributes is the access control
* list for an object.
* Parameters
*InvalidAttributeValueException
.
* InvalidAttributeValueException
.
* search
* method that takes a filter argument.
* attributesToReturn
* and the name of the corresponding object, named relative
* to the context named by name
.
@@ -709,7 +709,7 @@
* the attributes to search for
* @param attributesToReturn
* the attributes to return
- * @return a non-null enumeration of SearchResult objects
+ * @return a non-null enumeration of {@code SearchResult} objects
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumerationsearch(Name, Attributes, String[])
.
*
* See {@link #search(Name, Attributes, String[])} for a full description.
@@ -732,7 +732,7 @@
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
- * @return an enumeration of SearchResult objects
+ * @return an enumeration of {@code SearchResult} objects
* @throws NamingException if a naming exception is encountered
*
* @see #search(Name, Attributes, String[])
@@ -750,7 +750,7 @@
* the name of the context to search
* @param matchingAttributes
* the attributes to search for
- * @return an enumeration of SearchResult objects
+ * @return an enumeration of {@code SearchResult} objects
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumerationInvalidSearchFilterException
is thrown.
* name
parameter), or
@@ -817,8 +817,8 @@
* cons
specifies a search scope of
* SearchControls.OBJECT_SCOPE
or
* SearchControls.SUBSTREE_SCOPE
), its name is the empty
- * string. The SearchResult may also contain attributes of the
- * matching object if the cons argument specified that attributes
+ * string. The {@code SearchResult} may also contain attributes of the
+ * matching object if the {@code cons} argument specified that attributes
* be returned.
*SearchControls.SUBSTREE_SCOPE
),
* its name is the empty string.
*{i}
expressions where i
is outside
* the bounds of the array filterArgs
- * @throws InvalidSearchControlsException if cons contains
+ * @throws InvalidSearchControlsException if {@code cons} contains
* invalid settings
- * @throws InvalidSearchFilterException if filterExpr with
- * filterArgs represents an invalid search filter
+ * @throws InvalidSearchFilterException if {@code filterExpr} with
+ * {@code filterArgs} represents an invalid search filter
* @throws NamingException if a naming exception is encountered
*
* @see #search(Name, Attributes, String[])
@@ -1017,17 +1017,17 @@
* @param cons
* the search controls that control the search. If null,
* the default search controls are used (equivalent
- * to (new SearchControls())).
- * @return an enumeration of SearchResults of the objects
+ * to {@code (new SearchControls())}).
+ * @return an enumeration of {@code SearchResult}s of the objects
* that satisfy the filter; never null
*
- * @throws ArrayIndexOutOfBoundsException if filterExpr contains
+ * @throws ArrayIndexOutOfBoundsException if {@code filterExpr} contains
* {i}
expressions where i
is outside
* the bounds of the array filterArgs
- * @throws InvalidSearchControlsException if cons contains
+ * @throws InvalidSearchControlsException if {@code cons} contains
* invalid settings
- * @throws InvalidSearchFilterException if filterExpr with
- * filterArgs represents an invalid search filter
+ * @throws InvalidSearchFilterException if {@code filterExpr} with
+ * {@code filterArgs} represents an invalid search filter
* @throws NamingException if a naming exception is encountered
*/
public NamingEnumerationsearch()
method)
*
* @param className The possibly null class name of the object
- * bound to name. If null, the class name of obj is
- * returned by getClassName(). If obj is also null,
- * getClassName() will return null.
+ * bound to {@code name}. If null, the class name of {@code obj} is
+ * returned by {@code getClassName()}. If {@code obj} is also null,
+ * {@code getClassName()} will return null.
* @param obj The object bound to name. Can be null.
* @param attrs The attributes that were requested to be returned with
* this search item. Cannot be null.
@@ -127,9 +127,9 @@
*
* @param name The non-null name of the search item.
* @param className The possibly null class name of the object
- * bound to name. If null, the class name of obj is
- * returned by getClassName(). If obj is also null,
- * getClassName() will return null.
+ * bound to {@code name}. If null, the class name of {@code obj} is
+ * returned by {@code getClassName()}. If {@code obj} is also null,
+ * {@code getClassName()} will return null.
* @param obj The object bound to name. Can be null.
* @param attrs The attributes that were requested to be returned with
* this search item. Cannot be null.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/directory/package.html
--- a/jdk/src/java.naming/share/classes/javax/naming/directory/package.html Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/directory/package.html Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
javax.naming
package to provide functionality
for accessing directory services.
The Directory Context
-The DirContext
+The DirContext
interface represents a directory context.
It defines methods for examining and updating attributes associated with a
directory object, or directory entry as it is sometimes
called.
getAttributes()
to retrieve the attributes
associated with a directory object (for which you supply the name).
-Attributes are modified using modifyAttributes().
+Attributes are modified using modifyAttributes()
.
You can add, replace, or remove attributes and/or attribute values
using this operation.
DirContext
also behaves as a naming context
+by extending the Context
interface in the javax.naming
package.
This means that any directory object can also provide
a naming context.
For example, the directory object for a person might contain
@@ -69,13 +69,13 @@
such as his printers and home directory.
Searches
-DirContext contains methods for
+DirContext
contains methods for
performing content-based searching of the directory.
In the simplest and most common form of usage, the application
-specifies a set of attributes--possibly with specific
-values--to match, and submits this attribute set, to the
-search() method.
-There are other overloaded forms of search()
+specifies a set of attributes--possibly with specific
+values--to match, and submits this attribute set, to the
+search()
method.
+There are other overloaded forms of search()
that support more sophisticated search filters.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/event/EventContext.java
--- a/jdk/src/java.naming/share/classes/javax/naming/event/EventContext.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/event/EventContext.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,7 +35,7 @@
* events fired when objects named in a context changes.
*
*Target
- * The name parameter in the addNamingListener() methods is referred
+ * The name parameter in the {@code addNamingListener()} methods is referred
* to as the target. The target, along with the scope, identify
* the object(s) that the listener is interested in.
* It is possible to register interest in a target that does not exist, but
@@ -44,23 +44,23 @@
*Event Source
- * The EventContext instance on which you invoke the
+ * The {@code EventContext} instance on which you invoke the
* registration methods is the event source of the events that are
* (potentially) generated.
* The source is not necessarily the object named by the target.
@@ -69,7 +69,7 @@
* In other words, the target,
* along with the scope parameter, are used to identify
* the object(s) that the listener is interested in, but the event source
- * is the EventContext instance with which the listener
+ * is the {@code EventContext} instance with which the listener
* has registered.
*
*
* evt.getEventContext() == src
* evt.getOldBinding().getName().equals("x/y")
*
Lifetime of Registration
* A registered listener becomes deregistered when:
*
- *
- * Until that point, a EventContext instance that has outstanding
+ * Until that point, a {@code EventContext} instance that has outstanding
* listeners will continue to exist and be maintained by the service provider.
*
*Listener Implementations
* The registration/deregistration methods accept an instance of
- * NamingListener. There are subinterfaces of NamingListener
- * for different of event types of NamingEvent.
- * For example, the ObjectChangeListener
- * interface is for the NamingEvent.OBJECT_CHANGED event type.
+ * {@code NamingListener}. There are subinterfaces of {@code NamingListener}
+ * for different of event types of {@code NamingEvent}.
+ * For example, the {@code ObjectChangeListener}
+ * interface is for the {@code NamingEvent.OBJECT_CHANGED} event type.
* To register interest in multiple event types, the listener implementation
- * should implement multiple NamingListener subinterfaces and use a
- * single invocation of addNamingListener().
+ * should implement multiple {@code NamingListener} subinterfaces and use a
+ * single invocation of {@code addNamingListener()}.
* In addition to reducing the number of method calls and possibly the code size
* of the listeners, this allows some service providers to optimize the
* registration.
*
*Threading Issues
*
- * Like Context instances in general, instances of
- * EventContext are not guaranteed to be thread-safe.
+ * Like {@code Context} instances in general, instances of
+ * {@code EventContext} are not guaranteed to be thread-safe.
* Care must be taken when multiple threads are accessing the same
- * EventContext concurrently.
+ * {@code EventContext} concurrently.
* See the
* package description
* for more information on threading issues.
@@ -138,7 +138,7 @@
* Constant for expressing interest in events concerning the object named
* by the target.
*
*
- * A listener that wants to be notified of OBJECT_CHANGED event types
- * should also implement the ObjectChangeListener
+ * A listener that wants to be notified of {@code OBJECT_CHANGED} event types
+ * should also implement the {@code ObjectChangeListener}
* interface.
*
* @author Rosanna Lee
@@ -60,7 +60,7 @@
* Called when an object has been added.
*
- *
*
* When an object named "x/y" is subsequently deleted, the corresponding
- * NamingEvent (evt) must contain:
+ * {@code NamingEvent} ({@code evt}) must contain:
*
* NamespaceChangeListener listener = ...;
* src.addNamingListener("x", SUBTREE_SCOPE, listener);
*
*
* Care must be taken when multiple threads are accessing the same
- * EventContext concurrently.
+ * {@code EventContext} concurrently.
* See the
* package description
* for more information on threading issues.
@@ -73,13 +73,13 @@
public class NamingEvent extends java.util.EventObject {
/**
* Naming event type for indicating that a new object has been added.
- * The value of this constant is 0.
+ * The value of this constant is {@code 0}.
*/
public static final int OBJECT_ADDED = 0;
/**
* Naming event type for indicating that an object has been removed.
- * The value of this constant is 1.
+ * The value of this constant is {@code 1}.
*/
public static final int OBJECT_REMOVED = 1;
@@ -90,7 +90,7 @@
* be implemented by adding a binding with the new name and removing
* the old binding.
*
* evt.getEventContext() == src
* evt.getOldBinding().getName().equals("x/y")
*
*
- *
* A listener that wants to be notified of namespace change events
- * should also implement the NamespaceChangeListener
+ * should also implement the {@code NamespaceChangeListener}
* interface.
*
* @author Rosanna Lee
@@ -64,8 +64,8 @@
* Called when an object has been changed.
*Naming Events
NamingEvent
class to represent an event
that is generated by a naming/directory service.
-It also defines subinterfaces of Context and DirContext,
-called EventContext and EventDirContext,
+It also defines subinterfaces of Context
and DirContext
,
+called EventContext
and EventDirContext
,
through which applications can register their interest in events
fired by the context.
NamingEvent
represents an event that occurs in a
naming or directory service. There are two categories of naming events:
Each category of events is handled by a corresponding listener:
-NamespaceChangeListener, ObjectChangeListener.
+NamespaceChangeListener
, ObjectChangeListener
.
Threading Issues
When an event is dispatched to a listener, the listener method (such
-as objectChanged()) may be executed in a thread other than the
-one in which the call to addNamingListener() was executed.
+as objectChanged()
) may be executed in a thread other than the
+one in which the call to addNamingListener()
was executed.
The choice of which thread to use is made by the service provider.
When an event is dispatched to multiple listeners, the service provider
may choose (and is generally encouraged) to execute the listener methods
concurrently in separate threads.
NamingEvent.getEventContext()
,
it must take into account the possibility that other threads will be
working with that context concurrently. Likewise, when a listener is
-registered via addNamingListener(), the registering thread
+registered via addNamingListener()
, the registering thread
must take into account the likely possibility that the service provider
-will later invoke the listeners in newly-created threads. As Context
+will later invoke the listeners in newly-created threads. As Context
instances are not guaranteed to be thread-safe in general, all context
operations must be synchronized as needed.
@@ -107,9 +107,9 @@
on the server that will eventually be translated into events.
If an exception occurs that prevents information about the events from
being collected, the listener will never be notified of the events.
-When such an exception occurs, a NamingExceptionEvent is
+When such an exception occurs, a NamingExceptionEvent
is
fired to notify the listener. The listener's
-namingExceptionThrown() method is invoked, as shown in the
+namingExceptionThrown()
method is invoked, as shown in the
sample code above,
and the listener is automatically deregistered.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/BasicControl.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/BasicControl.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/BasicControl.java Wed Jul 05 20:44:51 2017 +0200
@@ -26,7 +26,7 @@
package javax.naming.ldap;
/**
- * This class provides a basic implementation of the Control
+ * This class provides a basic implementation of the {@code Control}
* interface. It represents an LDAPv3 Control as defined in
* RFC 2251.
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/Control.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/Control.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/Control.java Wed Jul 05 20:44:51 2017 +0200
@@ -52,13 +52,13 @@
public interface Control extends java.io.Serializable {
/**
* Indicates a critical control.
- * The value of this constant is true.
+ * The value of this constant is {@code true}.
*/
public static final boolean CRITICAL = true;
/**
* Indicates a non-critical control.
- * The value of this constant is false.
+ * The value of this constant is {@code false}.
*/
public static final boolean NONCRITICAL = false;
@@ -75,7 +75,7 @@
* In other words, if the server receives a critical control
* that it does not support, regardless of whether the control
* makes sense for the operation, the operation will not be performed
- * and an OperationNotSupportedException will be thrown.
+ * and an {@code OperationNotSupportedException} will be thrown.
* @return true if this control is critical; false otherwise.
*/
public boolean isCritical();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/ControlFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -65,7 +65,7 @@
* Without this mechanism, the provider would be returning
* controls that only contained data in BER encoded format.
*
*
@@ -119,9 +119,9 @@
* @param ctx The possibly null context in which the control is being created.
* If null, no such information is available.
* @param env The possibly null environment of the context. This is used
- * to find the value of the LdapContext.CONTROL_FACTORIES property.
- * @return A control object created using ctl
.
+ * return {@code ctl}.
* If an exception is encountered while creating the control, the
* exception is passed up to the caller.
*ctl
; or
- * ctl
if a control object cannot be created using
+ * to find the value of the {@code LdapContext.CONTROL_FACTORIES} property.
+ * @return A control object created using {@code ctl}; or
+ * {@code ctl} if a control object cannot be created using
* the algorithm described above.
* @exception NamingException if a naming exception was encountered
* while attempting to create the control object.
@@ -129,7 +129,7 @@
* exception, it is propagated up to the caller.
* If an error was encountered while loading
* and instantiating the factory and object classes, the exception
- * is wrapped inside a NamingException and then rethrown.
+ * is wrapped inside a {@code NamingException} and then rethrown.
*/
public static Control getControlInstance(Control ctl, Context ctx,
Hashtable,?> env)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/ExtendedRequest.java Wed Jul 05 20:44:51 2017 +0200
@@ -43,7 +43,7 @@
* the classes that implement this interface, supplying them with
* any information required for a particular extended operation request.
* It would then pass such a class as an argument to the
- * LdapContext.extendedOperation() method for performing the
+ * {@code LdapContext.extendedOperation()} method for performing the
* LDAPv3 extended operation.
*Request Controls
- * When you create an initial context (InitialLdapContext),
+ * When you create an initial context ({@code InitialLdapContext}),
* you can specify a list of request controls.
* These controls will be used as the request controls for any
* implicit LDAP "bind" operation performed by the context or contexts
* derived from the context. These are called connection request controls.
- * Use getConnectControls() to get a context's connection request
+ * Use {@code getConnectControls()} to get a context's connection request
* controls.
*Usage Details About Controls
@@ -44,7 +44,7 @@
* At a high level, this support allows a user
* program to set request controls for LDAP operations that are executed
* in the course of the user program's invocation of
- * Context/DirContext
+ * {@code Context}/{@code DirContext}
* methods, and read response controls resulting from LDAP operations.
* At the implementation level, there are some details that developers of
* both the user program and service providers need to understand in order
@@ -78,60 +78,60 @@
* Context Request Controls
* There are two ways in which a context instance gets its request controls:
*
- *
- * where ldapContext is an instance of LdapContext.
- * Specifying null or an empty array for reqCtls
+ * where {@code ldapContext} is an instance of {@code LdapContext}.
+ * Specifying {@code null} or an empty array for {@code reqCtls}
* means no request controls.
- * newInstance() creates a new instance of a context using
- * reqCtls, while setRequestControls()
- * updates an existing context instance's request controls to reqCtls.
+ * {@code newInstance()} creates a new instance of a context using
+ * {@code reqCtls}, while {@code setRequestControls()}
+ * updates an existing context instance's request controls to {@code reqCtls}.
* ldapContext.newInstance(reqCtls)
+ * ldapContext.setRequestControls(reqCtls)
* Connection Request Controls
* There are three ways in which connection request controls are set:
*
- *
- * where refException is an instance of
- * LdapReferralException, and ldapContext is an
- * instance of LdapContext.
- * Specifying null or an empty array for connCtls
+ * where {@code refException} is an instance of
+ * {@code LdapReferralException}, and {@code ldapContext} is an
+ * instance of {@code LdapContext}.
+ * Specifying {@code null} or an empty array for {@code connCtls}
* means no connection request controls.
*
+ * new InitialLdapContext(env, connCtls)
+ * refException.getReferralContext(env, connCtls)
+ * ldapContext.reconnect(connCtls);
* Service Provider Requirements
*
@@ -145,22 +145,22 @@
*
* Response Controls
*
- * The method LdapContext.getResponseControls() is used to
+ * The method {@code LdapContext.getResponseControls()} is used to
* retrieve the response controls generated by LDAP operations executed
- * as the result of invoking a Context/DirContext
+ * as the result of invoking a {@code Context}/{@code DirContext}
* operation. The result is all of the responses controls generated
* by the underlying LDAP operations, including any implicit reconnection.
* To get only the reconnection response controls,
- * use reconnect() followed by getResponseControls().
+ * use {@code reconnect()} followed by {@code getResponseControls()}.
*
* Parameters
*
- * A Control[] array
+ * A {@code Control[]} array
* passed as a parameter to any method is owned by the caller.
* The service provider will not modify the array or keep a reference to it,
- * although it may keep references to the individual Control objects
+ * although it may keep references to the individual {@code Control} objects
* in the array.
- * A Control[] array returned by any method is immutable, and may
+ * A {@code Control[]} array returned by any method is immutable, and may
* not subsequently be modified by either the caller or the service provider.
*
* @author Rosanna Lee
@@ -207,7 +207,7 @@
* to use for the new context.
* If null, the context is initialized with no request controls.
*
- * @return A non-null LdapContext instance.
+ * @return A non-null {@code LdapContext} instance.
* @exception NamingException If an error occurred while creating
* the new instance.
* @see InitialLdapContext
@@ -224,16 +224,16 @@
* the LDAP "bind" operation, or to explicitly connect to the server
* to get response controls returned by the LDAP "bind" operation.
*LdapName
or returned by it
+ * String names passed to {@code LdapName} or returned by it
* use the full Unicode character set. They may also contain
* characters encoded into UTF-8 with each octet represented by a
* three-character substring such as "\\B4".
@@ -67,7 +67,7 @@
* each octet represented by a single character in the string: the
* meaning would be ambiguous.
*LdapName
will properly parse all valid names, but
+ * {@code LdapName} will properly parse all valid names, but
* does not attempt to detect all possible violations when parsing
* invalid names. It is "generous" in accepting invalid names.
* The "validity" of a name is determined ultimately when it
@@ -92,7 +92,7 @@
* empty LDAP name is represented by an empty RDN list.
*
- * where ctx is the context that threw the ReferralException.
+ * where {@code ctx} is the context that threw the {@code ReferralException.}
*
* getReferralContext(ctx.getEnvironment(), null);
*
* The configuration files and their corresponding implementation classes must
* be accessible to the calling thread's context class loader.
*
* import javax.naming.ldap.*;
@@ -127,16 +127,16 @@
*
+ *
+ * }{@code
* META-INF/services/javax.naming.ldap.StartTlsResponse
- *
@@ -122,7 +122,7 @@
/**
* Overrides the default list of cipher suites enabled for use on the
* TLS connection. The cipher suites must have already been listed by
- * SSLSocketFactory.getSupportedCipherSuites() as being supported.
+ * {@code SSLSocketFactory.getSupportedCipherSuites()} as being supported.
* Even if a suite has been enabled, it still might not be used because
* the peer does not support it, or because the requisite certificates
* (and private keys) are not available.
@@ -134,13 +134,13 @@
public abstract void setEnabledCipherSuites(String[] suites);
/**
- * Sets the hostname verifier used by negotiate()
+ * Sets the hostname verifier used by {@code negotiate()}
* after the TLS handshake has completed and the default hostname
* verification has failed.
- * setHostnameVerifier() must be called before
- * negotiate() is invoked for it to have effect.
+ * {@code setHostnameVerifier()} must be called before
+ * {@code negotiate()} is invoked for it to have effect.
* If called after
- * negotiate(), this method does not do anything.
+ * {@code negotiate()}, this method does not do anything.
*
* @param verifier The non-null hostname verifier callback.
* @see #negotiate
@@ -150,7 +150,7 @@
/**
* Negotiates a TLS session using the default SSL socket factory.
*
*
- * Every Preferences implementation must have an associated {@link
+ * Every {@code Preferences} implementation must have an associated {@link
* PreferencesFactory} implementation. Every Java(TM) SE implementation must provide
- * some means of specifying which PreferencesFactory implementation
+ * some means of specifying which {@code PreferencesFactory} implementation
* is used to generate the root preferences nodes. This allows the
* administrator to replace the default preferences implementation with an
* alternative implementation.
*
- *
*
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/ldap/package.html
--- a/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/ldap/package.html Wed Jul 05 20:44:51 2017 +0200
@@ -44,15 +44,15 @@
This package is for applications and service providers that deal with
LDAPv3 extended operations and controls, as defined by
RFC 2251.
-The core interface in this package is LdapContext, which defines
+The core interface in this package is LdapContext
, which defines
methods on a context for performing extended operations and handling
controls.
Extended Operations
ExtendedRequest
to represent the argument to an extended operation,
-and the interface ExtendedResponse to represent the result
+and the interface ExtendedResponse
to represent the result
of the extended operation.
An extended response is always paired with an extended request
but not necessarily vice versa. That is, you can have an extended request
@@ -73,7 +73,7 @@
GetTimeRequest
and GetTimeResponse
,
so that applications can use this feature.
An application would use these classes as follows:
@@ -82,7 +82,7 @@
long time = resp.getTime();
GetTimeRequest
and GetTimeResponse
classes might
be defined as follows:
-The SignedResultsControl class might be defined as follows:
+The
public class GetTimeRequest implements ExtendedRequest {
@@ -105,7 +105,7 @@
public class GetTimeResponse() implements ExtendedResponse {
long time;
// called by GetTimeRequest.createExtendedResponse()
- public GetTimeResponse(String id, byte[] berValue, int offset, int length)
+ public GetTimeResponse(String id, byte[] berValue, int offset, int length)
throws NamingException {
// check validity of id
long time = ... // decode berValue to get time
@@ -127,7 +127,7 @@
Controls
-This package defines the interface Control to represent an LDAPv3
+This package defines the interface Control
to represent an LDAPv3
control. It can be a control that is sent to an LDAP server
(request control) or a control returned by an LDAP server
(response control). Unlike extended requests and responses,
@@ -149,8 +149,8 @@
SignedResultsControl
so that applications
can use this feature.
An application would use this class as follows:
@@ -160,7 +160,7 @@
NamingEnumeration enum = ectx.search(...);
SignedResultsControl
class might be defined as follows:
public class SignedResultsControl implements Control {
// User-friendly constructor
@@ -180,19 +180,19 @@
ControlFactory
class to produce specific classes
+that implement the Control
interface.
LdapContext
provides a method (getResponseControls()
)
for getting the response controls sent with an LDAP operation,
-while the HasControls interface is used to retrieve
+while the HasControls
interface is used to retrieve
response controls associated with enumeration results.
ChangeIDControl
so that the application can use this feature.
An application would perform an update, and then try to get the change ID.
-The vendor might supply the following ChangeIDControl and
-VendorXControlFactory classes. The VendorXControlFactory
+The vendor might supply the following
@@ -211,8 +211,8 @@
}
}
ChangeIDControl
and
+VendorXControlFactory
classes. The VendorXControlFactory
will be used by the service provider when the provider receives response
controls from the LDAP server.
@@ -245,7 +245,7 @@
public Control getControlInstance(Control orig) throws NamingException {
if (isOneOfMyControls(orig.getID())) {
- ...
+ ...
// determine which of ours it is and call its constructor
return (new ChangeIDControl(orig.getID(), orig.getEncodedValue()));
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/package.html
--- a/jdk/src/java.naming/share/classes/javax/naming/package.html Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/package.html Wed Jul 05 20:44:51 2017 +0200
@@ -43,13 +43,13 @@
Context
Context
interface.
A context consists of a set of name-to-object bindings.
-Context is the core interface for looking up, binding, unbinding,
+Context
is the core interface for looking up, binding, unbinding,
and renaming objects, and for creating and destroying subcontexts.
lookup()
is the most commonly used operation.
+You supply lookup()
the name of the object you want
to look up, and it returns the object bound to that name.
For example, the following code fragment looks up
@@ -65,17 +65,17 @@
Names
Context
interface has two
overloads: one that accepts a
-Name argument and one that accepts a string name.
-Name is an interface that represents a generic
+Name
argument and one that accepts a string name.
+Name
is an interface that represents a generic
name--an ordered sequence of zero of more components.
-For these methods, Name can be used to represent a
-composite name (CompositeName)
+For these methods, Name
can be used to represent a
+composite name (CompositeName
)
so that you can name an object using a name which spans multiple namespaces.
Name
are useful for applications that need to manipulate names: composing
them, comparing components, and so on.
The overloads that accept string names are likely to be more useful
@@ -84,14 +84,14 @@
Bindings
-The Binding class represents a name-to-object binding.
+The Binding
class represents a name-to-object binding.
It is a tuple containing the name of the bound object,
the name of the object's class, and the object itself.
Binding
class is actually a subclass of
+NameClassPair
, which consists
simply of the object's name and the object's class name.
-The NameClassPair is useful when you only want
+The NameClassPair
is useful when you only want
information about the object's class and do not want to
pay the extra cost of getting the object.
@@ -104,7 +104,7 @@
objects in the directory, Java programs are but one group of applications
that access them. In this case, a serialized Java object might
not be the most appropriate representation.
-JNDI defines a reference, represented by the Reference
+JNDI defines a reference, represented by the Reference
class, which contains information on how to construct a copy of the object.
JNDI will attempt to turn references looked up from the directory
into the Java objects they represent, so that
@@ -117,7 +117,7 @@
In JNDI, all naming and directory operations are performed relative
to a context. There are no absolute roots.
Therefore JNDI defines an initial context,
-InitialContext,
+InitialContext
,
which provides a starting point for naming and directory operations.
Once you have an initial context, you can use it to
look up other contexts and objects.
@@ -126,10 +126,10 @@
JNDI defines a class hierarchy for exceptions that can be thrown in
the course of performing naming and directory operations. The root of
-this class hierarchy is NamingException.
+this class hierarchy is NamingException
.
Programs interested in dealing with a particular exception
can catch the corresponding subclass of the exception.
-Otherwise, programs should catch NamingException.
+Otherwise, programs should catch NamingException
.
Package Specification
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/DirObjectFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -35,12 +35,12 @@
*
- * An LDAP service provider for ctx uses a DirStateFactory
- * (indirectly via DirectoryManager.getStateToBind())
- * and gives it printer and printerAttrs. A factory for
- * an LDAP directory might turn printer into a set of attributes
- * and merge that with printerAttrs. The service provider then
+ * An LDAP service provider for {@code ctx} uses a {@code DirStateFactory}
+ * (indirectly via {@code DirectoryManager.getStateToBind()})
+ * and gives it {@code printer} and {@code printerAttrs}. A factory for
+ * an LDAP directory might turn {@code printer} into a set of attributes
+ * and merge that with {@code printerAttrs}. The service provider then
* uses the resulting attributes to create an LDAP entry and updates
* the directory.
*
- *
* ctx.rebind("inky", printer, printerAttrs);
*
name
and nameCtx
parameters may
+ * The {@code name} and {@code nameCtx} parameters may
* optionally be used to specify the name of the object being created.
* See the description of "Name and Context Parameters" in
* {@link ObjectFactory#getObjectInstance ObjectFactory.getObjectInstance()}
* for details.
- * If a factory uses nameCtx
it should synchronize its use
+ * If a factory uses {@code nameCtx} it should synchronize its use
* against concurrent access, since context implementations are not
* guaranteed to be thread-safe.
*nameCtx
,
+ * @param name The name of this object relative to {@code nameCtx},
* or null if no name is specified.
- * @param nameCtx The context relative to which the name
- * parameter is specified, or null if name
is
+ * @param nameCtx The context relative to which the {@code name}
+ * parameter is specified, or null if {@code name} is
* relative to the default initial context.
* @param environment The possibly null environment to
* be used in the creation of the object's state.
* @param inAttrs The possibly null attributes to be bound with the object.
- * The factory must not modify inAttrs.
- * @return A Result containing the object's state for binding
+ * The factory must not modify {@code inAttrs}.
+ * @return A {@code Result} containing the object's state for binding
* and the corresponding
* attributes to be bound; null if the object don't use this factory.
* @exception NamingException If this factory encountered an exception
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/DirectoryManager.java Wed Jul 05 20:44:51 2017 +0200
@@ -41,18 +41,18 @@
/**
- * This class contains methods for supporting DirContext
+ * This class contains methods for supporting {@code DirContext}
* implementations.
*
*
- * Service providers that implement the DirContext interface
- * should use this method, not NamingManager.getObjectInstance().
+ * Service providers that implement the {@code DirContext} interface
+ * should use this method, not {@code NamingManager.getObjectInstance()}.
*
* @param refInfo The possibly null object for which to create an object.
- * @param name The name of this object relative to nameCtx
.
+ * @param name The name of this object relative to {@code nameCtx}.
* Specifying a name is optional; if it is
- * omitted, name
should be null.
- * @param nameCtx The context relative to which the name
- * parameter is specified. If null, name
is
+ * omitted, {@code name} should be null.
+ * @param nameCtx The context relative to which the {@code name}
+ * parameter is specified. If null, {@code name} is
* relative to the default initial context.
* @param environment The possibly null environment to
* be used in the creation of the object factory and the object.
* @param attrs The possibly null attributes associated with refInfo.
* This might not be the complete set of attributes for refInfo;
* you might be able to read more attributes from the directory.
- * @return An object created using refInfo
and attrs; or
- * refInfo
if an object cannot be created by
+ * @return An object created using {@code refInfo} and {@code attrs}; or
+ * {@code refInfo} if an object cannot be created by
* a factory.
* @exception NamingException If a naming exception was encountered
* while attempting to get a URL context, or if one of the
@@ -144,7 +144,7 @@
* and instantiating the factory and object classes.
* A factory should only throw an exception if it does not want
* other factories to be used in an attempt to create an object.
- * See DirObjectFactory.getObjectInstance().
+ * See {@code DirObjectFactory.getObjectInstance()}.
* @see NamingManager#getURLContext
* @see DirObjectFactory
* @see DirObjectFactory#getObjectInstance
@@ -246,39 +246,39 @@
* Retrieves the state of an object for binding when given the original
* object and its attributes.
*
- *
*
- * Service providers that implement the DirContext interface
- * should use this method, not NamingManager.getStateToBind().
+ * Service providers that implement the {@code DirContext} interface
+ * should use this method, not {@code NamingManager.getStateToBind()}.
*nameCtx
,
+ * @param name The name of this object relative to {@code nameCtx},
* or null if no name is specified.
- * @param nameCtx The context relative to which the name
- * parameter is specified, or null if name
is
+ * @param nameCtx The context relative to which the {@code name}
+ * parameter is specified, or null if {@code name} is
* relative to the default initial context.
* @param environment The possibly null environment to
* be used in the creation of the state factory and
@@ -288,12 +288,12 @@
* @return A non-null DirStateFactory.Result containing
* the object and attributes to be bound.
* If no state factory returns a non-null answer, the result will contain
- * the object (obj) itself with the original attributes.
+ * the object ({@code obj}) itself with the original attributes.
* @exception NamingException If a naming exception was encountered
* while using the factories.
* A factory should only throw an exception if it does not want
* other factories to be used in an attempt to create an object.
- * See DirStateFactory.getStateToBind().
+ * See {@code DirStateFactory.getStateToBind()}.
* @see DirStateFactory
* @see DirStateFactory#getStateToBind
* @see NamingManager#getStateToBind
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/NamingManager.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/NamingManager.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/NamingManager.java Wed Jul 05 20:44:51 2017 +0200
@@ -49,7 +49,7 @@
* NamingManager is safe for concurrent access by multiple threads.
*
- *
*refInfo
is a Reference
- * or Referenceable
containing a factory class name,
+ * refInfo
if the factory cannot be created.
+ * Return {@code refInfo} if the factory cannot be created.
* Under JDK 1.1, if the factory class must be loaded from a location
- * specified in the reference, a SecurityManager must have
+ * specified in the reference, a {@code SecurityManager} must have
* been installed or the factory creation will fail.
* If an exception is encountered while creating the factory,
* it is passed up to the caller.
- * refInfo
.
+ * return {@code refInfo}.
* If an exception is encountered while creating the object, the
* exception is passed up to the caller.
*name
and nameCtx
parameters may
+ * The {@code name} and {@code nameCtx} parameters may
* optionally be used to specify the name of the object being created.
- * name
is the name of the object, relative to context
- * nameCtx
. This information could be useful to the object
+ * {@code name} is the name of the object, relative to context
+ * {@code nameCtx}. This information could be useful to the object
* factory or to the object implementation.
* If there are several possible contexts from which the object
* could be named -- as will often be the case -- it is up to
* the caller to select one. A good rule of thumb is to select the
* "deepest" context available.
- * If nameCtx
is null, name
is relative
+ * If {@code nameCtx} is null, {@code name} is relative
* to the default initial context. If no name is being specified, the
- * name
parameter should be null.
+ * {@code name} parameter should be null.
*
* @param refInfo The possibly null object for which to create an object.
- * @param name The name of this object relative to nameCtx
.
+ * @param name The name of this object relative to {@code nameCtx}.
* Specifying a name is optional; if it is
- * omitted, name
should be null.
- * @param nameCtx The context relative to which the name
- * parameter is specified. If null, name
is
+ * omitted, {@code name} should be null.
+ * @param nameCtx The context relative to which the {@code name}
+ * parameter is specified. If null, {@code name} is
* relative to the default initial context.
* @param environment The possibly null environment to
* be used in the creation of the object factory and the object.
- * @return An object created using refInfo
; or
- * refInfo
if an object cannot be created using
+ * @return An object created using {@code refInfo}; or
+ * {@code refInfo} if an object cannot be created using
* the algorithm described above.
* @exception NamingException if a naming exception was encountered
* while attempting to get a URL context, or if one of the
@@ -404,23 +404,23 @@
/**
- * Retrieves a context identified by obj
, using the specified
+ * Retrieves a context identified by {@code obj}, using the specified
* environment.
* Used by ContinuationContext.
*
* @param obj The object identifying the context.
* @param name The name of the context being returned, relative to
- * nameCtx
, or null if no name is being
+ * {@code nameCtx}, or null if no name is being
* specified.
- * See the getObjectInstance
method for
+ * See the {@code getObjectInstance} method for
* details.
- * @param nameCtx The context relative to which name
is
+ * @param nameCtx The context relative to which {@code name} is
* specified, or null for the default initial context.
- * See the getObjectInstance
method for
+ * See the {@code getObjectInstance} method for
* details.
* @param environment Environment specifying characteristics of the
* resulting context.
- * @return A context identified by obj
.
+ * @return A context identified by {@code obj}.
*
* @see #getObjectInstance
*/
@@ -480,7 +480,7 @@
* Creates a context for the given URL scheme id.
* scheme
. The resulting context is not tied
+ * scheme {@code scheme}. The resulting context is not tied
* to a specific URL. It is able to handle arbitrary URLs with
* the specified scheme.
*factory.getObjectInstance(null, environment);
+ * {@code factory.getObjectInstance(null, environment);}
* scheme
;
- * null
if the factory for creating the
+ * scheme id {@code scheme};
+ * {@code null} if the factory for creating the
* context is not found.
* @exception NamingException If a naming exception occurs while creating
* the context.
@@ -575,7 +575,7 @@
* context factory for the URL scheme.
* @param scheme the URL scheme id for the context
* @param urlInfo information used to create the context
- * @param name name of this object relative to nameCtx
+ * @param name name of this object relative to {@code nameCtx}
* @param nameCtx Context whose provider resource file will be searched
* for package prefix values (or null if none)
* @param environment Environment properties for creating the context
@@ -630,7 +630,7 @@
* it is used to create the factory for creating the initial
* context
*
*
CannotProceedException
containing information
+ * {@code CannotProceedException} containing information
* pinpointing how far it has proceeded. It then obtains a
* continuation context from JNDI by calling
- * getContinuationContext
. The context
+ * {@code getContinuationContext}. The context
* implementation should then resume the context operation by
* invoking the same operation on the continuation context, using
* the remainder of the name that has not yet been resolved.
*name
and nameCtx
parameters may
+ * The {@code name} and {@code nameCtx} parameters may
* optionally be used to specify the name of the object being created.
* See the description of "Name and Context Parameters" in
* {@link ObjectFactory#getObjectInstance
* ObjectFactory.getObjectInstance()}
* for details.
* nameCtx
,
+ * @param name The name of this object relative to {@code nameCtx},
* or null if no name is specified.
- * @param nameCtx The context relative to which the name
- * parameter is specified, or null if name
is
+ * @param nameCtx The context relative to which the {@code name}
+ * parameter is specified, or null if {@code name} is
* relative to the default initial context.
* @param environment The possibly null environment to
* be used in the creation of the state factory and
* the object's state.
- * @return The non-null object representing obj's state for
- * binding. It could be the object (obj) itself.
+ * @return The non-null object representing {@code obj}'s state for
+ * binding. It could be the object ({@code obj}) itself.
* @exception NamingException If one of the factories accessed throws an
* exception, or if an error was encountered while loading
* and instantiating the factory and object classes.
* A factory should only throw an exception if it does not want
* other factories to be used in an attempt to create an object.
- * See StateFactory.getStateToBind().
+ * See {@code StateFactory.getStateToBind()}.
* @see StateFactory
* @see StateFactory#getStateToBind
* @see DirectoryManager#getStateToBind
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -39,15 +39,15 @@
* Reference could be used to create a printer object, so that
* the caller of lookup can directly operate on the printer object
* after the lookup.
- * environment
.
+ * using {@code environment}.
* An example of such an environment property is user identity
* information.
*
- *
*
* obj
is null, create a context for resolving URLs of the
+ * obj
set to null on an LDAP URL context factory would return a
+ * scheme id. For example, invoking {@code getObjectInstance()} with
+ * {@code obj} set to null on an LDAP URL context factory would return a
* context that can resolve LDAP URLs
* such as "ldap://ldap.wiz.com/o=wiz,c=us" and
* "ldap://ldap.umich.edu/o=umich,c=us".
* obj
is a URL string, create an object (typically a context)
+ * If {@code obj} is a URL string, create an object (typically a context)
* identified by the URL. For example, suppose this is an LDAP URL context
- * factory. If obj
is "ldap://ldap.wiz.com/o=wiz,c=us",
+ * factory. If {@code obj} is "ldap://ldap.wiz.com/o=wiz,c=us",
* getObjectInstance() would return the context named by the distinguished
* name "o=wiz, c=us" at the LDAP server ldap.wiz.com. This context can
* then be used to resolve LDAP names (such as "cn=George")
* relative to that context.
* obj
is an array of URL strings, the assumption is that the
+ * If {@code obj} is an array of URL strings, the assumption is that the
* URLs are equivalent in terms of the context to which they refer.
* Verification of whether the URLs are, or need to be, equivalent is up
* to the context factory. The order of the URLs in the array is
@@ -120,13 +120,13 @@
* The object returned by getObjectInstance() is like that of the single
* URL case. It is the object named by the URLs.
* obj
is of any other type, the behavior of
- * getObjectInstance() is determined by the context factory
+ * If {@code obj} is of any other type, the behavior of
+ * {@code getObjectInstance()} is determined by the context factory
* implementation.
* name
and nameCtx
parameters may
+ * The {@code name} and {@code nameCtx} parameters may
* optionally be used to specify the name of the object being created.
- * name
is the name of the object, relative to context
- * nameCtx
.
+ * {@code name} is the name of the object, relative to context
+ * {@code nameCtx}.
* If there are several possible contexts from which the object
* could be named -- as will often be the case -- it is up to
* the caller to select one. A good rule of thumb is to select the
* "deepest" context available.
- * If nameCtx
is null, name
is relative
+ * If {@code nameCtx} is null, {@code name} is relative
* to the default initial context. If no name is being specified, the
- * name
parameter should be null.
- * If a factory uses nameCtx
it should synchronize its use
+ * {@code name} parameter should be null.
+ * If a factory uses {@code nameCtx} it should synchronize its use
* against concurrent access, since context implementations are not
* guaranteed to be thread-safe.
*
* @param obj The possibly null object containing location or reference
* information that can be used in creating an object.
- * @param name The name of this object relative to nameCtx
,
+ * @param name The name of this object relative to {@code nameCtx},
* or null if no name is specified.
- * @param nameCtx The context relative to which the name
- * parameter is specified, or null if name
is
+ * @param nameCtx The context relative to which the {@code name}
+ * parameter is specified, or null if {@code name} is
* relative to the default initial context.
* @param environment The possibly null environment that is used in
* creating the object.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/ObjectFactoryBuilder.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,10 +40,10 @@
* after the lookup. An ObjectFactory is responsible for creating
* objects of a specific type. JNDI uses a default policy for using
* and loading object factories. You can override this default policy
- * by calling NamingManager.setObjectFactoryBuilder() with an ObjectFactoryBuilder,
+ * by calling {@code NamingManager.setObjectFactoryBuilder()} with an ObjectFactoryBuilder,
* which contains the program-defined way of creating/loading
* object factories.
- * Any ObjectFactoryBuilder implementation must implement this
+ * Any {@code ObjectFactoryBuilder} implementation must implement this
* interface that for creating object factories.
*
* @author Rosanna Lee
diff -r 51926b23f437 -r 620051149184 jdk/src/java.naming/share/classes/javax/naming/spi/Resolver.java
--- a/jdk/src/java.naming/share/classes/javax/naming/spi/Resolver.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.naming/share/classes/javax/naming/spi/Resolver.java Wed Jul 05 20:44:51 2017 +0200
@@ -37,10 +37,10 @@
* that do not support subtypes of Context, but which can act as
* intermediate contexts for resolution purposes.
*
- * The service provider for ctx uses a state factory
- * to obtain the state of printer for binding into its namespace.
- * A state factory for the Printer type object might return
+ * The service provider for {@code ctx} uses a state factory
+ * to obtain the state of {@code printer} for binding into its namespace.
+ * A state factory for the {@code Printer} type object might return
* a more compact object for storage in the naming system.
*
* ctx.rebind("inky", printer);
*
javax.naming
and related packages.
Java Object Support
-The service provider package provides support
+The service provider package provides support
for implementors of the
-javax.naming.Context.lookup()
+javax.naming.Context.lookup()
method and related methods to return Java objects that are natural
and intuitive for the Java programmer.
For example, when looking up a printer name from the directory,
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/AbstractPreferences.java Wed Jul 05 20:44:51 2017 +0200
@@ -40,8 +40,8 @@
* This class provides a skeletal implementation of the {@link Preferences}
* class, greatly easing the task of implementing it.
*
- * NodeChangeEvent
instance.
+ * Constructs a new {@code NodeChangeEvent} instance.
*
* @param parent The parent of the node that was added or removed.
* @param child The node that was added or removed.
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/PreferenceChangeEvent.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/PreferenceChangeEvent.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/PreferenceChangeEvent.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
import java.io.NotSerializableException;
/**
- * An event emitted by a Preferences node to indicate that
+ * An event emitted by a {@code Preferences} node to indicate that
* a preference has been added, removed or has had its value changed.PreferenceChangeEvent
instance.
+ * Constructs a new {@code PreferenceChangeEvent} instance.
*
* @param node The Preferences node that emitted the event.
* @param key The key of the preference that was changed.
- * @param newValue The new value of the preference, or null
+ * @param newValue The new value of the preference, or {@code null}
* if the preference is being removed.
*/
public PreferenceChangeEvent(Preferences node, String key,
@@ -94,7 +94,7 @@
/**
* Returns the new value for the preference.
*
- * @return The new value for the preference, or null if the
+ * @return The new value for the preference, or {@code null} if the
* preference was removed.
*/
public String getNewValue() {
diff -r 51926b23f437 -r 620051149184 jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java
--- a/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.prefs/share/classes/java/util/prefs/Preferences.java Wed Jul 05 20:44:51 2017 +0200
@@ -72,10 +72,10 @@
* only restrictions on this name are that it cannot be the empty string, and
* it cannot contain the slash character ('/').
*
- *
*
*
@@ -328,19 +328,19 @@
* Returns the preference node from the calling user's preference tree
* that is associated (by convention) with the specified class's package.
* The convention is as follows: the absolute path name of the node is the
- * fully qualified package name, preceded by a slash ('/'), and
- * with each period ('.') replaced by a slash. For example the
+ * fully qualified package name, preceded by a slash ({@code '/'}), and
+ * with each period ({@code '.'}) replaced by a slash. For example the
* absolute path name of the node associated with the class
- * com.acme.widget.Foo is /com/acme/widget.
+ * {@code com.acme.widget.Foo} is {@code /com/acme/widget}.
*
*
* static Preferences prefs = Preferences.userNodeForPackage(Foo.class);
*
@@ -353,15 +353,15 @@
* node and its ancestors if they do not already exist. If the returned
* node did not exist prior to this call, this node and any ancestors that
* were created by this call are not guaranteed to become permanent until
- * the flush method is called on the returned node (or one of its
+ * the {@code flush} method is called on the returned node (or one of its
* ancestors or descendants).
*
* @param c the class for whose package a user preference node is desired.
* @return the user preference node associated with the package of which
- * c is a member.
- * @throws NullPointerException if c is null.
+ * {@code c} is a member.
+ * @throws NullPointerException if {@code c} is {@code null}.
* @throws SecurityException if a security manager is present and
- * it denies RuntimePermission("preferences").
+ * it denies {@code RuntimePermission("preferences")}.
* @see RuntimePermission
*/
public static Preferences userNodeForPackage(Class> c) {
@@ -372,19 +372,19 @@
* Returns the preference node from the system preference tree that is
* associated (by convention) with the specified class's package. The
* convention is as follows: the absolute path name of the node is the
- * fully qualified package name, preceded by a slash ('/'), and
- * with each period ('.') replaced by a slash. For example the
+ * fully qualified package name, preceded by a slash ({@code '/'}), and
+ * with each period ({@code '.'}) replaced by a slash. For example the
* absolute path name of the node associated with the class
- * com.acme.widget.Foo is /com/acme/widget.
+ * {@code com.acme.widget.Foo} is {@code /com/acme/widget}.
*
*
* static Preferences prefs = Preferences.systemNodeForPackage(Foo.class);
*
@@ -397,15 +397,15 @@
* node and its ancestors if they do not already exist. If the returned
* node did not exist prior to this call, this node and any ancestors that
* were created by this call are not guaranteed to become permanent until
- * the flush method is called on the returned node (or one of its
+ * the {@code flush} method is called on the returned node (or one of its
* ancestors or descendants).
*
* @param c the class for whose package a system preference node is desired.
* @return the system preference node associated with the package of which
- * c is a member.
- * @throws NullPointerException if c is null.
+ * {@code c} is a member.
+ * @throws NullPointerException if {@code c} is {@code null}.
* @throws SecurityException if a security manager is present and
- * it denies RuntimePermission("preferences").
+ * it denies {@code RuntimePermission("preferences")}.
* @see RuntimePermission
*/
public static Preferences systemNodeForPackage(Class> c) {
@@ -443,7 +443,7 @@
*
* @return the root preference node for the calling user.
* @throws SecurityException If a security manager is present and
- * it denies RuntimePermission("preferences").
+ * it denies {@code RuntimePermission("preferences")}.
* @see RuntimePermission
*/
public static Preferences userRoot() {
@@ -459,7 +459,7 @@
*
* @return the root preference node for the system.
* @throws SecurityException If a security manager is present and
- * it denies RuntimePermission("preferences").
+ * it denies {@code RuntimePermission("preferences")}.
* @see RuntimePermission
*/
public static Preferences systemRoot() {
@@ -483,10 +483,10 @@
*
* @param key key with which the specified value is to be associated.
* @param value value to be associated with the specified key.
- * @throws NullPointerException if key or value is null.
- * @throws IllegalArgumentException if key.length() exceeds
- * MAX_KEY_LENGTH or if value.length exceeds
- * MAX_VALUE_LENGTH.
+ * @throws NullPointerException if key or value is {@code null}.
+ * @throws IllegalArgumentException if {@code key.length()} exceeds
+ * {@code MAX_KEY_LENGTH} or if {@code value.length} exceeds
+ * {@code MAX_VALUE_LENGTH}.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
* @throws IllegalArgumentException if either key or value contain
@@ -506,14 +506,14 @@
*
* @param key key whose associated value is to be returned.
* @param def the value to be returned in the event that this
- * preference node has no value associated with key.
- * @return the value associated with key, or def
- * if no value is associated with key, or the backing
+ * preference node has no value associated with {@code key}.
+ * @return the value associated with {@code key}, or {@code def}
+ * if no value is associated with {@code key}, or the backing
* store is inaccessible.
* @throws IllegalStateException if this node (or an ancestor) has been
* removed with the {@link #removeNode()} method.
- * @throws NullPointerException if key is null. (A
- * null value for def is permitted.)
+ * @throws NullPointerException if {@code key} is {@code null}. (A
+ * {@code null} value for {@code def} is permitted.)
* @throws IllegalArgumentException if key contains the null control
* character, code point U+0000.
*/
@@ -526,10 +526,10 @@
*
* On the other hands, tokens used for per-message calls are generated
* entirely by the mechanism. It is possible that the mechanism chooses to
* encase inner-level per-message tokens in a header similar to that used
@@ -239,7 +239,7 @@
* asked to provide.
* @param confReq a flag indicating whether confidentiality will be
* requested or not
- * @param outputSize the maximum size of the output token
+ * @param maxTokSize the maximum size of the output token
* @return the maximum size for the input message that can be
* provided to the wrap() method in order to guarantee that these
* requirements are met.
@@ -254,7 +254,7 @@
* @param is the user-provided message to be protected
* @param os the token to be sent to the peer. It includes
* the message from is with the requested protection.
- * @param msgPro on input it contains the requested qop and
+ * @param msgProp on input it contains the requested qop and
* confidentiality state, on output, the applied values
* @exception GSSException may be thrown
* @see unwrap
@@ -365,7 +365,7 @@
*
* @param is token generated by getMIC
* @param msgStr the message to check integrity for
- * @param msgProp will contain the applied QOP and confidentiality
+ * @param mProp will contain the applied QOP and confidentiality
* states of the token as well as any informatory status codes
* @exception GSSException may be thrown
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/jgss/spi/GSSNameSpi.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/spi/GSSNameSpi.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/spi/GSSNameSpi.java Wed Jul 05 20:44:51 2017 +0200
@@ -46,7 +46,7 @@
* return false.
*
* @param name to be compared with
- * @returns true if they both refer to the same entity, else false
+ * @return true if they both refer to the same entity, else false
* @exception GSSException with major codes of BAD_NAMETYPE,
* BAD_NAME, FAILURE
*/
@@ -60,7 +60,7 @@
* situation where an error occurs.
*
* @param another the object to be compared to
- * @returns true if they both refer to the same entity, else false
+ * @return true if they both refer to the same entity, else false
* @see #equals(GSSNameSpi)
*/
public boolean equals(Object another);
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/jgss/spi/MechanismFactory.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/jgss/spi/MechanismFactory.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/jgss/spi/MechanismFactory.java Wed Jul 05 20:44:51 2017 +0200
@@ -147,7 +147,7 @@
* {@code
* Checksum ::= SEQUENCE {
* cksumtype [0] Int32,
* checksum [1] OCTET STRING
* }
- *
{@code
* EncryptedData ::= SEQUENCE {
* etype [0] Int32 -- EncryptionType --,
* kvno [1] UInt32 OPTIONAL,
* cipher [2] OCTET STRING -- ciphertext
* }
- *
{@code
* EncryptionKey ::= SEQUENCE {
* keytype[0] INTEGER,
* keyvalue[1] OCTET STRING }
- *
{@code
* Realm ::= KerberosString
*
* PrincipalName ::= SEQUENCE {
* name-type [0] Int32,
* name-string [1] SEQUENCE OF KerberosString
* }
- *
{@code
* PrincipalName ::= SEQUENCE {
* name-type [0] Int32,
* name-string [1] SEQUENCE OF KerberosString
* }
*
* KerberosString ::= GeneralString (IA5String)
- *
{@code
* APOptions ::= KerberosFlags
* -- reserved(0),
* -- use-session-key(1),
* -- mutual-required(2)
- *
{@code
* AP-REP ::= [APPLICATION 15] SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (15),
* enc-part [2] EncryptedData -- EncAPRepPart
* }
- *
{@code
* AP-REQ ::= [APPLICATION 14] SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (14),
@@ -46,7 +46,7 @@
* ticket [3] Ticket,
* authenticator [4] EncryptedData -- Authenticator
* }
- *
{@code
* Authenticator ::= [APPLICATION 2] SEQUENCE {
* authenticator-vno [0] INTEGER (5),
* crealm [1] Realm,
@@ -50,7 +50,7 @@
* seq-number [7] UInt32 OPTIONAL,
* authorization-data [8] AuthorizationData OPTIONAL
* }
- *
{@code
* EncAPRepPart ::= [APPLICATION 27] SEQUENCE {
* ctime [0] KerberosTime,
* cusec [1] Microseconds,
* subkey [2] EncryptionKey OPTIONAL,
* seq-number [3] UInt32 OPTIONAL
* }
- *
{@code
* EncKDCRepPart ::= SEQUENCE {
* key [0] EncryptionKey,
* last-req [1] LastReq,
@@ -55,7 +55,7 @@
* sname [10] PrincipalName,
* caddr [11] HostAddresses OPTIONAL
* }
- *
{@code
* EncKrbCredPart ::= [APPLICATION 29] SEQUENCE {
* ticket-info [0] SEQUENCE OF KrbCredInfo,
* nonce [1] UInt32 OPTIONAL,
@@ -49,7 +49,7 @@
* s-address [4] HostAddress OPTIONAL,
* r-address [5] HostAddress OPTIONAL
* }
- *
{@code
* EncKrbPrivPart ::= [APPLICATION 28] SEQUENCE {
* user-data [0] OCTET STRING,
* timestamp [1] KerberosTime OPTIONAL,
@@ -47,7 +47,7 @@
* s-address [4] HostAddress -- sender's addr --,
* r-address [5] HostAddress OPTIONAL -- recip's addr
* }
- *
{@code
* EncTicketPart ::= [APPLICATION 3] SEQUENCE {
* flags [0] TicketFlags,
* key [1] EncryptionKey,
@@ -53,7 +53,7 @@
* caddr [9] HostAddresses OPTIONAL,
* authorization-data [10] AuthorizationData OPTIONAL
* }
- *
{@code
* HostAddress ::= SEQUENCE {
* addr-type [0] Int32,
* address [1] OCTET STRING
* }
- *
{@code
* HostAddresses -- NOTE: subtly different from rfc1510,
* -- but has a value mapping and encodes the same
* ::= SEQUENCE OF HostAddress
@@ -54,7 +54,7 @@
* addr-type [0] Int32,
* address [1] OCTET STRING
* }
- *
{@code
* KDCOptions ::= KerberosFlags
* -- reserved(0),
* -- forwardable(1),
@@ -69,7 +69,7 @@
* -- minimum number of bits shall be sent,
* -- but no fewer than 32
*
- *
{@code
* KDC-REP ::= SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (11 -- AS -- | 13 -- TGS --),
@@ -51,7 +51,7 @@
* -- EncASRepPart or EncTGSRepPart,
* -- as appropriate
* }
- *
{@code
* KDC-REQ ::= SEQUENCE {
* -- NOTE: first tag is [1], not [0]
* pvno [1] INTEGER (5) ,
@@ -48,7 +48,7 @@
* -- NOTE: not empty --,
* req-body [4] KDC-REQ-BODY
* }
- *
{@code
* KDC-REQ-BODY ::= SEQUENCE {
* kdc-options [0] KDCOptions,
* cname [1] PrincipalName OPTIONAL
@@ -60,7 +60,7 @@
* additional-tickets [11] SEQUENCE OF Ticket OPTIONAL
* -- NOTE: not empty
* }
- *
{@code
* KRB-CRED ::= [APPLICATION 22] SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (22),
* tickets [2] SEQUENCE OF Ticket,
* enc-part [3] EncryptedData -- EncKrbCredPart
* }
- *
{@code
* KRB-ERROR ::= [APPLICATION 30] SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (30),
@@ -71,7 +71,7 @@
* data-type [0] Int32,
* data-value [1] OCTET STRING OPTIONAL
* }
- *
{@code
* KRB-PRIV ::= [APPLICATION 21] SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (21),
* -- NOTE: there is no [2] tag
* enc-part [3] EncryptedData -- EncKrbPrivPart
* }
- *
{@code
* KRB-SAFE ::= [APPLICATION 20] SEQUENCE {
* pvno [0] INTEGER (5),
* msg-type [1] INTEGER (20),
* safe-body [2] KRB-SAFE-BODY,
* cksum [3] Checksum
* }
- *
{@code
* KRB-SAFE-BODY ::= SEQUENCE {
* user-data [0] OCTET STRING,
* timestamp [1] KerberosTime OPTIONAL,
@@ -48,7 +48,7 @@
* s-address [4] HostAddress,
* r-address [5] HostAddress OPTIONAL
* }
- *
{@code
* KrbCredInfo ::= SEQUENCE {
* key [0] EncryptionKey,
* prealm [1] Realm OPTIONAL,
@@ -52,7 +52,7 @@
* sname [9] PrincipalName OPTIONAL,
* caddr [10] HostAddresses OPTIONAL
* }
- *
{@code
* LastReq ::= SEQUENCE OF SEQUENCE {
* lr-type [0] Int32,
* lr-value [1] KerberosTime
* }
- *
{@code
* KDCOptions ::= KerberosFlags
* -- reserved(0),
* -- forwardable(1),
@@ -64,7 +64,7 @@
* KerberosFlags ::= BIT STRING (SIZE (32..MAX))
* -- minimum number of bits shall be sent,
* -- but no fewer than 32
- *
{@code
* METHOD-DATA ::= SEQUENCE {
* method-type[0] INTEGER,
* method-data[1] OCTET STRING OPTIONAL
* }
- *
{@code
* PA-DATA ::= SEQUENCE {
* -- NOTE: first tag is [1], not [0]
* padata-type [1] Int32,
* padata-value [2] OCTET STRING -- might be encoded AP-REQ
* }
- *
+ *
* (This is useful when PA-DATAs from KRB-ERROR and AS-REP are combined).
+ *
* @return the etype, or defaultEType if not enough info
* @throws Asn1Exception|IOException if there is an encoding error
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/PAEncTSEnc.java
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/PAEncTSEnc.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/internal/PAEncTSEnc.java Wed Jul 05 20:44:51 2017 +0200
@@ -38,12 +38,12 @@
/**
* Implements the ASN.1 PAEncTSEnc type.
*
- * {@code
* PA-ENC-TS-ENC ::= SEQUENCE {
* patimestamp [0] KerberosTime -- client's time --,
* pausec [1] Microseconds OPTIONAL
* }
- *
{@code
* padata-type ::= PA-FOR-USER
* -- value 129
* padata-value ::= EncryptedData
@@ -47,7 +47,7 @@
* cksum[2] Checksum,
* auth-package[3] KerberosString
* }
- *
{@code
* Ticket ::= [APPLICATION 1] SEQUENCE {
* tkt-vno [0] INTEGER (5),
* realm [1] Realm,
* sname [2] PrincipalName,
* enc-part [3] EncryptedData -- EncTicketPart
* }
- *
{@code
* TransitedEncoding ::= SEQUENCE {
* tr-type [0] Int32 -- must be registered --,
* contents [1] OCTET STRING
* }
- *
java.lang.System
+ * {@code java.lang.System
+ * {@code
*
*/
public static void main(String[] args) {
Klist klist = new Klist();
diff -r 51926b23f437 -r 620051149184 jdk/src/java.security.sasl/share/classes/com/sun/security/sasl/digest/FactoryImpl.java
--- a/jdk/src/java.security.sasl/share/classes/com/sun/security/sasl/digest/FactoryImpl.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.security.sasl/share/classes/com/sun/security/sasl/digest/FactoryImpl.java Wed Jul 05 20:44:51 2017 +0200
@@ -60,7 +60,7 @@
*
* @throws SaslException If there is an error creating the DigestMD5
* SASL client.
- * @returns a new SaslClient ; otherwise null if unsuccessful.
+ * @return a new SaslClient; otherwise null if unsuccessful.
*/
public SaslClient createSaslClient(String[] mechs,
String authorizationId, String protocol, String serverName,
@@ -90,7 +90,7 @@
*
* @throws SaslException If there is an error creating the DigestMD5
* SASL server.
- * @returns a new SaslServer ; otherwise null if unsuccessful.
+ * @return a new SaslServer; otherwise null if unsuccessful.
*/
public SaslServer createSaslServer(String mech,
String protocol, String serverName, MapInputStream
object.
- * The "{@code InputStream} must contain the number
+ * The {@code InputStream} must contain the number
* of characters specified by length, otherwise a SQLException
will be
* generated when the CallableStatement
is executed.
* This method differs from the setBinaryStream (int, InputStream, int)
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMCryptoBinary.java Wed Jul 05 20:44:51 2017 +0200
@@ -41,12 +41,12 @@
* as defined in the W3C specification for XML-Signature Syntax and Processing.
* The XML Schema Definition is defined as:
*
- * {@code
*
null
). The array is cloned to prevent subsequent
* modification.
* @param other a list of {@link XMLStructure}s representing elements from
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java Wed Jul 05 20:44:51 2017 +0200
@@ -118,7 +118,6 @@
* is defensively copied to protect against subsequent modification.
* May be null
or empty.
* @param id the reference ID (may be null
)
- * @return a Reference
* @throws NullPointerException if dm
is null
* @throws ClassCastException if any of the transforms
are
* not of type Transform
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java Wed Jul 05 20:44:51 2017 +0200
@@ -58,7 +58,6 @@
* @param properties a list of one or more {@link SignatureProperty}s. The
* list is defensively copied to protect against subsequent modification.
* @param id the Id (may be null
)
- * @return a DOMSignatureProperties
* @throws ClassCastException if properties
contains any
* entries that are not of type {@link SignatureProperty}
* @throws IllegalArgumentException if properties
is empty
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java Wed Jul 05 20:44:51 2017 +0200
@@ -59,7 +59,6 @@
* is defensively copied to protect against subsequent modification.
* @param target the target URI
* @param id the Id (may be null
)
- * @return a SignatureProperty
* @throws ClassCastException if content
contains any
* entries that are not of type {@link XMLStructure}
* @throws IllegalArgumentException if content
is empty
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMTransform.java Wed Jul 05 20:44:51 2017 +0200
@@ -53,7 +53,7 @@
protected TransformService spi;
/**
- * Creates a DOMTransform
.
+ * Creates a {@code DOMTransform}.
*
* @param spi the TransformService
*/
@@ -62,7 +62,7 @@
}
/**
- * Creates a DOMTransform
from an element. This constructor
+ * Creates a {@code DOMTransform} from an element. This constructor
* invokes the abstract {@link #unmarshalParams unmarshalParams} method to
* unmarshal any algorithm-specific input parameters.
*
@@ -138,12 +138,12 @@
* Transforms the specified data using the underlying transform algorithm.
*
* @param data the data to be transformed
- * @param sc the XMLCryptoContext
containing
- * additional context (may be null
if not applicable)
+ * @param xc the {@code XMLCryptoContext} containing
+ * additional context (may be {@code null} if not applicable)
* @return the transformed data
- * @throws NullPointerException if data
is null
+ * @throws NullPointerException if {@code data} is {@code null}
* @throws XMLSignatureException if an unexpected error occurs while
- * executing the transform
+ * executing the transform
*/
public Data transform(Data data, XMLCryptoContext xc)
throws TransformException
@@ -155,14 +155,14 @@
* Transforms the specified data using the underlying transform algorithm.
*
* @param data the data to be transformed
- * @param sc the XMLCryptoContext
containing
- * additional context (may be null
if not applicable)
- * @param os the OutputStream
that should be used to write
- * the transformed data to
+ * @param xc the {@code XMLCryptoContext} containing
+ * additional context (may be {@code null} if not applicable)
+ * @param os the {@code OutputStream} that should be used to write
+ * the transformed data to
* @return the transformed data
- * @throws NullPointerException if data
is null
+ * @throws NullPointerException if {@code data} is {@code null}
* @throws XMLSignatureException if an unexpected error occurs while
- * executing the transform
+ * executing the transform
*/
public Data transform(Data data, XMLCryptoContext xc, OutputStream os)
throws TransformException
@@ -201,16 +201,16 @@
/**
* Transforms the specified data using the underlying transform algorithm.
* This method invokes the {@link #marshal marshal} method and passes it
- * the specified DOMSignContext
before transforming the data.
+ * the specified {@code DOMSignContext} before transforming the data.
*
* @param data the data to be transformed
- * @param sc the XMLCryptoContext
containing
- * additional context (may be null
if not applicable)
+ * @param sc the {@code XMLCryptoContext} containing
+ * additional context (may be {@code null} if not applicable)
* @param context the marshalling context
* @return the transformed data
* @throws MarshalException if an exception occurs while marshalling
- * @throws NullPointerException if data
or context
- * is null
+ * @throws NullPointerException if {@code data} or {@code context}
+ * is {@code null}
* @throws XMLSignatureException if an unexpected error occurs while
* executing the transform
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java Wed Jul 05 20:44:51 2017 +0200
@@ -65,7 +65,6 @@
* or {@link javax.xml.dsig.XMLStructure} ({@link X509IssuerSerial}
* objects or elements from an external namespace). The list is
* defensively copied to protect against subsequent modification.
- * @return a X509Data
* @throws NullPointerException if content
is null
* @throws IllegalArgumentException if content
is empty
* @throws ClassCastException if content
contains any entries
diff -r 51926b23f437 -r 620051149184 jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java
--- a/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java Wed Jul 05 20:44:51 2017 +0200
@@ -63,7 +63,6 @@
* @param id the Id (may be null
)
* @param mimeType the mime type (may be null
)
* @param encoding the encoding (may be null
)
- * @return an XMLObject
* @throws ClassCastException if content
contains any
* entries that are not of type {@link XMLStructure}
*/
diff -r 51926b23f437 -r 620051149184 jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java
--- a/jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/JISAutoDetect.java Wed Jul 05 20:44:51 2017 +0200
@@ -79,32 +79,6 @@
throw new UnsupportedOperationException();
}
- /**
- * accessor methods used to share byte masking tables
- * with the sun.io JISAutoDetect implementation
- */
-
- public static byte[] getByteMask1() {
- return Decoder.maskTable1;
- }
-
- public static byte[] getByteMask2() {
- return Decoder.maskTable2;
- }
-
- public final static boolean canBeSJIS1B(int mask) {
- return (mask & SJIS1B_MASK) != 0;
- }
-
- public final static boolean canBeEUCJP(int mask) {
- return (mask & EUCJP_MASK) != 0;
- }
-
- public final static boolean canBeEUCKana(int mask1, int mask2) {
- return ((mask1 & EUCJP_KANA1_MASK) != 0)
- && ((mask2 & EUCJP_KANA2_MASK) != 0);
- }
-
// A heuristic algorithm for guessing if EUC-decoded text really
// might be Japanese text. Better heuristics are possible...
private static boolean looksLikeJapanese(CharBuffer cb) {
@@ -144,9 +118,10 @@
src.position(p);
}
- private CoderResult decodeLoop(Charset cs,
+ private CoderResult decodeLoop(DelegatableDecoder decoder,
ByteBuffer src, CharBuffer dst) {
- detectedDecoder = (DelegatableDecoder) cs.newDecoder();
+ ((CharsetDecoder)decoder).reset();
+ detectedDecoder = decoder;
return detectedDecoder.decodeLoop(src, dst);
}
@@ -157,7 +132,9 @@
// All ASCII?
if (! src.hasRemaining())
return CoderResult.UNDERFLOW;
- if (! dst.hasRemaining())
+ // Overflow only if there is still ascii but no out buffer.
+ if (!dst.hasRemaining() &&
+ isPlainASCII(src.get(src.position())))
return CoderResult.OVERFLOW;
// We need to perform double, not float, arithmetic; otherwise
@@ -172,7 +149,7 @@
ByteBuffer src2022 = src.asReadOnlyBuffer();
CoderResult res2022 = dd2022.decodeLoop(src2022, sandbox);
if (! res2022.isError())
- return decodeLoop(cs2022, src, dst);
+ return decodeLoop(dd2022, src, dst);
// We must choose between EUC and SJIS
Charset csEUCJ = Charset.forName(EUCJPName);
@@ -180,30 +157,30 @@
DelegatableDecoder ddEUCJ
= (DelegatableDecoder) csEUCJ.newDecoder();
+ DelegatableDecoder ddSJIS
+ = (DelegatableDecoder) csSJIS.newDecoder();
+
ByteBuffer srcEUCJ = src.asReadOnlyBuffer();
sandbox.clear();
CoderResult resEUCJ = ddEUCJ.decodeLoop(srcEUCJ, sandbox);
// If EUC decoding fails, must be SJIS
if (resEUCJ.isError())
- return decodeLoop(csSJIS, src, dst);
-
- DelegatableDecoder ddSJIS
- = (DelegatableDecoder) csSJIS.newDecoder();
+ return decodeLoop(ddSJIS, src, dst);
ByteBuffer srcSJIS = src.asReadOnlyBuffer();
CharBuffer sandboxSJIS = CharBuffer.allocate(cbufsiz);
CoderResult resSJIS = ddSJIS.decodeLoop(srcSJIS, sandboxSJIS);
// If SJIS decoding fails, must be EUC
if (resSJIS.isError())
- return decodeLoop(csEUCJ, src, dst);
+ return decodeLoop(ddEUCJ, src, dst);
// From here on, we have some ambiguity, and must guess.
// We prefer input that does not appear to end mid-character.
if (srcEUCJ.position() > srcSJIS.position())
- return decodeLoop(csEUCJ, src, dst);
+ return decodeLoop(ddEUCJ, src, dst);
if (srcEUCJ.position() < srcSJIS.position())
- return decodeLoop(csSJIS, src, dst);
+ return decodeLoop(ddSJIS, src, dst);
// end-of-input is after the first byte of the first char?
if (src.position() == srcEUCJ.position())
@@ -211,8 +188,8 @@
// Use heuristic knowledge of typical Japanese text
sandbox.flip();
- Charset guess = looksLikeJapanese(sandbox) ? csEUCJ : csSJIS;
- return decodeLoop(guess, src, dst);
+ return decodeLoop(looksLikeJapanese(sandbox) ? ddEUCJ : ddSJIS,
+ src, dst);
}
return detectedDecoder.decodeLoop(src, dst);
@@ -267,140 +244,5 @@
return("EUC_JP");
}
- // Mask tables - each entry indicates possibility of first or
- // second byte being SJIS or EUC_JP
- private static final byte maskTable1[] = {
- 0, 0, 0, 0, // 0x00 - 0x03
- 0, 0, 0, 0, // 0x04 - 0x07
- 0, 0, 0, 0, // 0x08 - 0x0b
- 0, 0, 0, 0, // 0x0c - 0x0f
- 0, 0, 0, 0, // 0x10 - 0x13
- 0, 0, 0, 0, // 0x14 - 0x17
- 0, 0, 0, 0, // 0x18 - 0x1b
- 0, 0, 0, 0, // 0x1c - 0x1f
- 0, 0, 0, 0, // 0x20 - 0x23
- 0, 0, 0, 0, // 0x24 - 0x27
- 0, 0, 0, 0, // 0x28 - 0x2b
- 0, 0, 0, 0, // 0x2c - 0x2f
- 0, 0, 0, 0, // 0x30 - 0x33
- 0, 0, 0, 0, // 0x34 - 0x37
- 0, 0, 0, 0, // 0x38 - 0x3b
- 0, 0, 0, 0, // 0x3c - 0x3f
- 0, 0, 0, 0, // 0x40 - 0x43
- 0, 0, 0, 0, // 0x44 - 0x47
- 0, 0, 0, 0, // 0x48 - 0x4b
- 0, 0, 0, 0, // 0x4c - 0x4f
- 0, 0, 0, 0, // 0x50 - 0x53
- 0, 0, 0, 0, // 0x54 - 0x57
- 0, 0, 0, 0, // 0x58 - 0x5b
- 0, 0, 0, 0, // 0x5c - 0x5f
- 0, 0, 0, 0, // 0x60 - 0x63
- 0, 0, 0, 0, // 0x64 - 0x67
- 0, 0, 0, 0, // 0x68 - 0x6b
- 0, 0, 0, 0, // 0x6c - 0x6f
- 0, 0, 0, 0, // 0x70 - 0x73
- 0, 0, 0, 0, // 0x74 - 0x77
- 0, 0, 0, 0, // 0x78 - 0x7b
- 0, 0, 0, 0, // 0x7c - 0x7f
- 0, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x80 - 0x83
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x84 - 0x87
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x88 - 0x8b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0x8c - 0x8f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x90 - 0x93
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x94 - 0x97
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x98 - 0x9b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x9c - 0x9f
- 0, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xa0 - 0xa3
- SJIS1B_MASK|EUCJP_MASK|EUCJP_KANA1_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xa4 - 0xa7
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xa8 - 0xab
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xac - 0xaf
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xb0 - 0xb3
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xb4 - 0xb7
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xb8 - 0xbb
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xbc - 0xbf
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xc0 - 0xc3
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xc4 - 0xc7
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xc8 - 0xcb
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xcc - 0xcf
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xd0 - 0xd3
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xd4 - 0xd7
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xd8 - 0xdb
- SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, SJIS1B_MASK|EUCJP_MASK, // 0xdc - 0xdf
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xe0 - 0xe3
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xe4 - 0xe7
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xe8 - 0xeb
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xec - 0xef
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xf0 - 0xf3
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xf4 - 0xf7
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xf8 - 0xfb
- SJIS2B_MASK|EUCJP_MASK, EUCJP_MASK, EUCJP_MASK, 0 // 0xfc - 0xff
- };
-
- private static final byte maskTable2[] = {
- 0, 0, 0, 0, // 0x00 - 0x03
- 0, 0, 0, 0, // 0x04 - 0x07
- 0, 0, 0, 0, // 0x08 - 0x0b
- 0, 0, 0, 0, // 0x0c - 0x0f
- 0, 0, 0, 0, // 0x10 - 0x13
- 0, 0, 0, 0, // 0x14 - 0x17
- 0, 0, 0, 0, // 0x18 - 0x1b
- 0, 0, 0, 0, // 0x1c - 0x1f
- 0, 0, 0, 0, // 0x20 - 0x23
- 0, 0, 0, 0, // 0x24 - 0x27
- 0, 0, 0, 0, // 0x28 - 0x2b
- 0, 0, 0, 0, // 0x2c - 0x2f
- 0, 0, 0, 0, // 0x30 - 0x33
- 0, 0, 0, 0, // 0x34 - 0x37
- 0, 0, 0, 0, // 0x38 - 0x3b
- 0, 0, 0, 0, // 0x3c - 0x3f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x40 - 0x43
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x44 - 0x47
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x48 - 0x4b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x4c - 0x4f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x50 - 0x53
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x54 - 0x57
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x58 - 0x5b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x5c - 0x5f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x60 - 0x63
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x64 - 0x67
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x68 - 0x6b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x6c - 0x6f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x70 - 0x73
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x74 - 0x77
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x78 - 0x7b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, 0, // 0x7c - 0x7f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x80 - 0x83
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x84 - 0x87
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x88 - 0x8b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x8c - 0x8f
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x90 - 0x93
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x94 - 0x97
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x98 - 0x9b
- SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, SJIS2B_MASK, // 0x9c - 0x9f
- SJIS2B_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xa0 - 0xa3
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xa4 - 0xa7
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xa8 - 0xab
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xac - 0xaf
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xb0 - 0xb3
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xb4 - 0xb7
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xb8 - 0xbb
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xbc - 0xbf
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xc0 - 0xc3
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xc4 - 0xc7
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xc8 - 0xcb
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xcc - 0xcf
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xd0 - 0xd3
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xd4 - 0xd7
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xd8 - 0xdb
- SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS1B_MASK|SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xdc - 0xdf
- SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xe0 - 0xe3
- SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xe4 - 0xe7
- SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xe8 - 0xeb
- SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xec - 0xef
- SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, SJIS2B_MASK|EUCJP_MASK|EUCJP_KANA2_MASK, // 0xf0 - 0xf3
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xf4 - 0xf7
- SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, SJIS2B_MASK|EUCJP_MASK, // 0xf8 - 0xfb
- SJIS2B_MASK|EUCJP_MASK, EUCJP_MASK, EUCJP_MASK, 0 // 0xfc - 0xff
- };
}
}
diff -r 51926b23f437 -r 620051149184 jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/wrapper/CK_CREATEMUTEX.java
--- a/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/wrapper/CK_CREATEMUTEX.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/wrapper/CK_CREATEMUTEX.java Wed Jul 05 20:44:51 2017 +0200
@@ -50,17 +50,16 @@
/**
- * interface CK_CREATEMUTEX.
- * nameserver 127.0.0.1
- * nameserver 2001:4860:4860::8888
- * nameserver [::1]:5353
- * nameserver 127.0.0.1:5353
- *
- *
- * Then, run this test as manual jtreg test.
*
* @author Severin Gehwolf
- *
*/
+
public class IPv6NameserverPlatformParsingTest {
private static boolean foundIPv6 = false;
diff -r 51926b23f437 -r 620051149184 jdk/test/com/sun/jndi/dns/Test6991580.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/jndi/dns/Test6991580.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,358 @@
+
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Button;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+/**
+ * @test
+ * @bug 6991580 8080108
+ * @requires os.family != "windows"
+ * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException
+ * @build IPv6NameserverPlatformParsingTest
+ * @run main/manual Test6991580
+ */
+
+
+public class Test6991580 {
+
+ private static void init() throws Exception {
+ //*** Create instructions for the user here ***
+
+ String[] instructions =
+ {
+ "This test should only be run on non-Windows systems.",
+ "If your system doesn't meet this condition, press PASS.",
+ "To run the test follow these instructions:",
+ "1. Open a terminal window.",
+ "2. Make sure you have, for example, the following snippet "
+ + "into your platform's /etc/resolv.conf:",
+ "nameserver 127.0.0.1",
+ "nameserver 2001:4860:4860::8888",
+ "nameserver [::1]:5353",
+ "nameserver 127.0.0.1:5353",
+ "Modify the /etc/resolv.conf file if needed. "
+ + "Don't forget to save the original content of the file.",
+ "3. Type \"cd " + System.getProperty("test.classes") + "\".",
+ "4. Type \"" + System.getProperty("java.home") +
+ "/bin/java IPv6NameserverPlatformParsingTest\".",
+ "5. If you see",
+ "\"PASS: Found IPv6 address and DnsClient parsed it correctly.\"",
+ ", press PASS else press FAIL.",
+ "6. If you modified /etc/resolv.conf on the step #2, "
+ + "please, restore the original content of the file."
+ };
+
+ Sysout.createDialog( );
+ Sysout.printInstructions( instructions );
+ }
+
+ /*****************************************************
+ Standard Test Machinery Section
+ DO NOT modify anything in this section -- it's a
+ standard chunk of code which has all of the
+ synchronisation necessary for the test harness.
+ By keeping it the same in all tests, it is easier
+ to read and understand someone else's test, as
+ well as insuring that all tests behave correctly
+ with the test harness.
+ There is a section following this for test-defined
+ classes
+ ******************************************************/
+ private static boolean theTestPassed = false;
+ private static boolean testGeneratedInterrupt = false;
+ private static String failureMessage = "";
+
+ private static Thread mainThread = null;
+
+ private static int sleepTime = 300000;
+
+ public static void main( String args[] ) throws Exception
+ {
+ mainThread = Thread.currentThread();
+ try
+ {
+ init();
+ }
+ catch( TestPassedException e )
+ {
+ //The test passed, so just return from main and harness will
+ // interepret this return as a pass
+ return;
+ }
+ //At this point, neither test passed nor test failed has been
+ // called -- either would have thrown an exception and ended the
+ // test, so we know we have multiple threads.
+
+ //Test involves other threads, so sleep and wait for them to
+ // called pass() or fail()
+ try
+ {
+ Thread.sleep( sleepTime );
+ //Timed out, so fail the test
+ throw new RuntimeException( "Timed out after " + sleepTime/1000 + " seconds" );
+ }
+ catch (InterruptedException e)
+ {
+ if( ! testGeneratedInterrupt ) throw e;
+
+ //reset flag in case hit this code more than once for some reason (just safety)
+ testGeneratedInterrupt = false;
+ if ( theTestPassed == false )
+ {
+ throw new RuntimeException( failureMessage );
+ }
+ }
+
+ }//main
+
+ public static synchronized void setTimeoutTo( int seconds )
+ {
+ sleepTime = seconds * 1000;
+ }
+
+ public static synchronized void pass()
+ {
+ Sysout.println( "The test passed." );
+ Sysout.println( "The test is over, hit Ctl-C to stop Java VM" );
+ //first check if this is executing in main thread
+ if ( mainThread == Thread.currentThread() )
+ {
+ //Still in the main thread, so set the flag just for kicks,
+ // and throw a test passed exception which will be caught
+ // and end the test.
+ theTestPassed = true;
+ throw new TestPassedException();
+ }
+ //pass was called from a different thread, so set the flag and interrupt
+ // the main thead.
+ theTestPassed = true;
+ testGeneratedInterrupt = true;
+ mainThread.interrupt();
+ }//pass()
+
+ public static synchronized void fail()
+ {
+ //test writer didn't specify why test failed, so give generic
+ fail( "it just plain failed! :-)" );
+ }
+
+ public static synchronized void fail( String whyFailed )
+ {
+ Sysout.println( "The test failed: " + whyFailed );
+ Sysout.println( "The test is over, hit Ctl-C to stop Java VM" );
+ //check if this called from main thread
+ if ( mainThread == Thread.currentThread() )
+ {
+ //If main thread, fail now 'cause not sleeping
+ throw new RuntimeException( whyFailed );
+ }
+ theTestPassed = false;
+ testGeneratedInterrupt = true;
+ failureMessage = whyFailed;
+ mainThread.interrupt();
+ }//fail()
+
+ }
+
+//This exception is used to exit from any level of call nesting
+// when it's determined that the test has passed, and immediately
+// end the test.
+class TestPassedException extends RuntimeException
+ {
+ }
+
+//*********** End Standard Test Machinery Section **********
+
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+ chunk of code whose purpose is to make user
+ interaction uniform, and thereby make it simpler
+ to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+ for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+ WithInstructions method. Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+ with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+ as standalone.
+ */
+
+class Sysout
+ {
+ private static TestDialog dialog;
+
+ public static void createDialogWithInstructions( String[] instructions )
+ {
+ dialog = new TestDialog( new Frame(), "Instructions" );
+ dialog.printInstructions( instructions );
+ dialog.show();
+ println( "Any messages for the tester will display here." );
+ }
+
+ public static void createDialog( )
+ {
+ dialog = new TestDialog( new Frame(), "Instructions" );
+ String[] defInstr = { "Instructions will appear here. ", "" } ;
+ dialog.printInstructions( defInstr );
+ dialog.show();
+ println( "Any messages for the tester will display here." );
+ }
+
+
+ public static void printInstructions( String[] instructions )
+ {
+ dialog.printInstructions( instructions );
+ }
+
+
+ public static void println( String messageIn )
+ {
+ dialog.displayMessage( messageIn );
+ }
+
+ }// Sysout class
+
+/**
+ This is part of the standard test machinery. It provides a place for the
+ test instructions to be displayed, and a place for interactive messages
+ to the user to be displayed.
+ To have the test instructions displayed, see Sysout.
+ To have a message to the user be displayed, see Sysout.
+ Do not call anything in this dialog directly.
+ */
+class TestDialog extends Dialog implements ActionListener
+ {
+
+ TextArea instructionsText;
+ TextArea messageText;
+ int maxStringLength = 120;
+ Panel buttonP = new Panel();
+ Button passB = new Button( "pass" );
+ Button failB = new Button( "fail" );
+
+ //DO NOT call this directly, go through Sysout
+ public TestDialog( Frame frame, String name )
+ {
+ super( frame, name );
+ int scrollBoth = TextArea.SCROLLBARS_BOTH;
+ instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+ add( "North", instructionsText );
+
+ messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+ add("Center", messageText);
+
+ passB = new Button( "pass" );
+ passB.setActionCommand( "pass" );
+ passB.addActionListener( this );
+ buttonP.add( "East", passB );
+
+ failB = new Button( "fail" );
+ failB.setActionCommand( "fail" );
+ failB.addActionListener( this );
+ buttonP.add( "West", failB );
+
+ add( "South", buttonP );
+ pack();
+
+ show();
+ }// TestDialog()
+
+ //DO NOT call this directly, go through Sysout
+ public void printInstructions( String[] instructions )
+ {
+ //Clear out any current instructions
+ instructionsText.setText( "" );
+
+ //Go down array of instruction strings
+
+ String printStr, remainingStr;
+ for( int i=0; i < instructions.length; i++ )
+ {
+ //chop up each into pieces maxSringLength long
+ remainingStr = instructions[ i ];
+ while( remainingStr.length() > 0 )
+ {
+ //if longer than max then chop off first max chars to print
+ if( remainingStr.length() >= maxStringLength )
+ {
+ //Try to chop on a word boundary
+ int posOfSpace = remainingStr.
+ lastIndexOf( ' ', maxStringLength - 1 );
+
+ if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+ printStr = remainingStr.substring( 0, posOfSpace + 1 );
+ remainingStr = remainingStr.substring( posOfSpace + 1 );
+ }
+ //else just print
+ else
+ {
+ printStr = remainingStr;
+ remainingStr = "";
+ }
+
+ instructionsText.append( printStr + "\n" );
+
+ }// while
+
+ }// for
+
+ }//printInstructions()
+
+ //DO NOT call this directly, go through Sysout
+ public void displayMessage( String messageIn )
+ {
+ messageText.append( messageIn + "\n" );
+ }
+
+ //catch presses of the passed and failed buttons.
+ //simply call the standard pass() or fail() static methods of
+ //DialogOrient
+ @Override
+ public void actionPerformed( ActionEvent e )
+ {
+ if( "pass".equals(e.getActionCommand()) )
+ {
+ Test6991580.pass();
+ }
+ else
+ {
+ Test6991580.fail();
+ }
+ }
+
+ }
diff -r 51926b23f437 -r 620051149184 jdk/test/com/sun/tools/attach/BasicTests.java
--- a/jdk/test/com/sun/tools/attach/BasicTests.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/com/sun/tools/attach/BasicTests.java Wed Jul 05 20:44:51 2017 +0200
@@ -41,7 +41,7 @@
* @test
* @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
* @summary Basic unit tests for the VM attach mechanism.
- * @modules jdk.jartool/sun.tools.jar
+ * @key intermittent
* @library /lib/testlibrary
* @modules java.instrument
* java.management
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/ClassLoader/Assert.java
--- a/jdk/test/java/lang/ClassLoader/Assert.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/ClassLoader/Assert.java Wed Jul 05 20:44:51 2017 +0200
@@ -28,7 +28,7 @@
* @run main/othervm Assert
* @summary Test the assertion facility
* @author Mike McCloskey
- * @key randomness
+ * @key randomness intermittent
*/
import package1.*;
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh
--- a/jdk/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/instrument/BootClassPath/BootClassPathTest.sh Wed Jul 05 20:44:51 2017 +0200
@@ -26,6 +26,7 @@
# @summary Test non US-ASCII characters in the value of the Boot-Class-Path
# attribute.
#
+# @key intermittent
# @modules java.instrument
# @run shell/timeout=240 BootClassPathTest.sh
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/instrument/ManifestTest.sh
--- a/jdk/test/java/lang/instrument/ManifestTest.sh Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/instrument/ManifestTest.sh Wed Jul 05 20:44:51 2017 +0200
@@ -26,6 +26,7 @@
# @summary JLI JAR manifest processing should ignore leading and trailing white space.
# @author Daniel D. Daugherty
#
+# @key intermittent
# @modules java.instrument
# @run build ManifestTestApp ExampleForBootClassPath
# @run shell/timeout=900 ManifestTest.sh
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/instrument/PremainClass/InheritAgent0101.java
--- a/jdk/test/java/lang/instrument/PremainClass/InheritAgent0101.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/instrument/PremainClass/InheritAgent0101.java Wed Jul 05 20:44:51 2017 +0200
@@ -27,6 +27,7 @@
* @summary test config (0,1,0,1): inherited 1-arg and declared 1-arg in agent class
* @author Daniel D. Daugherty, Sun Microsystems
*
+ * @key intermittent
* @run shell ../MakeJAR3.sh InheritAgent0101
* @run main/othervm -javaagent:InheritAgent0101.jar DummyMain
*/
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/instrument/RedefineBigClass.sh
--- a/jdk/test/java/lang/instrument/RedefineBigClass.sh Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/instrument/RedefineBigClass.sh Wed Jul 05 20:44:51 2017 +0200
@@ -26,6 +26,7 @@
# @summary Redefine a big class.
# @author Daniel D. Daugherty
#
+# @key intermittent
# @modules java.instrument
# @run shell MakeJAR3.sh RedefineBigClassAgent 'Can-Redefine-Classes: true'
# @run build BigClass RedefineBigClassApp NMTHelper
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/instrument/RetransformBigClass.sh
--- a/jdk/test/java/lang/instrument/RetransformBigClass.sh Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/instrument/RetransformBigClass.sh Wed Jul 05 20:44:51 2017 +0200
@@ -26,6 +26,7 @@
# @summary Retransform a big class.
# @author Daniel D. Daugherty
#
+# @key intermittent
# @modules java.instrument
# @run shell MakeJAR4.sh RetransformBigClassAgent SimpleIdentityTransformer 'Can-Retransform-Classes: true'
# @run build BigClass RetransformBigClassApp NMTHelper
diff -r 51926b23f437 -r 620051149184 jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java
--- a/jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/lang/management/ThreadMXBean/AllThreadIds.java Wed Jul 05 20:44:51 2017 +0200
@@ -27,6 +27,7 @@
* @summary Basic unit test of ThreadMXBean.getAllThreadIds()
* @author Alexei Guibadoulline and Mandy Chung
*
+ * @key intermittent
* @modules java.management
* @run main/othervm AllThreadIds
*/
diff -r 51926b23f437 -r 620051149184 jdk/test/java/nio/Buffer/Basic.java
--- a/jdk/test/java/nio/Buffer/Basic.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/nio/Buffer/Basic.java Wed Jul 05 20:44:51 2017 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -25,7 +25,7 @@
* @summary Unit test for buffers
* @bug 4413135 4414911 4416536 4416562 4418782 4471053 4472779 4490253 4523725
* 4526177 4463011 4660660 4661219 4663521 4782970 4804304 4938424 6231529
- * 6221101 6234263 6535542 6591971 6593946 6795561 7190219 7199551
+ * 6221101 6234263 6535542 6591971 6593946 6795561 7190219 7199551 8065556
* @author Mark Reinhold
*/
diff -r 51926b23f437 -r 620051149184 jdk/test/java/nio/file/FileStore/Basic.java
--- a/jdk/test/java/nio/file/FileStore/Basic.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/nio/file/FileStore/Basic.java Wed Jul 05 20:44:51 2017 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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
@@ -116,9 +116,15 @@
store.type());
// check space attributes are accessible
- store.getTotalSpace();
- store.getUnallocatedSpace();
- store.getUsableSpace();
+ try {
+ store.getTotalSpace();
+ store.getUnallocatedSpace();
+ store.getUsableSpace();
+ } catch (NoSuchFileException nsfe) {
+ // ignore exception as the store could have been
+ // deleted since the iterator was instantiated
+ System.err.format("%s was not found\n", store);
+ }
// two distinct FileStores should not be equal
assertTrue(!store.equals(prev));
diff -r 51926b23f437 -r 620051149184 jdk/test/java/nio/file/Files/probeContentType/Basic.java
--- a/jdk/test/java/nio/file/Files/probeContentType/Basic.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/nio/file/Files/probeContentType/Basic.java Wed Jul 05 20:44:51 2017 +0200
@@ -22,7 +22,7 @@
*/
/* @test
- * @bug 4313887 8129632
+ * @bug 4313887 8129632 8129633
* @summary Unit test for probeContentType method
* @library ../..
* @build Basic SimpleFileTypeDetector
diff -r 51926b23f437 -r 620051149184 jdk/test/java/security/KeyStore/EntryMethods.java
--- a/jdk/test/java/security/KeyStore/EntryMethods.java Thu Aug 06 11:17:57 2015 -0700
+++ b/jdk/test/java/security/KeyStore/EntryMethods.java Wed Jul 05 20:44:51 2017 +0200
@@ -23,7 +23,7 @@
/*
* @test 1.5, 03/06/24
- * @bug 4850376
+ * @bug 4850376 8130850
* @summary Provide generic storage KeyStore storage facilities
*/
@@ -50,6 +50,20 @@
}
}
+ public static class MyLoadStoreParameter
+ implements KeyStore.LoadStoreParameter {
+
+ private KeyStore.ProtectionParameter protection;
+
+ MyLoadStoreParameter(KeyStore.ProtectionParameter protection) {
+ this.protection = protection;
+ }
+
+ public KeyStore.ProtectionParameter getProtectionParameter() {
+ return protection;
+ }
+ }
+
public static class FooEntry implements KeyStore.Entry { }
public EntryMethods() throws Exception {
@@ -103,9 +117,17 @@
throw new SecurityException("[Pre1.5] test " + tNum + " failed");
} catch (UnsupportedOperationException uoe) {
System.out.println("[Pre1.5] test " + tNum++ + " passed");
+ } catch (NoSuchAlgorithmException nsae) {
+ System.out.println("[Pre1.5] test " + tNum++ + " passed");
}
+ // TEST load custom param
+ ks.load(new MyLoadStoreParameter(
+ new KeyStore.PasswordProtection(password)));
+ System.out.println("[Pre1.5] test " + tNum++ + " passed");
+
+
// TEST store random param
ks.load(pre15fis, password);
diff -r 51926b23f437 -r 620051149184 jdk/test/java/security/testlibrary/CertificateBuilder.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/testlibrary/CertificateBuilder.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,539 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.testlibrary;
+
+import java.io.*;
+import java.util.*;
+import java.security.*;
+import java.security.cert.X509Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.Extension;
+import javax.security.auth.x500.X500Principal;
+import java.math.BigInteger;
+
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+import sun.security.util.ObjectIdentifier;
+import sun.security.x509.AccessDescription;
+import sun.security.x509.AlgorithmId;
+import sun.security.x509.AuthorityInfoAccessExtension;
+import sun.security.x509.AuthorityKeyIdentifierExtension;
+import sun.security.x509.SubjectKeyIdentifierExtension;
+import sun.security.x509.BasicConstraintsExtension;
+import sun.security.x509.ExtendedKeyUsageExtension;
+import sun.security.x509.DNSName;
+import sun.security.x509.GeneralName;
+import sun.security.x509.GeneralNames;
+import sun.security.x509.KeyUsageExtension;
+import sun.security.x509.SerialNumber;
+import sun.security.x509.SubjectAlternativeNameExtension;
+import sun.security.x509.URIName;
+import sun.security.x509.KeyIdentifier;
+
+/**
+ * Helper class that builds and signs X.509 certificates.
+ *
+ * A CertificateBuilder is created with a default constructor, and then
+ * uses additional public methods to set the public key, desired validity
+ * dates, serial number and extensions. It is expected that the caller will
+ * have generated the necessary key pairs prior to using a CertificateBuilder
+ * to generate certificates.
+ *
+ * The following methods are mandatory before calling build():
+ *
+ *
+ *
+ * Additionally, the caller can either provide a {@link List} of
+ * {@link Extension} objects, or use the helper classes to add specific
+ * extension types.
+ *
+ * When all required and desired parameters are set, the
+ * {@link #build(java.security.cert.X509Certificate, java.security.PrivateKey,
+ * java.lang.String)} method can be used to create the {@link X509Certificate}
+ * object.
+ *
+ * Multiple certificates may be cut from the same settings using subsequent
+ * calls to the build method. Settings may be cleared using the
+ * {@link #reset()} method.
+ */
+public class CertificateBuilder {
+ private final CertificateFactory factory;
+
+ private X500Principal subjectName = null;
+ private BigInteger serialNumber = null;
+ private PublicKey publicKey = null;
+ private Date notBefore = null;
+ private Date notAfter = null;
+ private final Map
+ * Certificate ::= SEQUENCE {
+ * tbsCertificate TBSCertificate,
+ * signatureAlgorithm AlgorithmIdentifier,
+ * signatureValue BIT STRING }
+ *
+ *
+ * @param issuerCert The certificate of the issuing authority, or
+ * {@code null} if the resulting certificate is self-signed.
+ * @param issuerKey The private key of the issuing authority
+ * @param signAlg The signature algorithm object
+ *
+ * @return The DER-encoded X.509 certificate
+ *
+ * @throws CertificateException If an error occurs during the
+ * signing process.
+ * @throws IOException if an encoding error occurs.
+ */
+ private byte[] encodeTopLevel(X509Certificate issuerCert,
+ PrivateKey issuerKey, AlgorithmId signAlg)
+ throws CertificateException, IOException {
+ DerOutputStream outerSeq = new DerOutputStream();
+ DerOutputStream topLevelItems = new DerOutputStream();
+
+ tbsCertBytes = encodeTbsCert(issuerCert, signAlg);
+ topLevelItems.write(tbsCertBytes);
+ try {
+ signatureBytes = signCert(issuerKey, signAlg);
+ } catch (GeneralSecurityException ge) {
+ throw new CertificateException(ge);
+ }
+ signAlg.derEncode(topLevelItems);
+ topLevelItems.putBitString(signatureBytes);
+ outerSeq.write(DerValue.tag_Sequence, topLevelItems);
+
+ return outerSeq.toByteArray();
+ }
+
+ /**
+ * Encode the bytes for the TBSCertificate structure:
+ *
+ * TBSCertificate ::= SEQUENCE {
+ * version [0] EXPLICIT Version DEFAULT v1,
+ * serialNumber CertificateSerialNumber,
+ * signature AlgorithmIdentifier,
+ * issuer Name,
+ * validity Validity,
+ * subject Name,
+ * subjectPublicKeyInfo SubjectPublicKeyInfo,
+ * issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
+ * -- If present, version MUST be v2 or v3
+ * subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
+ * -- If present, version MUST be v2 or v3
+ * extensions [3] EXPLICIT Extensions OPTIONAL
+ * -- If present, version MUST be v3
+ * }
+ *
+ * @param issuerCert The certificate of the issuing authority, or
+ * {@code null} if the resulting certificate is self-signed.
+ * @param signAlg The signature algorithm object
+ *
+ * @return The DER-encoded bytes for the TBSCertificate structure
+ *
+ * @throws IOException if an encoding error occurs.
+ */
+ private byte[] encodeTbsCert(X509Certificate issuerCert,
+ AlgorithmId signAlg) throws IOException {
+ DerOutputStream tbsCertSeq = new DerOutputStream();
+ DerOutputStream tbsCertItems = new DerOutputStream();
+
+ // Hardcode to V3
+ byte[] v3int = {0x02, 0x01, 0x02};
+ tbsCertItems.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
+ (byte)0), v3int);
+
+ // Serial Number
+ SerialNumber sn = new SerialNumber(serialNumber);
+ sn.encode(tbsCertItems);
+
+ // Algorithm ID
+ signAlg.derEncode(tbsCertItems);
+
+ // Issuer Name
+ if (issuerCert != null) {
+ tbsCertItems.write(
+ issuerCert.getSubjectX500Principal().getEncoded());
+ } else {
+ // Self-signed
+ tbsCertItems.write(subjectName.getEncoded());
+ }
+
+ // Validity period (set as UTCTime)
+ DerOutputStream valSeq = new DerOutputStream();
+ valSeq.putUTCTime(notBefore);
+ valSeq.putUTCTime(notAfter);
+ tbsCertItems.write(DerValue.tag_Sequence, valSeq);
+
+ // Subject Name
+ tbsCertItems.write(subjectName.getEncoded());
+
+ // SubjectPublicKeyInfo
+ tbsCertItems.write(publicKey.getEncoded());
+
+ // TODO: Extensions!
+ encodeExtensions(tbsCertItems);
+
+ // Wrap it all up in a SEQUENCE and return the bytes
+ tbsCertSeq.write(DerValue.tag_Sequence, tbsCertItems);
+ return tbsCertSeq.toByteArray();
+ }
+
+ /**
+ * Encode the extensions segment for an X.509 Certificate:
+ *
+ *
+ * Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
+ *
+ * Extension ::= SEQUENCE {
+ * extnID OBJECT IDENTIFIER,
+ * critical BOOLEAN DEFAULT FALSE,
+ * extnValue OCTET STRING
+ * -- contains the DER encoding of an ASN.1 value
+ * -- corresponding to the extension type identified
+ * -- by extnID
+ * }
+ *
+ *
+ * @param tbsStream The {@code DerOutputStream} that holds the
+ * TBSCertificate contents.
+ *
+ * @throws IOException if an encoding error occurs.
+ */
+ private void encodeExtensions(DerOutputStream tbsStream)
+ throws IOException {
+ DerOutputStream extSequence = new DerOutputStream();
+ DerOutputStream extItems = new DerOutputStream();
+
+ for (Extension ext : extensions.values()) {
+ ext.encode(extItems);
+ }
+ extSequence.write(DerValue.tag_Sequence, extItems);
+ tbsStream.write(DerValue.createTag(DerValue.TAG_CONTEXT, true,
+ (byte)3), extSequence);
+ }
+
+ /**
+ * Digitally sign the X.509 certificate.
+ *
+ * @param issuerKey The private key of the issuing authority
+ * @param signAlg The signature algorithm object
+ *
+ * @return The digital signature bytes.
+ *
+ * @throws GeneralSecurityException If any errors occur during the
+ * digital signature process.
+ */
+ private byte[] signCert(PrivateKey issuerKey, AlgorithmId signAlg)
+ throws GeneralSecurityException {
+ Signature sig = Signature.getInstance(signAlg.getName());
+ sig.initSign(issuerKey);
+ sig.update(tbsCertBytes);
+ return sig.sign();
+ }
+ }
diff -r 51926b23f437 -r 620051149184 jdk/test/java/security/testlibrary/SimpleOCSPServer.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/security/testlibrary/SimpleOCSPServer.java Wed Jul 05 20:44:51 2017 +0200
@@ -0,0 +1,1540 @@
+/*
+ * Copyright (c) 2015, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.security.testlibrary;
+
+import java.io.*;
+import java.net.*;
+import java.security.*;
+import java.security.cert.CRLReason;
+import java.security.cert.X509Certificate;
+import java.security.cert.Extension;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateEncodingException;
+import java.security.Signature;
+import java.util.*;
+import java.util.concurrent.*;
+import java.text.SimpleDateFormat;
+import java.math.BigInteger;
+
+import sun.security.x509.*;
+import sun.security.x509.PKIXExtensions;
+import sun.security.provider.certpath.ResponderId;
+import sun.security.provider.certpath.CertId;
+import sun.security.provider.certpath.OCSPResponse;
+import sun.security.provider.certpath.OCSPResponse.ResponseStatus;
+import sun.security.util.Debug;
+import sun.security.util.DerInputStream;
+import sun.security.util.DerOutputStream;
+import sun.security.util.DerValue;
+import sun.security.util.ObjectIdentifier;
+
+
+/**
+ * This is a simple OCSP server designed to listen and respond to incoming
+ * requests.
+ */
+public class SimpleOCSPServer {
+ private final Debug debug = Debug.getInstance("oserv");
+ private static final ObjectIdentifier OCSP_BASIC_RESPONSE_OID =
+ ObjectIdentifier.newInternal(
+ new int[] { 1, 3, 6, 1, 5, 5, 7, 48, 1, 1});
+ private static final SimpleDateFormat utcDateFmt =
+ new SimpleDateFormat("MMM dd yyyy, HH:mm:ss z");
+
+ // CertStatus values
+ public static enum CertStatus {
+ CERT_STATUS_GOOD,
+ CERT_STATUS_REVOKED,
+ CERT_STATUS_UNKNOWN,
+ }
+
+ // Fields used for the networking portion of the responder
+ private ServerSocket servSocket;
+ private InetAddress listenAddress;
+ private int listenPort;
+
+ // Keystore information (certs, keys, etc.)
+ private KeyStore keystore;
+ private X509Certificate issuerCert;
+ private X509Certificate signerCert;
+ private PrivateKey signerKey;
+
+ // Fields used for the operational portions of the server
+ private boolean logEnabled = false;
+ private ExecutorService threadPool;
+ private volatile boolean started = false;
+ private volatile boolean receivedShutdown = false;
+ private long delayMsec = 0;
+
+ // Fields used in the generation of responses
+ private long nextUpdateInterval = -1;
+ private Date nextUpdate = null;
+ private ResponderId respId;
+ private AlgorithmId sigAlgId;
+ private MapWeb Page!
\n";
+ private static final SimpleDateFormat utcDateFmt =
+ new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss z");
+ /*
+ * If the client or server is doing some kind of object creation
+ * that the other side depends on, and that thread prematurely
+ * exits, you may experience a hang. The test harness will
+ * terminate all hung threads after its timeout has expired,
+ * currently 3 minutes by default, but you might try to be
+ * smart about it....
+ */
+ public static void main(String[] args) throws Exception {
+ if (debug) {
+ System.setProperty("javax.net.debug", "ssl");
+ }
+
+ System.setProperty("javax.net.ssl.keyStore", "");
+ System.setProperty("javax.net.ssl.keyStorePassword", "");
+ System.setProperty("javax.net.ssl.trustStore", "");
+ System.setProperty("javax.net.ssl.trustStorePassword", "");
+
+ // Create the PKI we will use for the test and start the OCSP servers
+ createPKI();
+ utcDateFmt.setTimeZone(TimeZone.getTimeZone("GMT"));
+
+ testPKIXParametersRevEnabled();
+
+ // shut down the OCSP responders before finishing the test
+ intOcsp.stop();
+ rootOcsp.stop();
+ }
+
+ /**
+ * Do a basic connection using PKIXParameters with revocation checking
+ * enabled and client-side OCSP disabled. It will only pass if all
+ * stapled responses are present, valid and have a GOOD status.
+ */
+ static void testPKIXParametersRevEnabled() throws Exception {
+ ClientParameters cliParams = new ClientParameters();
+ ServerParameters servParams = new ServerParameters();
+ serverReady = false;
+
+ System.out.println("=====================================");
+ System.out.println("Stapling enabled, PKIXParameters with");
+ System.out.println("Revocation checking enabled ");
+ System.out.println("=====================================");
+
+ // Set the certificate entry in the intermediate OCSP responder
+ // with a revocation date of 8 hours ago.
+ X509Certificate sslCert =
+ (X509Certificate)serverKeystore.getCertificate(SSL_ALIAS);
+ Map