提交 69b1fb5c 编写于 作者: A alanb

8016217: More javadoc warnings

Reviewed-by: lancea, chegar, psandoz
上级 e02f15e3
...@@ -185,7 +185,7 @@ class BufferedInputStream extends FilterInputStream { ...@@ -185,7 +185,7 @@ class BufferedInputStream extends FilterInputStream {
* *
* @param in the underlying input stream. * @param in the underlying input stream.
* @param size the buffer size. * @param size the buffer size.
* @exception IllegalArgumentException if size <= 0. * @exception IllegalArgumentException if {@code size <= 0}.
*/ */
public BufferedInputStream(InputStream in, int size) { public BufferedInputStream(InputStream in, int size) {
super(in); super(in);
......
...@@ -95,7 +95,7 @@ public class BufferedReader extends Reader { ...@@ -95,7 +95,7 @@ public class BufferedReader extends Reader {
* @param in A Reader * @param in A Reader
* @param sz Input-buffer size * @param sz Input-buffer size
* *
* @exception IllegalArgumentException If sz is <= 0 * @exception IllegalArgumentException If {@code sz <= 0}
*/ */
public BufferedReader(Reader in, int sz) { public BufferedReader(Reader in, int sz) {
super(in); super(in);
...@@ -484,7 +484,7 @@ public class BufferedReader extends Reader { ...@@ -484,7 +484,7 @@ public class BufferedReader extends Reader {
* whose size is no smaller than limit. * whose size is no smaller than limit.
* Therefore large values should be used with care. * Therefore large values should be used with care.
* *
* @exception IllegalArgumentException If readAheadLimit is < 0 * @exception IllegalArgumentException If {@code readAheadLimit < 0}
* @exception IOException If an I/O error occurs * @exception IOException If an I/O error occurs
*/ */
public void mark(int readAheadLimit) throws IOException { public void mark(int readAheadLimit) throws IOException {
......
...@@ -95,7 +95,7 @@ public class BufferedWriter extends Writer { ...@@ -95,7 +95,7 @@ public class BufferedWriter extends Writer {
* @param out A Writer * @param out A Writer
* @param sz Output-buffer size, a positive integer * @param sz Output-buffer size, a positive integer
* *
* @exception IllegalArgumentException If sz is <= 0 * @exception IllegalArgumentException If {@code sz <= 0}
*/ */
public BufferedWriter(Writer out, int sz) { public BufferedWriter(Writer out, int sz) {
super(out); super(out);
......
...@@ -75,7 +75,7 @@ import sun.nio.cs.StreamEncoder; ...@@ -75,7 +75,7 @@ import sun.nio.cs.StreamEncoder;
* manually zero the returned character array after processing to minimize the * manually zero the returned character array after processing to minimize the
* lifetime of sensitive data in memory. * lifetime of sensitive data in memory.
* *
* <blockquote><pre> * <blockquote><pre>{@code
* Console cons; * Console cons;
* char[] passwd; * char[] passwd;
* if ((cons = System.console()) != null && * if ((cons = System.console()) != null &&
...@@ -83,7 +83,7 @@ import sun.nio.cs.StreamEncoder; ...@@ -83,7 +83,7 @@ import sun.nio.cs.StreamEncoder;
* ... * ...
* java.util.Arrays.fill(passwd, ' '); * java.util.Arrays.fill(passwd, ' ');
* } * }
* </pre></blockquote> * }</pre></blockquote>
* *
* @author Xueming Shen * @author Xueming Shen
* @since 1.6 * @since 1.6
......
...@@ -117,7 +117,7 @@ public class PipedInputStream extends InputStream { ...@@ -117,7 +117,7 @@ public class PipedInputStream extends InputStream {
* @param src the stream to connect to. * @param src the stream to connect to.
* @param pipeSize the size of the pipe's buffer. * @param pipeSize the size of the pipe's buffer.
* @exception IOException if an I/O error occurs. * @exception IOException if an I/O error occurs.
* @exception IllegalArgumentException if <code>pipeSize <= 0</code>. * @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6 * @since 1.6
*/ */
public PipedInputStream(PipedOutputStream src, int pipeSize) public PipedInputStream(PipedOutputStream src, int pipeSize)
...@@ -147,7 +147,7 @@ public class PipedInputStream extends InputStream { ...@@ -147,7 +147,7 @@ public class PipedInputStream extends InputStream {
* connected} to a <code>PipedOutputStream</code> before being used. * connected} to a <code>PipedOutputStream</code> before being used.
* *
* @param pipeSize the size of the pipe's buffer. * @param pipeSize the size of the pipe's buffer.
* @exception IllegalArgumentException if <code>pipeSize <= 0</code>. * @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6 * @since 1.6
*/ */
public PipedInputStream(int pipeSize) { public PipedInputStream(int pipeSize) {
......
...@@ -91,7 +91,7 @@ public class PipedReader extends Reader { ...@@ -91,7 +91,7 @@ public class PipedReader extends Reader {
* @param src the stream to connect to. * @param src the stream to connect to.
* @param pipeSize the size of the pipe's buffer. * @param pipeSize the size of the pipe's buffer.
* @exception IOException if an I/O error occurs. * @exception IOException if an I/O error occurs.
* @exception IllegalArgumentException if <code>pipeSize <= 0</code>. * @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6 * @since 1.6
*/ */
public PipedReader(PipedWriter src, int pipeSize) throws IOException { public PipedReader(PipedWriter src, int pipeSize) throws IOException {
...@@ -120,7 +120,7 @@ public class PipedReader extends Reader { ...@@ -120,7 +120,7 @@ public class PipedReader extends Reader {
* before being used. * before being used.
* *
* @param pipeSize the size of the pipe's buffer. * @param pipeSize the size of the pipe's buffer.
* @exception IllegalArgumentException if <code>pipeSize <= 0</code>. * @exception IllegalArgumentException if {@code pipeSize <= 0}.
* @since 1.6 * @since 1.6
*/ */
public PipedReader(int pipeSize) { public PipedReader(int pipeSize) {
......
...@@ -851,7 +851,7 @@ public class PrintStream extends FilterOutputStream ...@@ -851,7 +851,7 @@ public class PrintStream extends FilterOutputStream
* <tt>null</tt> argument depends on the <a * <tt>null</tt> argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws IllegalFormatException * @throws java.util.IllegalFormatException
* If a format string contains an illegal syntax, a format * If a format string contains an illegal syntax, a format
* specifier that is incompatible with the given arguments, * specifier that is incompatible with the given arguments,
* insufficient arguments given the format string, or other * insufficient arguments given the format string, or other
...@@ -901,7 +901,7 @@ public class PrintStream extends FilterOutputStream ...@@ -901,7 +901,7 @@ public class PrintStream extends FilterOutputStream
* <tt>null</tt> argument depends on the <a * <tt>null</tt> argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws IllegalFormatException * @throws java.util.IllegalFormatException
* If a format string contains an illegal syntax, a format * If a format string contains an illegal syntax, a format
* specifier that is incompatible with the given arguments, * specifier that is incompatible with the given arguments,
* insufficient arguments given the format string, or other * insufficient arguments given the format string, or other
...@@ -944,7 +944,7 @@ public class PrintStream extends FilterOutputStream ...@@ -944,7 +944,7 @@ public class PrintStream extends FilterOutputStream
* <tt>null</tt> argument depends on the <a * <tt>null</tt> argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws IllegalFormatException * @throws java.util.IllegalFormatException
* If a format string contains an illegal syntax, a format * If a format string contains an illegal syntax, a format
* specifier that is incompatible with the given arguments, * specifier that is incompatible with the given arguments,
* insufficient arguments given the format string, or other * insufficient arguments given the format string, or other
...@@ -1001,7 +1001,7 @@ public class PrintStream extends FilterOutputStream ...@@ -1001,7 +1001,7 @@ public class PrintStream extends FilterOutputStream
* <tt>null</tt> argument depends on the <a * <tt>null</tt> argument depends on the <a
* href="../util/Formatter.html#syntax">conversion</a>. * href="../util/Formatter.html#syntax">conversion</a>.
* *
* @throws IllegalFormatException * @throws java.util.IllegalFormatException
* If a format string contains an illegal syntax, a format * If a format string contains an illegal syntax, a format
* specifier that is incompatible with the given arguments, * specifier that is incompatible with the given arguments,
* insufficient arguments given the format string, or other * insufficient arguments given the format string, or other
......
...@@ -85,7 +85,7 @@ class PushbackInputStream extends FilterInputStream { ...@@ -85,7 +85,7 @@ class PushbackInputStream extends FilterInputStream {
* *
* @param in the input stream from which bytes will be read. * @param in the input stream from which bytes will be read.
* @param size the size of the pushback buffer. * @param size the size of the pushback buffer.
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
* @since JDK1.1 * @since JDK1.1
*/ */
public PushbackInputStream(InputStream in, int size) { public PushbackInputStream(InputStream in, int size) {
......
...@@ -47,7 +47,7 @@ public class PushbackReader extends FilterReader { ...@@ -47,7 +47,7 @@ public class PushbackReader extends FilterReader {
* *
* @param in The reader from which characters will be read * @param in The reader from which characters will be read
* @param size The size of the pushback buffer * @param size The size of the pushback buffer
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
*/ */
public PushbackReader(Reader in, int size) { public PushbackReader(Reader in, int size) {
super(in); super(in);
......
...@@ -163,7 +163,7 @@ public class StringReader extends Reader { ...@@ -163,7 +163,7 @@ public class StringReader extends Reader {
* is no actual limit, so this argument must not * is no actual limit, so this argument must not
* be negative, but is otherwise ignored. * be negative, but is otherwise ignored.
* *
* @exception IllegalArgumentException If readAheadLimit is < 0 * @exception IllegalArgumentException If {@code readAheadLimit < 0}
* @exception IOException If an I/O error occurs * @exception IOException If an I/O error occurs
*/ */
public void mark(int readAheadLimit) throws IOException { public void mark(int readAheadLimit) throws IOException {
......
...@@ -4782,9 +4782,9 @@ class Character implements java.io.Serializable, Comparable<Character> { ...@@ -4782,9 +4782,9 @@ class Character implements java.io.Serializable, Comparable<Character> {
* Unicode surrogate pair</a>. * Unicode surrogate pair</a>.
* <p>This method is equivalent to the expression: * <p>This method is equivalent to the expression:
* <blockquote><pre> * <blockquote><pre>{@code
* isHighSurrogate(high) && isLowSurrogate(low) * isHighSurrogate(high) && isLowSurrogate(low)
* </pre></blockquote> * }</pre></blockquote>
* *
* @param high the high-surrogate code value to be tested * @param high the high-surrogate code value to be tested
* @param low the low-surrogate code value to be tested * @param low the low-surrogate code value to be tested
......
...@@ -702,7 +702,7 @@ public abstract class ClassLoader { ...@@ -702,7 +702,7 @@ public abstract class ClassLoader {
* bootstrap class loader. If <tt>name</tt> is not <tt>null</tt>, it * bootstrap class loader. If <tt>name</tt> is not <tt>null</tt>, it
* must be equal to the <a href="#name">binary name</a> of the class * must be equal to the <a href="#name">binary name</a> of the class
* specified by the byte array "<tt>b</tt>", otherwise a {@link * specified by the byte array "<tt>b</tt>", otherwise a {@link
* <tt>NoClassDefFoundError</tt>} will be thrown. </p> * NoClassDefFoundError <tt>NoClassDefFoundError</tt>} will be thrown. </p>
* *
* @param name * @param name
* The expected <a href="#name">binary name</a> of the class, or * The expected <a href="#name">binary name</a> of the class, or
......
...@@ -56,7 +56,7 @@ import java.util.*; ...@@ -56,7 +56,7 @@ import java.util.*;
* method.<p> * method.<p>
* *
* For example, if one adds two keys <tt>a</tt> and <tt>b</tt> such that * For example, if one adds two keys <tt>a</tt> and <tt>b</tt> such that
* <tt>(!a.equals(b) && a.compareTo(b) == 0)</tt> to a sorted * {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted
* set that does not use an explicit comparator, the second <tt>add</tt> * set that does not use an explicit comparator, the second <tt>add</tt>
* operation returns false (and the size of the sorted set does not increase) * operation returns false (and the size of the sorted set does not increase)
* because <tt>a</tt> and <tt>b</tt> are equivalent from the sorted set's * because <tt>a</tt> and <tt>b</tt> are equivalent from the sorted set's
......
...@@ -917,13 +917,13 @@ public final class Double extends Number implements Comparable<Double> { ...@@ -917,13 +917,13 @@ public final class Double extends Number implements Comparable<Double> {
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three * <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
* values that can be computed from the argument: * values that can be computed from the argument:
* *
* <blockquote><pre> * <blockquote><pre>{@code
* int s = ((bits &gt;&gt; 63) == 0) ? 1 : -1; * int s = ((bits >> 63) == 0) ? 1 : -1;
* int e = (int)((bits &gt;&gt; 52) & 0x7ffL); * int e = (int)((bits >> 52) & 0x7ffL);
* long m = (e == 0) ? * long m = (e == 0) ?
* (bits & 0xfffffffffffffL) &lt;&lt; 1 : * (bits & 0xfffffffffffffL) << 1 :
* (bits & 0xfffffffffffffL) | 0x10000000000000L; * (bits & 0xfffffffffffffL) | 0x10000000000000L;
* </pre></blockquote> * }</pre></blockquote>
* *
* Then the floating-point result equals the value of the mathematical * Then the floating-point result equals the value of the mathematical
* expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-1075</sup>. * expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-1075</sup>.
......
...@@ -821,13 +821,13 @@ public final class Float extends Number implements Comparable<Float> { ...@@ -821,13 +821,13 @@ public final class Float extends Number implements Comparable<Float> {
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three * <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
* values that can be computed from the argument: * values that can be computed from the argument:
* *
* <blockquote><pre> * <blockquote><pre>{@code
* int s = ((bits &gt;&gt; 31) == 0) ? 1 : -1; * int s = ((bits >> 31) == 0) ? 1 : -1;
* int e = ((bits &gt;&gt; 23) & 0xff); * int e = ((bits >> 23) & 0xff);
* int m = (e == 0) ? * int m = (e == 0) ?
* (bits & 0x7fffff) &lt;&lt; 1 : * (bits & 0x7fffff) << 1 :
* (bits & 0x7fffff) | 0x800000; * (bits & 0x7fffff) | 0x800000;
* </pre></blockquote> * }</pre></blockquote>
* *
* Then the floating-point result equals the value of the mathematical * Then the floating-point result equals the value of the mathematical
* expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-150</sup>. * expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-150</sup>.
......
...@@ -181,12 +181,12 @@ public final class StackTraceElement implements java.io.Serializable { ...@@ -181,12 +181,12 @@ public final class StackTraceElement implements java.io.Serializable {
* {@code StackTraceElement} instance representing the same execution * {@code StackTraceElement} instance representing the same execution
* point as this instance. Two stack trace elements {@code a} and * point as this instance. Two stack trace elements {@code a} and
* {@code b} are equal if and only if: * {@code b} are equal if and only if:
* <pre> * <pre>{@code
* equals(a.getFileName(), b.getFileName()) && * equals(a.getFileName(), b.getFileName()) &&
* a.getLineNumber() == b.getLineNumber()) && * a.getLineNumber() == b.getLineNumber()) &&
* equals(a.getClassName(), b.getClassName()) && * equals(a.getClassName(), b.getClassName()) &&
* equals(a.getMethodName(), b.getMethodName()) * equals(a.getMethodName(), b.getMethodName())
* </pre> * }</pre>
* where {@code equals} has the semantics of {@link * where {@code equals} has the semantics of {@link
* java.util.Objects#equals(Object, Object) Objects.equals}. * java.util.Objects#equals(Object, Object) Objects.equals}.
* *
......
...@@ -593,24 +593,28 @@ public interface Instrumentation { ...@@ -593,24 +593,28 @@ public interface Instrumentation {
* and the normal automatic resolution. For * and the normal automatic resolution. For
* <code>RegisterNatives</code>, the JVM will attempt this * <code>RegisterNatives</code>, the JVM will attempt this
* association: * association:
* <pre> * <pre>{@code
* method(foo) -> nativeImplementation(foo)</pre> * method(foo) -> nativeImplementation(foo)
* }</pre>
* <p/> * <p/>
* When this fails, the resolution will be retried with * When this fails, the resolution will be retried with
* the specified prefix prepended to the method name, * the specified prefix prepended to the method name,
* yielding the correct resolution: * yielding the correct resolution:
* <pre> * <pre>{@code
* method(wrapped_foo) -> nativeImplementation(foo)</pre> * method(wrapped_foo) -> nativeImplementation(foo)
* }</pre>
* <p/> * <p/>
* For automatic resolution, the JVM will attempt: * For automatic resolution, the JVM will attempt:
* <pre> * <pre>{@code
* method(wrapped_foo) -> nativeImplementation(wrapped_foo)</pre> * method(wrapped_foo) -> nativeImplementation(wrapped_foo)
* }</pre>
* <p/> * <p/>
* When this fails, the resolution will be retried with * When this fails, the resolution will be retried with
* the specified prefix deleted from the implementation name, * the specified prefix deleted from the implementation name,
* yielding the correct resolution: * yielding the correct resolution:
* <pre> * <pre>{@code
* method(wrapped_foo) -> nativeImplementation(foo)</pre> * method(wrapped_foo) -> nativeImplementation(foo)
* }</pre>
* <p/> * <p/>
* Note that since the prefix is only used when standard * Note that since the prefix is only used when standard
* resolution fails, native methods can be wrapped selectively. * resolution fails, native methods can be wrapped selectively.
......
...@@ -251,7 +251,7 @@ import java.util.logging.Logger; ...@@ -251,7 +251,7 @@ import java.util.logging.Logger;
* *
* <h3>Usage examples</h3> * <h3>Usage examples</h3>
* Here are some examples of usage: * Here are some examples of usage:
* <p><blockquote><pre> * <p><blockquote><pre>{@code
Object x, y; String s; int i; Object x, y; String s; int i;
MethodType mt; MethodHandle mh; MethodType mt; MethodHandle mh;
MethodHandles.Lookup lookup = MethodHandles.lookup(); MethodHandles.Lookup lookup = MethodHandles.lookup();
...@@ -287,7 +287,7 @@ mt = MethodType.methodType(void.class, String.class); ...@@ -287,7 +287,7 @@ mt = MethodType.methodType(void.class, String.class);
mh = lookup.findVirtual(java.io.PrintStream.class, "println", mt); mh = lookup.findVirtual(java.io.PrintStream.class, "println", mt);
mh.invokeExact(System.out, "Hello, world."); mh.invokeExact(System.out, "Hello, world.");
// invokeExact(Ljava/io/PrintStream;Ljava/lang/String;)V // invokeExact(Ljava/io/PrintStream;Ljava/lang/String;)V
* </pre></blockquote> * }</pre></blockquote>
* Each of the above calls to {@code invokeExact} or plain {@code invoke} * Each of the above calls to {@code invokeExact} or plain {@code invoke}
* generates a single invokevirtual instruction with * generates a single invokevirtual instruction with
* the symbolic type descriptor indicated in the following comment. * the symbolic type descriptor indicated in the following comment.
...@@ -754,7 +754,7 @@ public abstract class MethodHandle { ...@@ -754,7 +754,7 @@ public abstract class MethodHandle {
* (The array may also be null when zero elements are required.) * (The array may also be null when zero elements are required.)
* <p> * <p>
* Here are some simple examples of array-spreading method handles: * Here are some simple examples of array-spreading method handles:
* <blockquote><pre> * <blockquote><pre>{@code
MethodHandle equals = publicLookup() MethodHandle equals = publicLookup()
.findVirtual(String.class, "equals", methodType(boolean.class, Object.class)); .findVirtual(String.class, "equals", methodType(boolean.class, Object.class));
assert( (boolean) equals.invokeExact("me", (Object)"me")); assert( (boolean) equals.invokeExact("me", (Object)"me"));
...@@ -790,7 +790,7 @@ MethodHandle caString3 = caToString.asCollector(char[].class, 3); ...@@ -790,7 +790,7 @@ MethodHandle caString3 = caToString.asCollector(char[].class, 3);
assertEquals("[A, B, C]", (String) caString3.invokeExact('A', 'B', 'C')); assertEquals("[A, B, C]", (String) caString3.invokeExact('A', 'B', 'C'));
MethodHandle caToString2 = caString3.asSpreader(char[].class, 2); MethodHandle caToString2 = caString3.asSpreader(char[].class, 2);
assertEquals("[A, B, C]", (String) caToString2.invokeExact('A', "BC".toCharArray())); assertEquals("[A, B, C]", (String) caToString2.invokeExact('A', "BC".toCharArray()));
* </pre></blockquote> * }</pre></blockquote>
* @param arrayType usually {@code Object[]}, the type of the array argument from which to extract the spread arguments * @param arrayType usually {@code Object[]}, the type of the array argument from which to extract the spread arguments
* @param arrayLength the number of arguments to spread from an incoming array argument * @param arrayLength the number of arguments to spread from an incoming array argument
* @return a new method handle which spreads its final array argument, * @return a new method handle which spreads its final array argument,
...@@ -878,7 +878,7 @@ assertEquals("[A, B, C]", (String) caToString2.invokeExact('A', "BC".toCharArray ...@@ -878,7 +878,7 @@ assertEquals("[A, B, C]", (String) caToString2.invokeExact('A', "BC".toCharArray
* number of collected arguments, use {@link #asVarargsCollector asVarargsCollector} instead. * number of collected arguments, use {@link #asVarargsCollector asVarargsCollector} instead.
* <p> * <p>
* Here are some examples of array-collecting method handles: * Here are some examples of array-collecting method handles:
* <blockquote><pre> * <blockquote><pre>{@code
MethodHandle deepToString = publicLookup() MethodHandle deepToString = publicLookup()
.findStatic(Arrays.class, "deepToString", methodType(String.class, Object[].class)); .findStatic(Arrays.class, "deepToString", methodType(String.class, Object[].class));
assertEquals("[won]", (String) deepToString.invokeExact(new Object[]{"won"})); assertEquals("[won]", (String) deepToString.invokeExact(new Object[]{"won"}));
...@@ -904,7 +904,7 @@ MethodHandle longsToString = publicLookup() ...@@ -904,7 +904,7 @@ MethodHandle longsToString = publicLookup()
.findStatic(Arrays.class, "toString", methodType(String.class, long[].class)) .findStatic(Arrays.class, "toString", methodType(String.class, long[].class))
.asCollector(long[].class, 1); .asCollector(long[].class, 1);
assertEquals("[123]", (String) longsToString.invokeExact((long)123)); assertEquals("[123]", (String) longsToString.invokeExact((long)123));
* </pre></blockquote> * }</pre></blockquote>
* @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments * @param arrayType often {@code Object[]}, the type of the array argument which will collect the arguments
* @param arrayLength the number of arguments to collect into a new array argument * @param arrayLength the number of arguments to collect into a new array argument
* @return a new method handle which collects some trailing argument * @return a new method handle which collects some trailing argument
...@@ -1041,7 +1041,7 @@ assertEquals("[123]", (String) longsToString.invokeExact((long)123)); ...@@ -1041,7 +1041,7 @@ assertEquals("[123]", (String) longsToString.invokeExact((long)123));
* It may (or may not) return the original variable arity method handle. * It may (or may not) return the original variable arity method handle.
* <p> * <p>
* Here is an example, of a list-making variable arity method handle: * Here is an example, of a list-making variable arity method handle:
* <blockquote><pre> * <blockquote><pre>{@code
MethodHandle deepToString = publicLookup() MethodHandle deepToString = publicLookup()
.findStatic(Arrays.class, "deepToString", methodType(String.class, Object[].class)); .findStatic(Arrays.class, "deepToString", methodType(String.class, Object[].class));
MethodHandle ts1 = deepToString.asVarargsCollector(Object[].class); MethodHandle ts1 = deepToString.asVarargsCollector(Object[].class);
...@@ -1063,7 +1063,7 @@ assertEquals("[three, thee, tee]", asList.invoke((Object[])argv).toString()); ...@@ -1063,7 +1063,7 @@ assertEquals("[three, thee, tee]", asList.invoke((Object[])argv).toString());
List ls = (List) asList.invoke((Object)argv); List ls = (List) asList.invoke((Object)argv);
assertEquals(1, ls.size()); assertEquals(1, ls.size());
assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0))); assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0)));
* </pre></blockquote> * }</pre></blockquote>
* <p style="font-size:smaller;"> * <p style="font-size:smaller;">
* <em>Discussion:</em> * <em>Discussion:</em>
* These rules are designed as a dynamically-typed variation * These rules are designed as a dynamically-typed variation
...@@ -1134,7 +1134,7 @@ assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0))); ...@@ -1134,7 +1134,7 @@ assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0)));
* a previous argument to {@code asVarargsCollector}. * a previous argument to {@code asVarargsCollector}.
* <p> * <p>
* Here is an example, of a list-making variable arity method handle: * Here is an example, of a list-making variable arity method handle:
* <blockquote><pre> * <blockquote><pre>{@code
MethodHandle asListVar = publicLookup() MethodHandle asListVar = publicLookup()
.findStatic(Arrays.class, "asList", methodType(List.class, Object[].class)) .findStatic(Arrays.class, "asList", methodType(List.class, Object[].class))
.asVarargsCollector(Object[].class); .asVarargsCollector(Object[].class);
...@@ -1153,7 +1153,7 @@ assertEquals("[three, thee, tee]", asListVar.invoke(argv).toString()); ...@@ -1153,7 +1153,7 @@ assertEquals("[three, thee, tee]", asListVar.invoke(argv).toString());
assertEquals("[three, thee, tee]", asListFix.invoke(argv).toString()); assertEquals("[three, thee, tee]", asListFix.invoke(argv).toString());
assertEquals(1, ((List) asListVar.invoke((Object)argv)).size()); assertEquals(1, ((List) asListVar.invoke((Object)argv)).size());
assertEquals("[three, thee, tee]", asListFix.invoke((Object)argv).toString()); assertEquals("[three, thee, tee]", asListFix.invoke((Object)argv).toString());
* </pre></blockquote> * }</pre></blockquote>
* *
* @return a new method handle which accepts only a fixed number of arguments * @return a new method handle which accepts only a fixed number of arguments
* @see #asVarargsCollector * @see #asVarargsCollector
......
...@@ -1593,7 +1593,7 @@ publicLookup().findVirtual(MethodHandle.class, "invoke", type) ...@@ -1593,7 +1593,7 @@ publicLookup().findVirtual(MethodHandle.class, "invoke", type)
* As in the case of {@link #dropArguments(MethodHandle,int,List) dropArguments}, * As in the case of {@link #dropArguments(MethodHandle,int,List) dropArguments},
* incoming arguments which are not mentioned in the reordering array * incoming arguments which are not mentioned in the reordering array
* are may be any type, as determined only by {@code newType}. * are may be any type, as determined only by {@code newType}.
* <blockquote><pre> * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*; import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*; import static java.lang.invoke.MethodType.*;
... ...
...@@ -1609,7 +1609,7 @@ assert(add.type().equals(intfn2)); ...@@ -1609,7 +1609,7 @@ assert(add.type().equals(intfn2));
MethodHandle twice = permuteArguments(add, intfn1, 0, 0); MethodHandle twice = permuteArguments(add, intfn1, 0, 0);
assert(twice.type().equals(intfn1)); assert(twice.type().equals(intfn1));
assert((int)twice.invokeExact(21) == 42); assert((int)twice.invokeExact(21) == 42);
* </pre></blockquote> * }</pre></blockquote>
* @param target the method handle to invoke after arguments are reordered * @param target the method handle to invoke after arguments are reordered
* @param newType the expected type of the new method handle * @param newType the expected type of the new method handle
* @param reorder an index array which controls the reordering * @param reorder an index array which controls the reordering
......
...@@ -72,8 +72,8 @@ import sun.management.MemoryUsageCompositeData; ...@@ -72,8 +72,8 @@ import sun.management.MemoryUsageCompositeData;
* The amount of used and committed memory will always be less than * The amount of used and committed memory will always be less than
* or equal to <tt>max</tt> if <tt>max</tt> is defined. * or equal to <tt>max</tt> if <tt>max</tt> is defined.
* A memory allocation may fail if it attempts to increase the * A memory allocation may fail if it attempts to increase the
* used memory such that <tt>used &gt committed</tt> even * used memory such that <tt>used &gt; committed</tt> even
* if <tt>used &lt= max</tt> would still be true (for example, * if <tt>used &lt;= max</tt> would still be true (for example,
* when the system is low on virtual memory). * when the system is low on virtual memory).
* </td> * </td>
* </tr> * </tr>
......
...@@ -308,7 +308,7 @@ public interface RuntimeMXBean extends PlatformManagedObject { ...@@ -308,7 +308,7 @@ public interface RuntimeMXBean extends PlatformManagedObject {
* *
* <p> * <p>
* <b>MBeanServer access</b>:<br> * <b>MBeanServer access</b>:<br>
* The mapped type of <tt>Map<String,String></tt> is * The mapped type of {@code Map<String,String>} is
* {@link javax.management.openmbean.TabularData TabularData} * {@link javax.management.openmbean.TabularData TabularData}
* with two items in each row as follows: * with two items in each row as follows:
* <blockquote> * <blockquote>
......
...@@ -198,7 +198,7 @@ public interface ThreadMXBean extends PlatformManagedObject { ...@@ -198,7 +198,7 @@ public interface ThreadMXBean extends PlatformManagedObject {
* <tt>null</tt> if the thread of the given ID is not alive or * <tt>null</tt> if the thread of the given ID is not alive or
* it does not exist. * it does not exist.
* *
* @throws IllegalArgumentException if <tt>id &lt= 0</tt>. * @throws IllegalArgumentException if {@code id <= 0}.
* @throws java.lang.SecurityException if a security manager * @throws java.lang.SecurityException if a security manager
* exists and the caller does not have * exists and the caller does not have
* ManagementPermission("monitor"). * ManagementPermission("monitor").
...@@ -236,7 +236,7 @@ public interface ThreadMXBean extends PlatformManagedObject { ...@@ -236,7 +236,7 @@ public interface ThreadMXBean extends PlatformManagedObject {
* with no stack trace, no locked monitor and no synchronizer info. * with no stack trace, no locked monitor and no synchronizer info.
* *
* @throws IllegalArgumentException if any element in the input array * @throws IllegalArgumentException if any element in the input array
* <tt>ids</tt> is <tt>&lt= 0</tt>. * <tt>ids</tt> is {@code <= 0}.
* @throws java.lang.SecurityException if a security manager * @throws java.lang.SecurityException if a security manager
* exists and the caller does not have * exists and the caller does not have
* ManagementPermission("monitor"). * ManagementPermission("monitor").
...@@ -282,7 +282,7 @@ public interface ThreadMXBean extends PlatformManagedObject { ...@@ -282,7 +282,7 @@ public interface ThreadMXBean extends PlatformManagedObject {
* <tt>null</tt> if the thread of the given ID is not alive or * <tt>null</tt> if the thread of the given ID is not alive or
* it does not exist. * it does not exist.
* *
* @throws IllegalArgumentException if <tt>id &lt= 0</tt>. * @throws IllegalArgumentException if {@code id <= 0}.
* @throws IllegalArgumentException if <tt>maxDepth is negative</tt>. * @throws IllegalArgumentException if <tt>maxDepth is negative</tt>.
* @throws java.lang.SecurityException if a security manager * @throws java.lang.SecurityException if a security manager
* exists and the caller does not have * exists and the caller does not have
...@@ -336,7 +336,7 @@ public interface ThreadMXBean extends PlatformManagedObject { ...@@ -336,7 +336,7 @@ public interface ThreadMXBean extends PlatformManagedObject {
* *
* @throws IllegalArgumentException if <tt>maxDepth is negative</tt>. * @throws IllegalArgumentException if <tt>maxDepth is negative</tt>.
* @throws IllegalArgumentException if any element in the input array * @throws IllegalArgumentException if any element in the input array
* <tt>ids</tt> is <tt>&lt= 0</tt>. * <tt>ids</tt> is {@code <= 0}.
* @throws java.lang.SecurityException if a security manager * @throws java.lang.SecurityException if a security manager
* exists and the caller does not have * exists and the caller does not have
* ManagementPermission("monitor"). * ManagementPermission("monitor").
...@@ -466,7 +466,7 @@ public interface ThreadMXBean extends PlatformManagedObject { ...@@ -466,7 +466,7 @@ public interface ThreadMXBean extends PlatformManagedObject {
* and CPU time measurement is enabled; * and CPU time measurement is enabled;
* <tt>-1</tt> otherwise. * <tt>-1</tt> otherwise.
* *
* @throws IllegalArgumentException if <tt>id &lt= 0 </tt>. * @throws IllegalArgumentException if {@code id <= 0}.
* @throws java.lang.UnsupportedOperationException if the Java * @throws java.lang.UnsupportedOperationException if the Java
* virtual machine does not support CPU time measurement for * virtual machine does not support CPU time measurement for
* other threads. * other threads.
...@@ -501,7 +501,7 @@ public interface ThreadMXBean extends PlatformManagedObject { ...@@ -501,7 +501,7 @@ public interface ThreadMXBean extends PlatformManagedObject {
* and CPU time measurement is enabled; * and CPU time measurement is enabled;
* <tt>-1</tt> otherwise. * <tt>-1</tt> otherwise.
* *
* @throws IllegalArgumentException if <tt>id &lt= 0 </tt>. * @throws IllegalArgumentException if {@code id <= 0}.
* @throws java.lang.UnsupportedOperationException if the Java * @throws java.lang.UnsupportedOperationException if the Java
* virtual machine does not support CPU time measurement for * virtual machine does not support CPU time measurement for
* other threads. * other threads.
......
...@@ -41,7 +41,7 @@ import sun.util.logging.PlatformLogger; ...@@ -41,7 +41,7 @@ import sun.util.logging.PlatformLogger;
* *
* <p> The HTTP cookie management in java.net package looks like: * <p> The HTTP cookie management in java.net package looks like:
* <blockquote> * <blockquote>
* <pre> * <pre>{@code
* use * use
* CookieHandler <------- HttpURLConnection * CookieHandler <------- HttpURLConnection
* ^ * ^
...@@ -58,7 +58,7 @@ import sun.util.logging.PlatformLogger; ...@@ -58,7 +58,7 @@ import sun.util.logging.PlatformLogger;
* | impl * | impl
* | * |
* Internal in-memory implementation * Internal in-memory implementation
* </pre> * }</pre>
* <ul> * <ul>
* <li> * <li>
* CookieHandler is at the core of cookie management. User can call * CookieHandler is at the core of cookie management. User can call
......
...@@ -30,7 +30,7 @@ package java.net; ...@@ -30,7 +30,7 @@ package java.net;
* and which should be rejected. Three pre-defined policy implementations * and which should be rejected. Three pre-defined policy implementations
* are provided, namely ACCEPT_ALL, ACCEPT_NONE and ACCEPT_ORIGINAL_SERVER. * are provided, namely ACCEPT_ALL, ACCEPT_NONE and ACCEPT_ORIGINAL_SERVER.
* *
* <p>See RFC 2965 sec. 3.3 & 7 for more detail. * <p>See RFC 2965 sec. 3.3 and 7 for more detail.
* *
* @author Edward Wang * @author Edward Wang
* @since 1.6 * @since 1.6
......
...@@ -334,12 +334,12 @@ class DatagramSocket implements java.io.Closeable { ...@@ -334,12 +334,12 @@ class DatagramSocket implements java.io.Closeable {
} }
/** /**
* Binds this DatagramSocket to a specific address & port. * Binds this DatagramSocket to a specific address and port.
* <p> * <p>
* If the address is <code>null</code>, then the system will pick up * If the address is <code>null</code>, then the system will pick up
* an ephemeral port and a valid local address to bind the socket. * an ephemeral port and a valid local address to bind the socket.
*<p> *<p>
* @param addr The address & port to bind to. * @param addr The address and port to bind to.
* @throws SocketException if any error happens during the bind, or if the * @throws SocketException if any error happens during the bind, or if the
* socket is already bound. * socket is already bound.
* @throws SecurityException if a security manager exists and its * @throws SecurityException if a security manager exists and its
...@@ -844,7 +844,7 @@ class DatagramSocket implements java.io.Closeable { ...@@ -844,7 +844,7 @@ class DatagramSocket implements java.io.Closeable {
* a <B>java.net.SocketTimeoutException</B> is raised, though the * a <B>java.net.SocketTimeoutException</B> is raised, though the
* DatagramSocket is still valid. The option <B>must</B> be enabled * DatagramSocket is still valid. The option <B>must</B> be enabled
* prior to entering the blocking operation to have effect. The * prior to entering the blocking operation to have effect. The
* timeout must be > 0. * timeout must be {@code > 0}.
* A timeout of zero is interpreted as an infinite timeout. * A timeout of zero is interpreted as an infinite timeout.
* *
* @param timeout the specified timeout in milliseconds. * @param timeout the specified timeout in milliseconds.
...@@ -1101,8 +1101,8 @@ class DatagramSocket implements java.io.Closeable { ...@@ -1101,8 +1101,8 @@ class DatagramSocket implements java.io.Closeable {
* As the underlying network implementation may ignore this * As the underlying network implementation may ignore this
* value applications should consider it a hint. * value applications should consider it a hint.
* *
* <P> The tc <B>must</B> be in the range <code> 0 <= tc <= * <P> The tc <B>must</B> be in the range {@code 0 <= tc <=
* 255</code> or an IllegalArgumentException will be thrown. * 255} or an IllegalArgumentException will be thrown.
* <p>Notes: * <p>Notes:
* <p>For Internet Protocol v4 the value consists of an * <p>For Internet Protocol v4 the value consists of an
* <code>integer</code>, the least significant 8 bits of which * <code>integer</code>, the least significant 8 bits of which
......
...@@ -109,7 +109,7 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -109,7 +109,7 @@ abstract public class HttpURLConnection extends URLConnection {
* server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status * server. In this case, {@link #getHeaderField(int) getHeaderField(0)} returns the status
* line, but <code>getHeaderFieldKey(0)</code> returns null. * line, but <code>getHeaderFieldKey(0)</code> returns null.
* *
* @param n an index, where n >=0. * @param n an index, where {@code n >=0}.
* @return the key for the <code>n</code><sup>th</sup> header field, * @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the key does not exist. * or <code>null</code> if the key does not exist.
*/ */
...@@ -260,7 +260,7 @@ abstract public class HttpURLConnection extends URLConnection { ...@@ -260,7 +260,7 @@ abstract public class HttpURLConnection extends URLConnection {
* {@link #getHeaderFieldKey getHeaderFieldKey} method to iterate through all * {@link #getHeaderFieldKey getHeaderFieldKey} method to iterate through all
* the headers in the message. * the headers in the message.
* *
* @param n an index, where n>=0. * @param n an index, where {@code n>=0}.
* @return the value of the <code>n</code><sup>th</sup> header field, * @return the value of the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if the value does not exist. * or <code>null</code> if the value does not exist.
* @see java.net.HttpURLConnection#getHeaderFieldKey(int) * @see java.net.HttpURLConnection#getHeaderFieldKey(int)
......
...@@ -389,7 +389,7 @@ public class InetSocketAddress ...@@ -389,7 +389,7 @@ public class InetSocketAddress
* Two instances of <code>InetSocketAddress</code> represent the same * Two instances of <code>InetSocketAddress</code> represent the same
* address if both the InetAddresses (or hostnames if it is unresolved) and port * address if both the InetAddresses (or hostnames if it is unresolved) and port
* numbers are equal. * numbers are equal.
* If both addresses are unresolved, then the hostname & the port number * If both addresses are unresolved, then the hostname and the port number
* are compared. * are compared.
* *
* Note: Hostnames are case insensitive. e.g. "FooBar" and "foobar" are * Note: Hostnames are case insensitive. e.g. "FooBar" and "foobar" are
......
...@@ -201,7 +201,7 @@ class MulticastSocket extends DatagramSocket { ...@@ -201,7 +201,7 @@ class MulticastSocket extends DatagramSocket {
* scope of the multicasts. * scope of the multicasts.
* *
* <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be * <p>The ttl is an <b>unsigned</b> 8-bit quantity, and so <B>must</B> be
* in the range <code> 0 <= ttl <= 0xFF </code>. * in the range {@code 0 <= ttl <= 0xFF }.
* *
* @param ttl the time-to-live * @param ttl the time-to-live
* @exception IOException if an I/O exception occurs * @exception IOException if an I/O exception occurs
......
...@@ -316,7 +316,7 @@ class ServerSocket implements java.io.Closeable { ...@@ -316,7 +316,7 @@ class ServerSocket implements java.io.Closeable {
* If the address is <code>null</code>, then the system will pick up * If the address is <code>null</code>, then the system will pick up
* an ephemeral port and a valid local address to bind the socket. * an ephemeral port and a valid local address to bind the socket.
* <p> * <p>
* @param endpoint The IP address & port number to bind to. * @param endpoint The IP address and port number to bind to.
* @throws IOException if the bind operation fails, or if the socket * @throws IOException if the bind operation fails, or if the socket
* is already bound. * is already bound.
* @throws SecurityException if a <code>SecurityManager</code> is present and * @throws SecurityException if a <code>SecurityManager</code> is present and
...@@ -343,7 +343,7 @@ class ServerSocket implements java.io.Closeable { ...@@ -343,7 +343,7 @@ class ServerSocket implements java.io.Closeable {
* or may choose to ignore the parameter altogther. The value provided * or may choose to ignore the parameter altogther. The value provided
* should be greater than <code>0</code>. If it is less than or equal to * should be greater than <code>0</code>. If it is less than or equal to
* <code>0</code>, then an implementation specific default will be used. * <code>0</code>, then an implementation specific default will be used.
* @param endpoint The IP address & port number to bind to. * @param endpoint The IP address and port number to bind to.
* @param backlog requested maximum length of the queue of * @param backlog requested maximum length of the queue of
* incoming connections. * incoming connections.
* @throws IOException if the bind operation fails, or if the socket * @throws IOException if the bind operation fails, or if the socket
...@@ -614,7 +614,7 @@ class ServerSocket implements java.io.Closeable { ...@@ -614,7 +614,7 @@ class ServerSocket implements java.io.Closeable {
* a <B>java.net.SocketTimeoutException</B> is raised, though the * a <B>java.net.SocketTimeoutException</B> is raised, though the
* ServerSocket is still valid. The option <B>must</B> be enabled * ServerSocket is still valid. The option <B>must</B> be enabled
* prior to entering the blocking operation to have effect. The * prior to entering the blocking operation to have effect. The
* timeout must be > 0. * timeout must be {@code > 0}.
* A timeout of zero is interpreted as an infinite timeout. * A timeout of zero is interpreted as an infinite timeout.
* @param timeout the specified timeout, in milliseconds * @param timeout the specified timeout, in milliseconds
* @exception SocketException if there is an error in * @exception SocketException if there is an error in
......
...@@ -1086,7 +1086,7 @@ class Socket implements java.io.Closeable { ...@@ -1086,7 +1086,7 @@ class Socket implements java.io.Closeable {
* expires, a <B>java.net.SocketTimeoutException</B> is raised, though the * expires, a <B>java.net.SocketTimeoutException</B> is raised, though the
* Socket is still valid. The option <B>must</B> be enabled * Socket is still valid. The option <B>must</B> be enabled
* prior to entering the blocking operation to have effect. The * prior to entering the blocking operation to have effect. The
* timeout must be > 0. * timeout must be {@code > 0}.
* A timeout of zero is interpreted as an infinite timeout. * A timeout of zero is interpreted as an infinite timeout.
* *
* @param timeout the specified timeout, in milliseconds. * @param timeout the specified timeout, in milliseconds.
...@@ -1295,8 +1295,8 @@ class Socket implements java.io.Closeable { ...@@ -1295,8 +1295,8 @@ class Socket implements java.io.Closeable {
* As the underlying network implementation may ignore this * As the underlying network implementation may ignore this
* value applications should consider it a hint. * value applications should consider it a hint.
* *
* <P> The tc <B>must</B> be in the range <code> 0 <= tc <= * <P> The tc <B>must</B> be in the range {@code 0 <= tc <=
* 255</code> or an IllegalArgumentException will be thrown. * 255} or an IllegalArgumentException will be thrown.
* <p>Notes: * <p>Notes:
* <p>For Internet Protocol v4 the value consists of an * <p>For Internet Protocol v4 the value consists of an
* <code>integer</code>, the least significant 8 bits of which * <code>integer</code>, the least significant 8 bits of which
......
...@@ -277,8 +277,8 @@ public final class StandardSocketOptions { ...@@ -277,8 +277,8 @@ public final class StandardSocketOptions {
* The <em>time-to-live</em> for Internet Protocol (IP) multicast datagrams. * The <em>time-to-live</em> for Internet Protocol (IP) multicast datagrams.
* *
* <p> The value of this socket option is an {@code Integer} in the range * <p> The value of this socket option is an {@code Integer} in the range
* <tt>0&nbsp;<=&nbsp;value&nbsp;<=&nbsp;255</tt>. It is used to control * {@code 0 <= value <= 255}. It is used to control the scope of multicast
* the scope of multicast datagrams sent by the datagram-oriented socket. * datagrams sent by the datagram-oriented socket.
* In the case of an {@link StandardProtocolFamily#INET IPv4} socket * In the case of an {@link StandardProtocolFamily#INET IPv4} socket
* the option is the time-to-live (TTL) on multicast datagrams sent by the * the option is the time-to-live (TTL) on multicast datagrams sent by the
* socket. Datagrams with a TTL of zero are not transmitted on the network * socket. Datagrams with a TTL of zero are not transmitted on the network
......
...@@ -258,7 +258,7 @@ import java.lang.NullPointerException; // for javadoc ...@@ -258,7 +258,7 @@ import java.lang.NullPointerException; // for javadoc
* <td>All <i>alphanum</i> characters together with those in the string * <td>All <i>alphanum</i> characters together with those in the string
* <tt>"_-!.~'()*"</tt></td></tr> * <tt>"_-!.~'()*"</tt></td></tr>
* <tr><th valign=top><i>punct</i></th> * <tr><th valign=top><i>punct</i></th>
* <td>The characters in the string <tt>",;:$&+="</tt></td></tr> * <td>The characters in the string <tt>",;:$&amp;+="</tt></td></tr>
* <tr><th valign=top><i>reserved</i></th> * <tr><th valign=top><i>reserved</i></th>
* <td>All <i>punct</i> characters together with those in the string * <td>All <i>punct</i> characters together with those in the string
* <tt>"?/[]@"</tt></td></tr> * <tt>"?/[]@"</tt></td></tr>
......
...@@ -662,7 +662,7 @@ public abstract class URLConnection { ...@@ -662,7 +662,7 @@ public abstract class URLConnection {
* Returns the key for the <code>n</code><sup>th</sup> header field. * Returns the key for the <code>n</code><sup>th</sup> header field.
* It returns <code>null</code> if there are fewer than <code>n+1</code> fields. * It returns <code>null</code> if there are fewer than <code>n+1</code> fields.
* *
* @param n an index, where n>=0 * @param n an index, where {@code n>=0}
* @return the key for the <code>n</code><sup>th</sup> header field, * @return the key for the <code>n</code><sup>th</sup> header field,
* or <code>null</code> if there are fewer than <code>n+1</code> * or <code>null</code> if there are fewer than <code>n+1</code>
* fields. * fields.
...@@ -680,7 +680,7 @@ public abstract class URLConnection { ...@@ -680,7 +680,7 @@ public abstract class URLConnection {
* {@link #getHeaderFieldKey(int) getHeaderFieldKey} method to iterate through all * {@link #getHeaderFieldKey(int) getHeaderFieldKey} method to iterate through all
* the headers in the message. * the headers in the message.
* *
* @param n an index, where n>=0 * @param n an index, where {@code n>=0}
* @return the value of the <code>n</code><sup>th</sup> header field * @return the value of the <code>n</code><sup>th</sup> header field
* or <code>null</code> if there are fewer than <code>n+1</code> fields * or <code>null</code> if there are fewer than <code>n+1</code> fields
* @see java.net.URLConnection#getHeaderFieldKey(int) * @see java.net.URLConnection#getHeaderFieldKey(int)
......
...@@ -652,9 +652,10 @@ public abstract class $Type$Buffer ...@@ -652,9 +652,10 @@ public abstract class $Type$Buffer
* <tt>src.get(dst,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as * <tt>src.get(dst,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as
* the loop * the loop
* *
* <pre> * <pre>{@code
* for (int i = off; i < off + len; i++) * for (int i = off; i < off + len; i++)
* dst[i] = src.get(); </pre> * dst[i] = src.get():
* }</pre>
* *
* except that it first checks that there are sufficient $type$s in * except that it first checks that there are sufficient $type$s in
* this buffer and it is potentially much more efficient. </p> * this buffer and it is potentially much more efficient. </p>
...@@ -788,9 +789,10 @@ public abstract class $Type$Buffer ...@@ -788,9 +789,10 @@ public abstract class $Type$Buffer
* <tt>dst.put(src,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as * <tt>dst.put(src,&nbsp;off,&nbsp;len)</tt> has exactly the same effect as
* the loop * the loop
* *
* <pre> * <pre>{@code
* for (int i = off; i < off + len; i++) * for (int i = off; i < off + len; i++)
* dst.put(a[i]); </pre> * dst.put(a[i]);
* }</pre>
* *
* except that it first checks that there is sufficient space in this * except that it first checks that there is sufficient space in this
* buffer and it is potentially much more efficient. </p> * buffer and it is potentially much more efficient. </p>
...@@ -874,9 +876,10 @@ public abstract class $Type$Buffer ...@@ -874,9 +876,10 @@ public abstract class $Type$Buffer
* <tt>dst.put(src,&nbsp;start,&nbsp;end)</tt> has exactly the same effect * <tt>dst.put(src,&nbsp;start,&nbsp;end)</tt> has exactly the same effect
* as the loop * as the loop
* *
* <pre> * <pre>{@code
* for (int i = start; i < end; i++) * for (int i = start; i < end; i++)
* dst.put(src.charAt(i)); </pre> * dst.put(src.charAt(i));
* }</pre>
* *
* except that it first checks that there is sufficient space in this * except that it first checks that there is sufficient space in this
* buffer and it is potentially much more efficient. </p> * buffer and it is potentially much more efficient. </p>
...@@ -1038,12 +1041,13 @@ public abstract class $Type$Buffer ...@@ -1038,12 +1041,13 @@ public abstract class $Type$Buffer
* write was incomplete. The following loop, for example, copies bytes * write was incomplete. The following loop, for example, copies bytes
* from one channel to another via the buffer <tt>buf</tt>: * from one channel to another via the buffer <tt>buf</tt>:
* *
* <blockquote><pre> * <blockquote><pre>{@code
* buf.clear(); // Prepare buffer for use * buf.clear(); // Prepare buffer for use
* while (in.read(buf) >= 0 || buf.position != 0) { * while (in.read(buf) >= 0 || buf.position != 0) {
* buf.flip(); * buf.flip();
* out.write(buf); * out.write(buf);
* buf.compact(); // In case of partial write * buf.compact(); // In case of partial write
* }
* }</pre></blockquote> * }</pre></blockquote>
* *
#end[byte] #end[byte]
......
...@@ -208,7 +208,7 @@ public abstract class SelectableChannel ...@@ -208,7 +208,7 @@ public abstract class SelectableChannel
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If a bit in the <tt>ops</tt> set does not correspond to an * If a bit in the <tt>ops</tt> set does not correspond to an
* operation that is supported by this channel, that is, if * operation that is supported by this channel, that is, if
* <tt>set & ~validOps() != 0</tt> * {@code set & ~validOps() != 0}
* *
* @return A key representing the registration of this channel with * @return A key representing the registration of this channel with
* the given selector * the given selector
...@@ -265,8 +265,8 @@ public abstract class SelectableChannel ...@@ -265,8 +265,8 @@ public abstract class SelectableChannel
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If a bit in <tt>ops</tt> does not correspond to an operation * If a bit in <tt>ops</tt> does not correspond to an operation
* that is supported by this channel, that is, if <tt>set & * that is supported by this channel, that is, if {@code set &
* ~validOps() != 0</tt> * ~validOps() != 0}
* *
* @return A key representing the registration of this channel with * @return A key representing the registration of this channel with
* the given selector * the given selector
......
...@@ -191,7 +191,7 @@ public abstract class SelectionKey { ...@@ -191,7 +191,7 @@ public abstract class SelectionKey {
* @throws IllegalArgumentException * @throws IllegalArgumentException
* If a bit in the set does not correspond to an operation that * If a bit in the set does not correspond to an operation that
* is supported by this key's channel, that is, if * is supported by this key's channel, that is, if
* <tt>(ops & ~channel().validOps()) != 0</tt> * {@code (ops & ~channel().validOps()) != 0}
* *
* @throws CancelledKeyException * @throws CancelledKeyException
* If this key has been cancelled * If this key has been cancelled
...@@ -272,15 +272,15 @@ public abstract class SelectionKey { ...@@ -272,15 +272,15 @@ public abstract class SelectionKey {
* <p> An invocation of this method of the form <tt>k.isReadable()</tt> * <p> An invocation of this method of the form <tt>k.isReadable()</tt>
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre> * <blockquote><pre>{@code
* k.readyOps()&nbsp;&amp;&nbsp;OP_READ&nbsp;!=&nbsp;0</pre></blockquote> * k.readyOps() & OP_READ != 0
* }</pre></blockquote>
* *
* <p> If this key's channel does not support read operations then this * <p> If this key's channel does not support read operations then this
* method always returns <tt>false</tt>. </p> * method always returns <tt>false</tt>. </p>
* *
* @return <tt>true</tt> if, and only if, * @return <tt>true</tt> if, and only if,
* <tt>readyOps()</tt>&nbsp;<tt>&</tt>&nbsp;<tt>OP_READ</tt> is {@code readyOps() & OP_READ} is nonzero
* nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
* If this key has been cancelled * If this key has been cancelled
...@@ -295,15 +295,15 @@ public abstract class SelectionKey { ...@@ -295,15 +295,15 @@ public abstract class SelectionKey {
* <p> An invocation of this method of the form <tt>k.isWritable()</tt> * <p> An invocation of this method of the form <tt>k.isWritable()</tt>
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre> * <blockquote><pre>{@code
* k.readyOps()&nbsp;&amp;&nbsp;OP_WRITE&nbsp;!=&nbsp;0</pre></blockquote> * k.readyOps() & OP_WRITE != 0
* }</pre></blockquote>
* *
* <p> If this key's channel does not support write operations then this * <p> If this key's channel does not support write operations then this
* method always returns <tt>false</tt>. </p> * method always returns <tt>false</tt>. </p>
* *
* @return <tt>true</tt> if, and only if, * @return <tt>true</tt> if, and only if,
* <tt>readyOps()</tt>&nbsp;<tt>&</tt>&nbsp;<tt>OP_WRITE</tt> * {@code readyOps() & OP_WRITE} is nonzero
* is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
* If this key has been cancelled * If this key has been cancelled
...@@ -319,15 +319,15 @@ public abstract class SelectionKey { ...@@ -319,15 +319,15 @@ public abstract class SelectionKey {
* <p> An invocation of this method of the form <tt>k.isConnectable()</tt> * <p> An invocation of this method of the form <tt>k.isConnectable()</tt>
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre> * <blockqoute><pre>{@code
* k.readyOps()&nbsp;&amp;&nbsp;OP_CONNECT&nbsp;!=&nbsp;0</pre></blockquote> * k.readyOps() & OP_CONNECT != 0
* }</pre></blockquote>
* *
* <p> If this key's channel does not support socket-connect operations * <p> If this key's channel does not support socket-connect operations
* then this method always returns <tt>false</tt>. </p> * then this method always returns <tt>false</tt>. </p>
* *
* @return <tt>true</tt> if, and only if, * @return <tt>true</tt> if, and only if,
* <tt>readyOps()</tt>&nbsp;<tt>&</tt>&nbsp;<tt>OP_CONNECT</tt> * {@code readyOps() & OP_CONNECT} is nonzero
* is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
* If this key has been cancelled * If this key has been cancelled
...@@ -343,15 +343,15 @@ public abstract class SelectionKey { ...@@ -343,15 +343,15 @@ public abstract class SelectionKey {
* <p> An invocation of this method of the form <tt>k.isAcceptable()</tt> * <p> An invocation of this method of the form <tt>k.isAcceptable()</tt>
* behaves in exactly the same way as the expression * behaves in exactly the same way as the expression
* *
* <blockquote><pre> * <blockquote><pre>{@code
* k.readyOps()&nbsp;&amp;&nbsp;OP_ACCEPT&nbsp;!=&nbsp;0</pre></blockquote> * k.readyOps() & OP_ACCEPT != 0
* }</pre></blockquote>
* *
* <p> If this key's channel does not support socket-accept operations then * <p> If this key's channel does not support socket-accept operations then
* this method always returns <tt>false</tt>. </p> * this method always returns <tt>false</tt>. </p>
* *
* @return <tt>true</tt> if, and only if, * @return <tt>true</tt> if, and only if,
* <tt>readyOps()</tt>&nbsp;<tt>&</tt>&nbsp;<tt>OP_ACCEPT</tt> * {@code readyOps() & OP_ACCEPT} is nonzero
* is nonzero
* *
* @throws CancelledKeyException * @throws CancelledKeyException
* If this key has been cancelled * If this key has been cancelled
......
...@@ -260,7 +260,7 @@ public abstract class Charset$Coder$ { ...@@ -260,7 +260,7 @@ public abstract class Charset$Coder$ {
* method, passing the new replacement, after checking that the new * method, passing the new replacement, after checking that the new
* replacement is acceptable. </p> * replacement is acceptable. </p>
* *
* @param newReplacement * @param newReplacement The replacement value
* *
#if[decoder] #if[decoder]
* The new replacement; must not be <tt>null</tt> * The new replacement; must not be <tt>null</tt>
...@@ -305,7 +305,7 @@ public abstract class Charset$Coder$ { ...@@ -305,7 +305,7 @@ public abstract class Charset$Coder$ {
* should be overridden by $coder$s that require notification of changes to * should be overridden by $coder$s that require notification of changes to
* the replacement. </p> * the replacement. </p>
* *
* @param newReplacement * @param newReplacement The replacement value
*/ */
protected void implReplaceWith($replType$ newReplacement) { protected void implReplaceWith($replType$ newReplacement) {
} }
......
...@@ -64,7 +64,7 @@ import java.util.Iterator; ...@@ -64,7 +64,7 @@ import java.util.Iterator;
* those developing custom file system implementations. Methods may be added to * those developing custom file system implementations. Methods may be added to
* this interface in future releases. </p> * this interface in future releases. </p>
* *
* <a name="interop"><h4>Accessing Files</h4></a> * <h4>Accessing Files</h4>
* <p> Paths may be used with the {@link Files} class to operate on files, * <p> Paths may be used with the {@link Files} class to operate on files,
* directories, and other types of files. For example, suppose we want a {@link * directories, and other types of files. For example, suppose we want a {@link
* java.io.BufferedReader} to read text from a file "{@code access.log}". The * java.io.BufferedReader} to read text from a file "{@code access.log}". The
...@@ -87,7 +87,7 @@ import java.util.Iterator; ...@@ -87,7 +87,7 @@ import java.util.Iterator;
* addition, the {@link #toFile toFile} method is useful to construct a {@code * addition, the {@link #toFile toFile} method is useful to construct a {@code
* File} from the {@code String} representation of a {@code Path}. * File} from the {@code String} representation of a {@code Path}.
* *
* <h4>Concurrency</h4></a> * <h4>Concurrency</h4>
* <p> Implementations of this interface are immutable and safe for use by * <p> Implementations of this interface are immutable and safe for use by
* multiple concurrent threads. * multiple concurrent threads.
* *
......
...@@ -317,7 +317,7 @@ public class KeyStore { ...@@ -317,7 +317,7 @@ public class KeyStore {
* been specified by properties in the domain configuration data. * been specified by properties in the domain configuration data.
* It is cloned to prevent subsequent modification. * It is cloned to prevent subsequent modification.
* *
* @exception NullPointerExcetion if {@code configuration} or * @exception NullPointerException if {@code configuration} or
* {@code protectionParams} is {@code null} * {@code protectionParams} is {@code null}
*/ */
public DomainLoadStoreParameter(URI configuration, public DomainLoadStoreParameter(URI configuration,
......
...@@ -466,7 +466,7 @@ public class SecureRandom extends java.util.Random { ...@@ -466,7 +466,7 @@ public class SecureRandom extends java.util.Random {
* <code>nextLong</code>, and <code>nextFloat</code>). * <code>nextLong</code>, and <code>nextFloat</code>).
* *
* @param numBits number of pseudo-random bits to be generated, where * @param numBits number of pseudo-random bits to be generated, where
* 0 <= <code>numBits</code> <= 32. * {@code 0 <= numBits <= 32}.
* *
* @return an <code>int</code> containing the user-specified number * @return an <code>int</code> containing the user-specified number
* of pseudo-random bits (right justified, with leading zeros). * of pseudo-random bits (right justified, with leading zeros).
......
...@@ -141,8 +141,8 @@ public class CertPathValidatorException extends GeneralSecurityException { ...@@ -141,8 +141,8 @@ public class CertPathValidatorException extends GeneralSecurityException {
* that caused the error (or -1 if not applicable). Note that * that caused the error (or -1 if not applicable). Note that
* the list of certificates in a <code>CertPath</code> is zero based. * the list of certificates in a <code>CertPath</code> is zero based.
* @throws IndexOutOfBoundsException if the index is out of range * @throws IndexOutOfBoundsException if the index is out of range
* <code>(index < -1 || (certPath != null && index >= * {@code (index < -1 || (certPath != null && index >=
* certPath.getCertificates().size())</code> * certPath.getCertificates().size()) }
* @throws IllegalArgumentException if <code>certPath</code> is * @throws IllegalArgumentException if <code>certPath</code> is
* <code>null</code> and <code>index</code> is not -1 * <code>null</code> and <code>index</code> is not -1
*/ */
...@@ -164,8 +164,8 @@ public class CertPathValidatorException extends GeneralSecurityException { ...@@ -164,8 +164,8 @@ public class CertPathValidatorException extends GeneralSecurityException {
* the list of certificates in a <code>CertPath</code> is zero based. * the list of certificates in a <code>CertPath</code> is zero based.
* @param reason the reason the validation failed * @param reason the reason the validation failed
* @throws IndexOutOfBoundsException if the index is out of range * @throws IndexOutOfBoundsException if the index is out of range
* <code>(index < -1 || (certPath != null && index >= * {@code (index < -1 || (certPath != null && index >=
* certPath.getCertificates().size())</code> * certPath.getCertificates().size()) }
* @throws IllegalArgumentException if <code>certPath</code> is * @throws IllegalArgumentException if <code>certPath</code> is
* <code>null</code> and <code>index</code> is not -1 * <code>null</code> and <code>index</code> is not -1
* @throws NullPointerException if <code>reason</code> is <code>null</code> * @throws NullPointerException if <code>reason</code> is <code>null</code>
......
...@@ -65,7 +65,7 @@ import sun.security.jca.GetInstance.Instance; ...@@ -65,7 +65,7 @@ import sun.security.jca.GetInstance.Instance;
* read position of the input stream is positioned to the next certificate in * read position of the input stream is positioned to the next certificate in
* the file:<p> * the file:<p>
* *
* <pre> * <pre>{@code
* FileInputStream fis = new FileInputStream(filename); * FileInputStream fis = new FileInputStream(filename);
* BufferedInputStream bis = new BufferedInputStream(fis); * BufferedInputStream bis = new BufferedInputStream(fis);
* *
...@@ -75,7 +75,7 @@ import sun.security.jca.GetInstance.Instance; ...@@ -75,7 +75,7 @@ import sun.security.jca.GetInstance.Instance;
* Certificate cert = cf.generateCertificate(bis); * Certificate cert = cf.generateCertificate(bis);
* System.out.println(cert.toString()); * System.out.println(cert.toString());
* } * }
* </pre> * }</pre>
* *
* <p>The following example parses a PKCS#7-formatted certificate reply stored * <p>The following example parses a PKCS#7-formatted certificate reply stored
* in a file and extracts all the certificates from it:<p> * in a file and extracts all the certificates from it:<p>
......
...@@ -84,12 +84,12 @@ public interface X509Extension { ...@@ -84,12 +84,12 @@ public interface X509Extension {
* *
* Here is sample code to get a Set of critical extensions from an * Here is sample code to get a Set of critical extensions from an
* X509Certificate and print the OIDs: * X509Certificate and print the OIDs:
* <pre><code> * <pre>{@code
* X509Certificate cert = null; * X509Certificate cert = null;
* try (InputStream inStrm = new FileInputStream("DER-encoded-Cert")) { * try (InputStream inStrm = new FileInputStream("DER-encoded-Cert")) {
* CertificateFactory cf = CertificateFactory.getInstance("X.509"); * CertificateFactory cf = CertificateFactory.getInstance("X.509");
* cert = (X509Certificate)cf.generateCertificate(inStrm); * cert = (X509Certificate)cf.generateCertificate(inStrm);
* }<p> * }
* *
* Set<String> critSet = cert.getCriticalExtensionOIDs(); * Set<String> critSet = cert.getCriticalExtensionOIDs();
* if (critSet != null && !critSet.isEmpty()) { * if (critSet != null && !critSet.isEmpty()) {
...@@ -98,7 +98,7 @@ public interface X509Extension { ...@@ -98,7 +98,7 @@ public interface X509Extension {
* System.out.println(oid); * System.out.println(oid);
* } * }
* } * }
* </code></pre> * }</pre>
* @return a Set (or an empty Set if none are marked critical) of * @return a Set (or an empty Set if none are marked critical) of
* the extension OID strings for extensions that are marked critical. * the extension OID strings for extensions that are marked critical.
* If there are no extensions present at all, then this method returns * If there are no extensions present at all, then this method returns
......
...@@ -184,9 +184,9 @@ public class EllipticCurve { ...@@ -184,9 +184,9 @@ public class EllipticCurve {
* Returns a hash code value for this elliptic curve. * Returns a hash code value for this elliptic curve.
* @return a hash code value computed from the hash codes of the field, A, * @return a hash code value computed from the hash codes of the field, A,
* and B, as follows: * and B, as follows:
* <code> * <pre>{@code
* (field.hashCode() << 6) + (a.hashCode() << 4) + (b.hashCode() << 2) * (field.hashCode() << 6) + (a.hashCode() << 4) + (b.hashCode() << 2)
* </code> * }</pre>
*/ */
public int hashCode() { public int hashCode() {
return (field.hashCode() << 6 + return (field.hashCode() << 6 +
......
...@@ -36,7 +36,7 @@ import sun.reflect.Reflection; ...@@ -36,7 +36,7 @@ import sun.reflect.Reflection;
/** /**
* <P>The basic service for managing a set of JDBC drivers.<br> * <P>The basic service for managing a set of JDBC drivers.<br>
* <B>NOTE:</B> The {@link <code>DataSource</code>} interface, new in the * <B>NOTE:</B> The {@link javax.sql.DataSource} interface, new in the
* JDBC 2.0 API, provides another way to connect to a data source. * JDBC 2.0 API, provides another way to connect to a data source.
* The use of a <code>DataSource</code> object is the preferred means of * The use of a <code>DataSource</code> object is the preferred means of
* connecting to a data source. * connecting to a data source.
......
...@@ -1350,7 +1350,7 @@ public interface ResultSet extends Wrapper, AutoCloseable { ...@@ -1350,7 +1350,7 @@ public interface ResultSet extends Wrapper, AutoCloseable {
* @param rows the number of rows to fetch * @param rows the number of rows to fetch
* @exception SQLException if a database access error occurs; this method * @exception SQLException if a database access error occurs; this method
* is called on a closed result set or the * is called on a closed result set or the
* condition <code>rows >= 0 </code> is not satisfied * condition {@code rows >= 0} is not satisfied
* @since 1.2 * @since 1.2
* @see #getFetchSize * @see #getFetchSize
*/ */
......
...@@ -144,7 +144,7 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -144,7 +144,7 @@ public interface Statement extends Wrapper, AutoCloseable {
* @param max the new column size limit in bytes; zero means there is no limit * @param max the new column size limit in bytes; zero means there is no limit
* @exception SQLException if a database access error occurs, * @exception SQLException if a database access error occurs,
* this method is called on a closed <code>Statement</code> * this method is called on a closed <code>Statement</code>
* or the condition max >= 0 is not satisfied * or the condition {@code max >= 0} is not satisfied
* @see #getMaxFieldSize * @see #getMaxFieldSize
*/ */
void setMaxFieldSize(int max) throws SQLException; void setMaxFieldSize(int max) throws SQLException;
...@@ -174,7 +174,7 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -174,7 +174,7 @@ public interface Statement extends Wrapper, AutoCloseable {
* @param max the new max rows limit; zero means there is no limit * @param max the new max rows limit; zero means there is no limit
* @exception SQLException if a database access error occurs, * @exception SQLException if a database access error occurs,
* this method is called on a closed <code>Statement</code> * this method is called on a closed <code>Statement</code>
* or the condition max >= 0 is not satisfied * or the condition {@code max >= 0} is not satisfied
* @see #getMaxRows * @see #getMaxRows
*/ */
void setMaxRows(int max) throws SQLException; void setMaxRows(int max) throws SQLException;
...@@ -240,7 +240,7 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -240,7 +240,7 @@ public interface Statement extends Wrapper, AutoCloseable {
* there is no limit * there is no limit
* @exception SQLException if a database access error occurs, * @exception SQLException if a database access error occurs,
* this method is called on a closed <code>Statement</code> * this method is called on a closed <code>Statement</code>
* or the condition seconds >= 0 is not satisfied * or the condition {@code seconds >= 0} is not satisfied
* @see #getQueryTimeout * @see #getQueryTimeout
*/ */
void setQueryTimeout(int seconds) throws SQLException; void setQueryTimeout(int seconds) throws SQLException;
...@@ -385,10 +385,10 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -385,10 +385,10 @@ public interface Statement extends Wrapper, AutoCloseable {
* object(s) obtained with the method <code>getResultSet</code>. * object(s) obtained with the method <code>getResultSet</code>.
* *
* <P>There are no more results when the following is true: * <P>There are no more results when the following is true:
* <PRE> * <PRE>{@code
* // stmt is a Statement object * // stmt is a Statement object
* ((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1)) * ((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
* </PRE> * }</PRE>
* *
* @return <code>true</code> if the next result is a <code>ResultSet</code> * @return <code>true</code> if the next result is a <code>ResultSet</code>
* object; <code>false</code> if it is an update count or there are * object; <code>false</code> if it is an update count or there are
...@@ -452,7 +452,7 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -452,7 +452,7 @@ public interface Statement extends Wrapper, AutoCloseable {
* @param rows the number of rows to fetch * @param rows the number of rows to fetch
* @exception SQLException if a database access error occurs, * @exception SQLException if a database access error occurs,
* this method is called on a closed <code>Statement</code> or the * this method is called on a closed <code>Statement</code> or the
* condition <code>rows >= 0</code> is not satisfied. * condition {@code rows >= 0} is not satisfied.
* @since 1.2 * @since 1.2
* @see #getFetchSize * @see #getFetchSize
*/ */
...@@ -665,10 +665,10 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -665,10 +665,10 @@ public interface Statement extends Wrapper, AutoCloseable {
* <code>true</code> if the next result is a <code>ResultSet</code> object. * <code>true</code> if the next result is a <code>ResultSet</code> object.
* *
* <P>There are no more results when the following is true: * <P>There are no more results when the following is true:
* <PRE> * <PRE>{@code
* // stmt is a Statement object * // stmt is a Statement object
* ((stmt.getMoreResults(current) == false) && (stmt.getUpdateCount() == -1)) * ((stmt.getMoreResults(current) == false) && (stmt.getUpdateCount() == -1))
* </PRE> * }</PRE>
* *
* @param current one of the following <code>Statement</code> * @param current one of the following <code>Statement</code>
* constants indicating what should happen to current * constants indicating what should happen to current
...@@ -1107,7 +1107,7 @@ public interface Statement extends Wrapper, AutoCloseable { ...@@ -1107,7 +1107,7 @@ public interface Statement extends Wrapper, AutoCloseable {
* @param max the new max rows limit; zero means there is no limit * @param max the new max rows limit; zero means there is no limit
* @exception SQLException if a database access error occurs, * @exception SQLException if a database access error occurs,
* this method is called on a closed <code>Statement</code> * this method is called on a closed <code>Statement</code>
* or the condition max >= 0 is not satisfied * or the condition {@code max >= 0} is not satisfied
* @see #getMaxRows * @see #getMaxRows
* @since 1.8 * @since 1.8
*/ */
......
...@@ -62,27 +62,27 @@ package java.text; ...@@ -62,27 +62,27 @@ package java.text;
* <P>Examples:<P> * <P>Examples:<P>
* *
* Traverse the text from start to finish * Traverse the text from start to finish
* <pre> * <pre>{@code
* public void traverseForward(CharacterIterator iter) { * public void traverseForward(CharacterIterator iter) {
* for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { * for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) {
* processChar(c); * processChar(c);
* } * }
* } * }
* </pre> * }</pre>
* *
* Traverse the text backwards, from end to start * Traverse the text backwards, from end to start
* <pre> * <pre>{@code
* public void traverseBackward(CharacterIterator iter) { * public void traverseBackward(CharacterIterator iter) {
* for(char c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) { * for(char c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) {
* processChar(c); * processChar(c);
* } * }
* } * }
* </pre> * }</pre>
* *
* Traverse both forward and backward from a given position in the text. * Traverse both forward and backward from a given position in the text.
* Calls to notBoundary() in this example represents some * Calls to notBoundary() in this example represents some
* additional stopping criteria. * additional stopping criteria.
* <pre> * <pre>{@code
* public void traverseOut(CharacterIterator iter, int pos) { * public void traverseOut(CharacterIterator iter, int pos) {
* for (char c = iter.setIndex(pos); * for (char c = iter.setIndex(pos);
* c != CharacterIterator.DONE && notBoundary(c); * c != CharacterIterator.DONE && notBoundary(c);
...@@ -96,7 +96,7 @@ package java.text; ...@@ -96,7 +96,7 @@ package java.text;
* int start = iter.getIndex(); * int start = iter.getIndex();
* processSection(start, end); * processSection(start, end);
* } * }
* </pre> * }</pre>
* *
* @see StringCharacterIterator * @see StringCharacterIterator
* @see AttributedCharacterIterator * @see AttributedCharacterIterator
......
...@@ -376,7 +376,7 @@ public class ChoiceFormat extends NumberFormat { ...@@ -376,7 +376,7 @@ public class ChoiceFormat extends NumberFormat {
/** /**
* Returns pattern with formatted double. * Returns pattern with formatted double.
* @param number number to be formatted & substituted. * @param number number to be formatted and substituted.
* @param toAppendTo where text is appended. * @param toAppendTo where text is appended.
* @param status ignore no useful status is returned. * @param status ignore no useful status is returned.
*/ */
......
...@@ -72,14 +72,14 @@ import sun.util.locale.provider.LocaleServiceProviderPool; ...@@ -72,14 +72,14 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* The following example shows how to compare two strings using * The following example shows how to compare two strings using
* the <code>Collator</code> for the default locale. * the <code>Collator</code> for the default locale.
* <blockquote> * <blockquote>
* <pre> * <pre>{@code
* // Compare two strings in the default locale * // Compare two strings in the default locale
* Collator myCollator = Collator.getInstance(); * Collator myCollator = Collator.getInstance();
* if( myCollator.compare("abc", "ABC") < 0 ) * if( myCollator.compare("abc", "ABC") < 0 )
* System.out.println("abc is less than ABC"); * System.out.println("abc is less than ABC");
* else * else
* System.out.println("abc is greater than or equal to ABC"); * System.out.println("abc is greater than or equal to ABC");
* </pre> * }</pre>
* </blockquote> * </blockquote>
* *
* <p> * <p>
......
...@@ -2681,9 +2681,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca ...@@ -2681,9 +2681,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* Returns whether this <code>Calendar</code> represents a time * Returns whether this <code>Calendar</code> represents a time
* before the time represented by the specified * before the time represented by the specified
* <code>Object</code>. This method is equivalent to: * <code>Object</code>. This method is equivalent to:
* <pre><blockquote> * <pre>{@code
* compareTo(when) < 0 * compareTo(when) < 0
* </blockquote></pre> * }</pre>
* if and only if <code>when</code> is a <code>Calendar</code> * if and only if <code>when</code> is a <code>Calendar</code>
* instance. Otherwise, the method returns <code>false</code>. * instance. Otherwise, the method returns <code>false</code>.
* *
...@@ -2702,9 +2702,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca ...@@ -2702,9 +2702,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* Returns whether this <code>Calendar</code> represents a time * Returns whether this <code>Calendar</code> represents a time
* after the time represented by the specified * after the time represented by the specified
* <code>Object</code>. This method is equivalent to: * <code>Object</code>. This method is equivalent to:
* <pre><blockquote> * <pre>{@code
* compareTo(when) > 0 * compareTo(when) > 0
* </blockquote></pre> * }</pre>
* if and only if <code>when</code> is a <code>Calendar</code> * if and only if <code>when</code> is a <code>Calendar</code>
* instance. Otherwise, the method returns <code>false</code>. * instance. Otherwise, the method returns <code>false</code>.
* *
......
...@@ -924,9 +924,9 @@ public class Collections { ...@@ -924,9 +924,9 @@ public class Collections {
* Returns the starting position of the first occurrence of the specified * Returns the starting position of the first occurrence of the specified
* target list within the specified source list, or -1 if there is no * target list within the specified source list, or -1 if there is no
* such occurrence. More formally, returns the lowest index <tt>i</tt> * such occurrence. More formally, returns the lowest index <tt>i</tt>
* such that <tt>source.subList(i, i+target.size()).equals(target)</tt>, * such that {@code source.subList(i, i+target.size()).equals(target)},
* or -1 if there is no such index. (Returns -1 if * or -1 if there is no such index. (Returns -1 if
* <tt>target.size() > source.size()</tt>.) * {@code target.size() > source.size()})
* *
* <p>This implementation uses the "brute force" technique of scanning * <p>This implementation uses the "brute force" technique of scanning
* over the source list, looking for a match with the target at each * over the source list, looking for a match with the target at each
...@@ -977,9 +977,9 @@ public class Collections { ...@@ -977,9 +977,9 @@ public class Collections {
* Returns the starting position of the last occurrence of the specified * Returns the starting position of the last occurrence of the specified
* target list within the specified source list, or -1 if there is no such * target list within the specified source list, or -1 if there is no such
* occurrence. More formally, returns the highest index <tt>i</tt> * occurrence. More formally, returns the highest index <tt>i</tt>
* such that <tt>source.subList(i, i+target.size()).equals(target)</tt>, * such that {@code source.subList(i, i+target.size()).equals(target)},
* or -1 if there is no such index. (Returns -1 if * or -1 if there is no such index. (Returns -1 if
* <tt>target.size() > source.size()</tt>.) * {@code target.size() > source.size()})
* *
* <p>This implementation uses the "brute force" technique of iterating * <p>This implementation uses the "brute force" technique of iterating
* over the source list, looking for a match with the target at each * over the source list, looking for a match with the target at each
......
...@@ -984,8 +984,9 @@ public class Date ...@@ -984,8 +984,9 @@ public class Date
* exclusive OR of the two halves of the primitive <tt>long</tt> * exclusive OR of the two halves of the primitive <tt>long</tt>
* value returned by the {@link Date#getTime} * value returned by the {@link Date#getTime}
* method. That is, the hash code is the value of the expression: * method. That is, the hash code is the value of the expression:
* <blockquote><pre> * <blockquote><pre>{@code
* (int)(this.getTime()^(this.getTime() >>> 32))</pre></blockquote> * (int)(this.getTime()^(this.getTime() >>> 32))
* }</pre></blockquote>
* *
* @return a hash code value for this object. * @return a hash code value for this object.
*/ */
...@@ -1085,7 +1086,7 @@ public class Date ...@@ -1085,7 +1086,7 @@ public class Date
/** /**
* Creates a string representation of this <tt>Date</tt> object of * Creates a string representation of this <tt>Date</tt> object of
* the form: * the form:
* <blockquote<pre> * <blockquote><pre>
* d mon yyyy hh:mm:ss GMT</pre></blockquote> * d mon yyyy hh:mm:ss GMT</pre></blockquote>
* where:<ul> * where:<ul>
* <li><i>d</i> is the day of the month (<tt>1</tt> through <tt>31</tt>), * <li><i>d</i> is the day of the month (<tt>1</tt> through <tt>31</tt>),
......
...@@ -437,13 +437,13 @@ public class LinkedHashMap<K,V> ...@@ -437,13 +437,13 @@ public class LinkedHashMap<K,V>
* <p>Sample use: this override will allow the map to grow up to 100 * <p>Sample use: this override will allow the map to grow up to 100
* entries and then delete the eldest entry each time a new entry is * entries and then delete the eldest entry each time a new entry is
* added, maintaining a steady state of 100 entries. * added, maintaining a steady state of 100 entries.
* <pre> * <pre>{@code
* private static final int MAX_ENTRIES = 100; * private static final int MAX_ENTRIES = 100;
* *
* protected boolean removeEldestEntry(Map.Entry eldest) { * protected boolean removeEldestEntry(Map.Entry eldest) {
* return size() > MAX_ENTRIES; * return size() > MAX_ENTRIES;
* } * }
* </pre> * }</pre>
* *
* <p>This method typically does not modify the map in any way, * <p>This method typically does not modify the map in any way,
* instead allowing the map to modify itself as directed by its * instead allowing the map to modify itself as directed by its
......
...@@ -372,7 +372,7 @@ class Random implements java.io.Serializable { ...@@ -372,7 +372,7 @@ class Random implements java.io.Serializable {
* range {@code 0.0f} (inclusive) to {@code 1.0f} (exclusive), is * range {@code 0.0f} (inclusive) to {@code 1.0f} (exclusive), is
* pseudorandomly generated and returned. All 2<font * pseudorandomly generated and returned. All 2<font
* size="-1"><sup>24</sup></font> possible {@code float} values * size="-1"><sup>24</sup></font> possible {@code float} values
* of the form <i>m&nbsp;x&nbsp</i>2<font * of the form <i>m&nbsp;x&nbsp;</i>2<font
* size="-1"><sup>-24</sup></font>, where <i>m</i> is a positive * size="-1"><sup>-24</sup></font>, where <i>m</i> is a positive
* integer less than 2<font size="-1"><sup>24</sup> </font>, are * integer less than 2<font size="-1"><sup>24</sup> </font>, are
* produced with (approximately) equal probability. * produced with (approximately) equal probability.
......
...@@ -2323,9 +2323,9 @@ public abstract class ResourceBundle { ...@@ -2323,9 +2323,9 @@ public abstract class ResourceBundle {
* is returned. And if the resource bundles for the "ja" and * is returned. And if the resource bundles for the "ja" and
* "" <code>Locale</code>s are found, then the runtime resource * "" <code>Locale</code>s are found, then the runtime resource
* lookup path (parent chain) is: * lookup path (parent chain) is:
* <pre> * <pre>{@code
* Messages_ja -> Messages * Messages_ja -> Messages
* </pre> * }</pre>
* *
* @param baseName * @param baseName
* the base name of the resource bundle, a fully * the base name of the resource bundle, a fully
......
...@@ -49,47 +49,51 @@ import sun.misc.LRUCache; ...@@ -49,47 +49,51 @@ import sun.misc.LRUCache;
* *
* <p>For example, this code allows a user to read a number from * <p>For example, this code allows a user to read a number from
* <tt>System.in</tt>: * <tt>System.in</tt>:
* <blockquote><pre> * <blockquote><pre>{@code
* Scanner sc = new Scanner(System.in); * Scanner sc = new Scanner(System.in);
* int i = sc.nextInt(); * int i = sc.nextInt();
* </pre></blockquote> * }</pre></blockquote>
* *
* <p>As another example, this code allows <code>long</code> types to be * <p>As another example, this code allows <code>long</code> types to be
* assigned from entries in a file <code>myNumbers</code>: * assigned from entries in a file <code>myNumbers</code>:
* <blockquote><pre> * <blockquote><pre>{@code
* Scanner sc = new Scanner(new File("myNumbers")); * Scanner sc = new Scanner(new File("myNumbers"));
* while (sc.hasNextLong()) { * while (sc.hasNextLong()) {
* long aLong = sc.nextLong(); * long aLong = sc.nextLong();
* }
* }</pre></blockquote> * }</pre></blockquote>
* *
* <p>The scanner can also use delimiters other than whitespace. This * <p>The scanner can also use delimiters other than whitespace. This
* example reads several items in from a string: * example reads several items in from a string:
*<blockquote><pre> * <blockquote><pre>{@code
* String input = "1 fish 2 fish red fish blue fish"; * String input = "1 fish 2 fish red fish blue fish";
* Scanner s = new Scanner(input).useDelimiter("\\s*fish\\s*"); * Scanner s = new Scanner(input).useDelimiter("\\s*fish\\s*");
* System.out.println(s.nextInt()); * System.out.println(s.nextInt());
* System.out.println(s.nextInt()); * System.out.println(s.nextInt());
* System.out.println(s.next()); * System.out.println(s.next());
* System.out.println(s.next()); * System.out.println(s.next());
* s.close(); </pre></blockquote> * s.close();
* }</pre></blockquote>
* <p> * <p>
* prints the following output: * prints the following output:
* <blockquote><pre> * <blockqjote><pre>{@code
* 1 * 1
* 2 * 2
* red * red
* blue </pre></blockquote> * blue
* }</pre></blockquote>
* *
* <p>The same output can be generated with this code, which uses a regular * <p>The same output can be generated with this code, which uses a regular
* expression to parse all four tokens at once: * expression to parse all four tokens at once:
*<blockquote><pre> * <blockquote><pre>{@code
* String input = "1 fish 2 fish red fish blue fish"; * String input = "1 fish 2 fish red fish blue fish";
* Scanner s = new Scanner(input); * Scanner s = new Scanner(input);
* s.findInLine("(\\d+) fish (\\d+) fish (\\w+) fish (\\w+)"); * s.findInLine("(\\d+) fish (\\d+) fish (\\w+) fish (\\w+)");
* MatchResult result = s.match(); * MatchResult result = s.match();
* for (int i=1; i<=result.groupCount(); i++) * for (int i=1; i<=result.groupCount(); i++)
* System.out.println(result.group(i)); * System.out.println(result.group(i));
* s.close(); </pre></blockquote> * s.close();
* }</pre></blockquote>
* *
* <p>The <a name="default-delimiter">default whitespace delimiter</a> used * <p>The <a name="default-delimiter">default whitespace delimiter</a> used
* by a scanner is as recognized by {@link java.lang.Character}.{@link * by a scanner is as recognized by {@link java.lang.Character}.{@link
...@@ -2640,11 +2644,11 @@ public final class Scanner implements Iterator<String>, Closeable { ...@@ -2640,11 +2644,11 @@ public final class Scanner implements Iterator<String>, Closeable {
* <tt>scanner.reset()</tt> behaves in exactly the same way as the * <tt>scanner.reset()</tt> behaves in exactly the same way as the
* invocation * invocation
* *
* <blockquote><pre> * <blockquote><pre>{@code
* scanner.useDelimiter("\\p{javaWhitespace}+") * scanner.useDelimiter("\\p{javaWhitespace}+")
* .useLocale(Locale.getDefault(Locale.Category.FORMAT)) * .useLocale(Locale.getDefault(Locale.Category.FORMAT))
* .useRadix(10); * .useRadix(10);
* </pre></blockquote> * }</pre></blockquote>
* *
* @return this scanner * @return this scanner
* *
......
...@@ -130,14 +130,14 @@ public abstract class TimerTask implements Runnable { ...@@ -130,14 +130,14 @@ public abstract class TimerTask implements Runnable {
* <p>This method is typically invoked from within a task's run method, to * <p>This method is typically invoked from within a task's run method, to
* determine whether the current execution of the task is sufficiently * determine whether the current execution of the task is sufficiently
* timely to warrant performing the scheduled activity: * timely to warrant performing the scheduled activity:
* <pre> * <pre>{@code
* public void run() { * public void run() {
* if (System.currentTimeMillis() - scheduledExecutionTime() >= * if (System.currentTimeMillis() - scheduledExecutionTime() >=
* MAX_TARDINESS) * MAX_TARDINESS)
* return; // Too late; skip this execution. * return; // Too late; skip this execution.
* // Perform the task * // Perform the task
* } * }
* </pre> * }</pre>
* This method is typically <i>not</i> used in conjunction with * This method is typically <i>not</i> used in conjunction with
* <i>fixed-delay execution</i> repeating tasks, as their scheduled * <i>fixed-delay execution</i> repeating tasks, as their scheduled
* execution times are allowed to drift over time, and so are not terribly * execution times are allowed to drift over time, and so are not terribly
......
...@@ -45,7 +45,7 @@ import java.beans.PropertyChangeListener; ...@@ -45,7 +45,7 @@ import java.beans.PropertyChangeListener;
* transform the byte-stream back to JAR format. * transform the byte-stream back to JAR format.
* <p> * <p>
* Here is an example using packer and unpacker:<p> * Here is an example using packer and unpacker:<p>
* <blockquote><pre> * <pre>{@code
* import java.util.jar.Pack200; * import java.util.jar.Pack200;
* import java.util.jar.Pack200.*; * import java.util.jar.Pack200.*;
* ... * ...
...@@ -90,7 +90,7 @@ import java.beans.PropertyChangeListener; ...@@ -90,7 +90,7 @@ import java.beans.PropertyChangeListener;
* } catch (IOException ioe) { * } catch (IOException ioe) {
* ioe.printStackTrace(); * ioe.printStackTrace();
* } * }
* </pre></blockquote> * }</pre>
* <p> * <p>
* A Pack200 file compressed with gzip can be hosted on HTTP/1.1 web servers. * A Pack200 file compressed with gzip can be hosted on HTTP/1.1 web servers.
* The deployment applications can use "Accept-Encoding=pack200-gzip". This * The deployment applications can use "Accept-Encoding=pack200-gzip". This
......
...@@ -35,7 +35,7 @@ import java.net.*; ...@@ -35,7 +35,7 @@ import java.net.*;
* <p> * <p>
* <b>Configuration:</b> * <b>Configuration:</b>
* By default each <tt>ConsoleHandler</tt> is initialized using the following * By default each <tt>ConsoleHandler</tt> is initialized using the following
* <tt>LogManager</tt> configuration properties where <tt><handler-name></tt> * <tt>LogManager</tt> configuration properties where {@code <handler-name>}
* refers to the fully-qualified class name of the handler. * refers to the fully-qualified class name of the handler.
* If properties are not defined * If properties are not defined
* (or have invalid values) then the specified default values are used. * (or have invalid values) then the specified default values are used.
......
...@@ -333,7 +333,7 @@ public class FileHandler extends StreamHandler { ...@@ -333,7 +333,7 @@ public class FileHandler extends StreamHandler {
* @exception IOException if there are IO problems opening the files. * @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if * @exception SecurityException if a security manager exists and if
* the caller does not have <tt>LoggingPermission("control")</tt>. * the caller does not have <tt>LoggingPermission("control")</tt>.
* @exception IllegalArgumentException if limit < 0, or count < 1. * @exception IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
* @exception IllegalArgumentException if pattern is an empty string * @exception IllegalArgumentException if pattern is an empty string
*/ */
public FileHandler(String pattern, int limit, int count) public FileHandler(String pattern, int limit, int count)
...@@ -371,7 +371,7 @@ public class FileHandler extends StreamHandler { ...@@ -371,7 +371,7 @@ public class FileHandler extends StreamHandler {
* @exception IOException if there are IO problems opening the files. * @exception IOException if there are IO problems opening the files.
* @exception SecurityException if a security manager exists and if * @exception SecurityException if a security manager exists and if
* the caller does not have <tt>LoggingPermission("control")</tt>. * the caller does not have <tt>LoggingPermission("control")</tt>.
* @exception IllegalArgumentException if limit < 0, or count < 1. * @exception IllegalArgumentException if {@code limit < 0}, or {@code count < 1}.
* @exception IllegalArgumentException if pattern is an empty string * @exception IllegalArgumentException if pattern is an empty string
* *
*/ */
......
...@@ -64,7 +64,7 @@ package java.util.logging; ...@@ -64,7 +64,7 @@ package java.util.logging;
* (defaults to no <tt>Filter</tt>). </li> * (defaults to no <tt>Filter</tt>). </li>
* <li> &lt;handler-name&gt;.size * <li> &lt;handler-name&gt;.size
* defines the buffer size (defaults to 1000). </li> * defines the buffer size (defaults to 1000). </li>
* <li> &lt;handler-name>.push * <li> &lt;handler-name&gt;.push
* defines the <tt>pushLevel</tt> (defaults to <tt>level.SEVERE</tt>). </li> * defines the <tt>pushLevel</tt> (defaults to <tt>level.SEVERE</tt>). </li>
* <li> &lt;handler-name&gt;.target * <li> &lt;handler-name&gt;.target
* specifies the name of the target <tt>Handler </tt> class. * specifies the name of the target <tt>Handler </tt> class.
...@@ -155,7 +155,7 @@ public class MemoryHandler extends Handler { ...@@ -155,7 +155,7 @@ public class MemoryHandler extends Handler {
* @param size the number of log records to buffer (must be greater than zero) * @param size the number of log records to buffer (must be greater than zero)
* @param pushLevel message level to push on * @param pushLevel message level to push on
* *
* @throws IllegalArgumentException if size is <= 0 * @throws IllegalArgumentException if {@code size is <= 0}
*/ */
public MemoryHandler(Handler target, int size, Level pushLevel) { public MemoryHandler(Handler target, int size, Level pushLevel) {
if (target == null || pushLevel == null) { if (target == null || pushLevel == null) {
......
...@@ -134,52 +134,52 @@ import java.lang.Double; ...@@ -134,52 +134,52 @@ import java.lang.Double;
* subsequently restore from the backup. * subsequently restore from the backup.
* *
* <p>The XML document has the following DOCTYPE declaration: * <p>The XML document has the following DOCTYPE declaration:
* <pre> * <pre>{@code
* &lt;!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"&gt; * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre> * }</pre>
* Note that the system URI (http://java.sun.com/dtd/preferences.dtd) is * Note that the system URI (http://java.sun.com/dtd/preferences.dtd) is
* <i>not</i> accessed when exporting or importing preferences; it merely * <i>not</i> accessed when exporting or importing preferences; it merely
* serves as a string to uniquely identify the DTD, which is: * serves as a string to uniquely identify the DTD, which is:
* <pre> * <pre>{@code
* &lt;?xml version="1.0" encoding="UTF-8"?&gt; * <?xml version="1.0" encoding="UTF-8"?>
* *
* &lt;!-- DTD for a Preferences tree. --&gt; * <!-- DTD for a Preferences tree. -->
* *
* &lt;!-- The preferences element is at the root of an XML document * <!-- The preferences element is at the root of an XML document
* representing a Preferences tree. --&gt; * representing a Preferences tree. -->
* &lt;!ELEMENT preferences (root)&gt; * <!ELEMENT preferences (root)>
* *
* &lt;!-- The preferences element contains an optional version attribute, * <!-- The preferences element contains an optional version attribute,
* which specifies version of DTD. --&gt; * which specifies version of DTD. -->
* &lt;!ATTLIST preferences EXTERNAL_XML_VERSION CDATA "0.0" &gt * <!ATTLIST preferences EXTERNAL_XML_VERSION CDATA "0.0" >
* *
* &lt;!-- The root element has a map representing the root's preferences * <!-- The root element has a map representing the root's preferences
* (if any), and one node for each child of the root (if any). --&gt; * (if any), and one node for each child of the root (if any). -->
* &lt;!ELEMENT root (map, node*) &gt; * <!ELEMENT root (map, node*) >
* *
* &lt;!-- Additionally, the root contains a type attribute, which * <!-- Additionally, the root contains a type attribute, which
* specifies whether it's the system or user root. --&gt; * specifies whether it's the system or user root. -->
* &lt;!ATTLIST root * <!ATTLIST root
* type (system|user) #REQUIRED &gt; * type (system|user) #REQUIRED >
* *
* &lt;!-- Each node has a map representing its preferences (if any), * <!-- Each node has a map representing its preferences (if any),
* and one node for each child (if any). --&gt; * and one node for each child (if any). -->
* &lt;!ELEMENT node (map, node*) &gt; * <!ELEMENT node (map, node*) >
* *
* &lt;!-- Additionally, each node has a name attribute --&gt; * <!-- Additionally, each node has a name attribute -->
* &lt;!ATTLIST node * <!ATTLIST node
* name CDATA #REQUIRED &gt; * name CDATA #REQUIRED >
* *
* &lt;!-- A map represents the preferences stored at a node (if any). --&gt; * <!-- A map represents the preferences stored at a node (if any). -->
* &lt;!ELEMENT map (entry*) &gt; * <!ELEMENT map (entry*) >
* *
* &lt;!-- An entry represents a single preference, which is simply * <!-- An entry represents a single preference, which is simply
* a key-value pair. --&gt; * a key-value pair. -->
* &lt;!ELEMENT entry EMPTY &gt; * <!ELEMENT entry EMPTY >
* &lt;!ATTLIST entry * <!ATTLIST entry
* key CDATA #REQUIRED * key CDATA #REQUIRED
* value CDATA #REQUIRED &gt; * value CDATA #REQUIRED >
* </pre> * }</pre>
* *
* Every <tt>Preferences</tt> implementation must have an associated {@link * Every <tt>Preferences</tt> implementation must have an associated {@link
* PreferencesFactory} implementation. Every Java(TM) SE implementation must provide * PreferencesFactory} implementation. Every Java(TM) SE implementation must provide
...@@ -1161,9 +1161,9 @@ public abstract class Preferences { ...@@ -1161,9 +1161,9 @@ public abstract class Preferences {
* This XML document is, in effect, an offline backup of the node. * This XML document is, in effect, an offline backup of the node.
* *
* <p>The XML document will have the following DOCTYPE declaration: * <p>The XML document will have the following DOCTYPE declaration:
* <pre> * <pre>{@code
* &lt;!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"&gt; * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre> * }</pre>
* The UTF-8 character encoding will be used. * The UTF-8 character encoding will be used.
* *
* <p>This method is an exception to the general rule that the results of * <p>This method is an exception to the general rule that the results of
...@@ -1192,9 +1192,9 @@ public abstract class Preferences { ...@@ -1192,9 +1192,9 @@ public abstract class Preferences {
* effect, an offline backup of the subtree rooted at the node. * effect, an offline backup of the subtree rooted at the node.
* *
* <p>The XML document will have the following DOCTYPE declaration: * <p>The XML document will have the following DOCTYPE declaration:
* <pre> * <pre>{@code
* &lt;!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"&gt; * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre> * }</pre>
* The UTF-8 character encoding will be used. * The UTF-8 character encoding will be used.
* *
* <p>This method is an exception to the general rule that the results of * <p>This method is an exception to the general rule that the results of
...@@ -1228,9 +1228,9 @@ public abstract class Preferences { ...@@ -1228,9 +1228,9 @@ public abstract class Preferences {
* do not exist, the nodes will be created. * do not exist, the nodes will be created.
* *
* <p>The XML document must have the following DOCTYPE declaration: * <p>The XML document must have the following DOCTYPE declaration:
* <pre> * <pre>{@code
* &lt;!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"&gt; * <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre> * }</pre>
* (This method is designed for use in conjunction with * (This method is designed for use in conjunction with
* {@link #exportNode(OutputStream)} and * {@link #exportNode(OutputStream)} and
* {@link #exportSubtree(OutputStream)}. * {@link #exportSubtree(OutputStream)}.
......
...@@ -79,7 +79,7 @@ public interface MatchResult { ...@@ -79,7 +79,7 @@ public interface MatchResult {
/** /**
* Returns the offset after the last character matched. </p> * Returns the offset after the last character matched. </p>
* *
* @return @return The offset after the last character matched * @return The offset after the last character matched
* *
* @throws IllegalStateException * @throws IllegalStateException
* If no match has yet been attempted, * If no match has yet been attempted,
......
...@@ -108,7 +108,7 @@ import java.util.stream.StreamSupport; ...@@ -108,7 +108,7 @@ import java.util.stream.StreamSupport;
* <tr><td valign="top" headers="construct characters"><tt>&#92;x</tt><i>{h...h}</i></td> * <tr><td valign="top" headers="construct characters"><tt>&#92;x</tt><i>{h...h}</i></td>
* <td headers="matches">The character with hexadecimal&nbsp;value&nbsp;<tt>0x</tt><i>h...h</i> * <td headers="matches">The character with hexadecimal&nbsp;value&nbsp;<tt>0x</tt><i>h...h</i>
* ({@link java.lang.Character#MIN_CODE_POINT Character.MIN_CODE_POINT} * ({@link java.lang.Character#MIN_CODE_POINT Character.MIN_CODE_POINT}
* &nbsp;&lt;=&nbsp;<tt>0x</tt><i>h...h</i>&nbsp;&lt;=&nbsp * &nbsp;&lt;=&nbsp;<tt>0x</tt><i>h...h</i>&nbsp;&lt;=&nbsp;
* {@link java.lang.Character#MAX_CODE_POINT Character.MAX_CODE_POINT})</td></tr> * {@link java.lang.Character#MAX_CODE_POINT Character.MAX_CODE_POINT})</td></tr>
* <tr><td valign="top" headers="matches"><tt>\t</tt></td> * <tr><td valign="top" headers="matches"><tt>\t</tt></td>
* <td headers="matches">The tab character (<tt>'&#92;u0009'</tt>)</td></tr> * <td headers="matches">The tab character (<tt>'&#92;u0009'</tt>)</td></tr>
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
* parallelism is explicitly requested. For example, {@code Collection} has methods * parallelism is explicitly requested. For example, {@code Collection} has methods
* {@link java.util.Collection#stream} and {@link java.util.Collection#parallelStream}, * {@link java.util.Collection#stream} and {@link java.util.Collection#parallelStream},
* which produce sequential and parallel streams respectively; other stream-bearing methods * which produce sequential and parallel streams respectively; other stream-bearing methods
* such as {@link java.util.stream.Streams#intRange(int, int)} produce sequential * such as {@link java.util.stream.IntStream#range(int, int)} produce sequential
* streams but these can be efficiently parallelized by calling {@code parallel()} on the * streams but these can be efficiently parallelized by calling {@code parallel()} on the
* result. The set of operations on serial and parallel streams is identical. To execute the * result. The set of operations on serial and parallel streams is identical. To execute the
* "sum of weights of blocks" query in parallel, we would do: * "sum of weights of blocks" query in parallel, we would do:
......
...@@ -97,7 +97,7 @@ public class DeflaterInputStream extends FilterInputStream { ...@@ -97,7 +97,7 @@ public class DeflaterInputStream extends FilterInputStream {
* @param in input stream to read the uncompressed data to * @param in input stream to read the uncompressed data to
* @param defl compressor ("deflater") for this stream * @param defl compressor ("deflater") for this stream
* @param bufLen compression buffer size * @param bufLen compression buffer size
* @throws IllegalArgumentException if {@code bufLen} is <= 0 * @throws IllegalArgumentException if {@code bufLen <= 0}
* @throws NullPointerException if {@code in} or {@code defl} is null * @throws NullPointerException if {@code in} or {@code defl} is null
*/ */
public DeflaterInputStream(InputStream in, Deflater defl, int bufLen) { public DeflaterInputStream(InputStream in, Deflater defl, int bufLen) {
...@@ -163,8 +163,7 @@ public class DeflaterInputStream extends FilterInputStream { ...@@ -163,8 +163,7 @@ public class DeflaterInputStream extends FilterInputStream {
* @param len maximum number of compressed bytes to read into {@code b} * @param len maximum number of compressed bytes to read into {@code b}
* @return the actual number of bytes read, or -1 if the end of the * @return the actual number of bytes read, or -1 if the end of the
* uncompressed input stream is reached * uncompressed input stream is reached
* @throws IndexOutOfBoundsException if {@code len} > {@code b.length - * @throws IndexOutOfBoundsException if {@code len > b.length - off}
* off}
* @throws IOException if an I/O error occurs or if this input stream is * @throws IOException if an I/O error occurs or if this input stream is
* already closed * already closed
*/ */
......
...@@ -71,7 +71,7 @@ class DeflaterOutputStream extends FilterOutputStream { ...@@ -71,7 +71,7 @@ class DeflaterOutputStream extends FilterOutputStream {
* {@link Deflater#SYNC_FLUSH} before flushing the output * {@link Deflater#SYNC_FLUSH} before flushing the output
* stream, otherwise only flushes the output stream * stream, otherwise only flushes the output stream
* *
* @throws IllegalArgumentException if size is <= 0 * @throws IllegalArgumentException if {@code size <= 0}
* *
* @since 1.7 * @since 1.7
*/ */
...@@ -101,7 +101,7 @@ class DeflaterOutputStream extends FilterOutputStream { ...@@ -101,7 +101,7 @@ class DeflaterOutputStream extends FilterOutputStream {
* @param out the output stream * @param out the output stream
* @param def the compressor ("deflater") * @param def the compressor ("deflater")
* @param size the output buffer size * @param size the output buffer size
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
*/ */
public DeflaterOutputStream(OutputStream out, Deflater def, int size) { public DeflaterOutputStream(OutputStream out, Deflater def, int size) {
this(out, def, size, false); this(out, def, size, false);
......
...@@ -71,7 +71,7 @@ class GZIPInputStream extends InflaterInputStream { ...@@ -71,7 +71,7 @@ class GZIPInputStream extends InflaterInputStream {
* @exception ZipException if a GZIP format error has occurred or the * @exception ZipException if a GZIP format error has occurred or the
* compression method used is unsupported * compression method used is unsupported
* @exception IOException if an I/O error has occurred * @exception IOException if an I/O error has occurred
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
*/ */
public GZIPInputStream(InputStream in, int size) throws IOException { public GZIPInputStream(InputStream in, int size) throws IOException {
super(in, new Inflater(true), size); super(in, new Inflater(true), size);
......
...@@ -61,8 +61,7 @@ class GZIPOutputStream extends DeflaterOutputStream { ...@@ -61,8 +61,7 @@ class GZIPOutputStream extends DeflaterOutputStream {
* @param out the output stream * @param out the output stream
* @param size the output buffer size * @param size the output buffer size
* @exception IOException If an I/O error has occurred. * @exception IOException If an I/O error has occurred.
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
*/ */
public GZIPOutputStream(OutputStream out, int size) throws IOException { public GZIPOutputStream(OutputStream out, int size) throws IOException {
this(out, size, false); this(out, size, false);
...@@ -81,7 +80,7 @@ class GZIPOutputStream extends DeflaterOutputStream { ...@@ -81,7 +80,7 @@ class GZIPOutputStream extends DeflaterOutputStream {
* {@link Deflater#SYNC_FLUSH} before flushing the output * {@link Deflater#SYNC_FLUSH} before flushing the output
* stream, otherwise only flushes the output stream * stream, otherwise only flushes the output stream
* @exception IOException If an I/O error has occurred. * @exception IOException If an I/O error has occurred.
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
* *
* @since 1.7 * @since 1.7
*/ */
......
...@@ -75,7 +75,7 @@ class InflaterInputStream extends FilterInputStream { ...@@ -75,7 +75,7 @@ class InflaterInputStream extends FilterInputStream {
* @param in the input stream * @param in the input stream
* @param inf the decompressor ("inflater") * @param inf the decompressor ("inflater")
* @param size the input buffer size * @param size the input buffer size
* @exception IllegalArgumentException if size is <= 0 * @exception IllegalArgumentException if {@code size <= 0}
*/ */
public InflaterInputStream(InputStream in, Inflater inf, int size) { public InflaterInputStream(InputStream in, Inflater inf, int size) {
super(in); super(in);
...@@ -191,7 +191,7 @@ class InflaterInputStream extends FilterInputStream { ...@@ -191,7 +191,7 @@ class InflaterInputStream extends FilterInputStream {
* @param n the number of bytes to skip * @param n the number of bytes to skip
* @return the actual number of bytes skipped. * @return the actual number of bytes skipped.
* @exception IOException if an I/O error has occurred * @exception IOException if an I/O error has occurred
* @exception IllegalArgumentException if n < 0 * @exception IllegalArgumentException if {@code n < 0}
*/ */
public long skip(long n) throws IOException { public long skip(long n) throws IOException {
if (n < 0) { if (n < 0) {
......
...@@ -97,7 +97,7 @@ public class InflaterOutputStream extends FilterOutputStream { ...@@ -97,7 +97,7 @@ public class InflaterOutputStream extends FilterOutputStream {
* @param out output stream to write the uncompressed data to * @param out output stream to write the uncompressed data to
* @param infl decompressor ("inflater") for this stream * @param infl decompressor ("inflater") for this stream
* @param bufLen decompression buffer size * @param bufLen decompression buffer size
* @throws IllegalArgumentException if {@code bufLen} is <= 0 * @throws IllegalArgumentException if {@code bufLen <= 0}
* @throws NullPointerException if {@code out} or {@code infl} is null * @throws NullPointerException if {@code out} or {@code infl} is null
*/ */
public InflaterOutputStream(OutputStream out, Inflater infl, int bufLen) { public InflaterOutputStream(OutputStream out, Inflater infl, int bufLen) {
...@@ -211,8 +211,8 @@ public class InflaterOutputStream extends FilterOutputStream { ...@@ -211,8 +211,8 @@ public class InflaterOutputStream extends FilterOutputStream {
* the output stream * the output stream
* @param off starting offset of the compressed data within {@code b} * @param off starting offset of the compressed data within {@code b}
* @param len number of bytes to decompress from {@code b} * @param len number of bytes to decompress from {@code b}
* @throws IndexOutOfBoundsException if {@code off} < 0, or if * @throws IndexOutOfBoundsException if {@code off < 0}, or if
* {@code len} < 0, or if {@code len} > {@code b.length - off} * {@code len < 0}, or if {@code len > b.length - off}
* @throws IOException if an I/O error occurs or this stream is already * @throws IOException if an I/O error occurs or this stream is already
* closed * closed
* @throws NullPointerException if {@code b} is null * @throws NullPointerException if {@code b} is null
......
...@@ -232,7 +232,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants { ...@@ -232,7 +232,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
* @return the actual number of bytes skipped * @return the actual number of bytes skipped
* @exception ZipException if a ZIP file error has occurred * @exception ZipException if a ZIP file error has occurred
* @exception IOException if an I/O error has occurred * @exception IOException if an I/O error has occurred
* @exception IllegalArgumentException if n < 0 * @exception IllegalArgumentException if {@code n < 0}
*/ */
public long skip(long n) throws IOException { public long skip(long n) throws IOException {
if (n < 0) { if (n < 0) {
......
...@@ -68,7 +68,7 @@ public class IvParameterSpec implements AlgorithmParameterSpec { ...@@ -68,7 +68,7 @@ public class IvParameterSpec implements AlgorithmParameterSpec {
* starts. * starts.
* @param len the number of IV bytes. * @param len the number of IV bytes.
* @throws IllegalArgumentException if <code>iv</code> is <code>null</code> * @throws IllegalArgumentException if <code>iv</code> is <code>null</code>
* or <code>(iv.length - offset < len)</code> * or {@code (iv.length - offset < len)}
* @throws ArrayIndexOutOfBoundsException is thrown if <code>offset</code> * @throws ArrayIndexOutOfBoundsException is thrown if <code>offset</code>
* or <code>len</code> index bytes outside the <code>iv</code>. * or <code>len</code> index bytes outside the <code>iv</code>.
*/ */
......
...@@ -80,7 +80,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec { ...@@ -80,7 +80,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
* </code> bytes of the buffer are copied to protect against subsequent * </code> bytes of the buffer are copied to protect against subsequent
* modification. * modification.
* @exception IllegalArgumentException if <code>iv</code> is * @exception IllegalArgumentException if <code>iv</code> is
* <code>null</code> or <code>(iv.length < 2 * (wordSize / 8))</code> * <code>null</code> or {@code (iv.length < 2 * (wordSize / 8))}
*/ */
public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) { public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) {
this(version, rounds, wordSize, iv, 0); this(version, rounds, wordSize, iv, 0);
...@@ -107,7 +107,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec { ...@@ -107,7 +107,7 @@ public class RC5ParameterSpec implements AlgorithmParameterSpec {
* @param offset the offset in <code>iv</code> where the IV starts. * @param offset the offset in <code>iv</code> where the IV starts.
* @exception IllegalArgumentException if <code>iv</code> is * @exception IllegalArgumentException if <code>iv</code> is
* <code>null</code> or * <code>null</code> or
* <code>(iv.length - offset < 2 * (wordSize / 8))</code> * {@code (iv.length - offset < 2 * (wordSize / 8))}
*/ */
public RC5ParameterSpec(int version, int rounds, int wordSize, public RC5ParameterSpec(int version, int rounds, int wordSize,
byte[] iv, int offset) { byte[] iv, int offset) {
......
...@@ -130,7 +130,7 @@ public class SecretKeySpec implements KeySpec, SecretKey { ...@@ -130,7 +130,7 @@ public class SecretKeySpec implements KeySpec, SecretKey {
* for information about standard algorithm names. * for information about standard algorithm names.
* @exception IllegalArgumentException if <code>algorithm</code> * @exception IllegalArgumentException if <code>algorithm</code>
* is null or <code>key</code> is null, empty, or too short, * is null or <code>key</code> is null, empty, or too short,
* i.e. <code>key.length-offset<len</code>. * i.e. {@code key.length-offset<len}.
* @exception ArrayIndexOutOfBoundsException is thrown if * @exception ArrayIndexOutOfBoundsException is thrown if
* <code>offset</code> or <code>len</code> index bytes outside the * <code>offset</code> or <code>len</code> index bytes outside the
* <code>key</code>. * <code>key</code>.
......
...@@ -89,9 +89,9 @@ public class BinaryRefAddr extends RefAddr { ...@@ -89,9 +89,9 @@ public class BinaryRefAddr extends RefAddr {
* @param src The non-null contents of the address as a byte array. * @param src The non-null contents of the address as a byte array.
* The contents of src is copied into the new BinaryRefAddr. * The contents of src is copied into the new BinaryRefAddr.
* @param offset The starting index in src to get the bytes. * @param offset The starting index in src to get the bytes.
* 0 <= offset <= src.length. * {@code 0 <= offset <= src.length}.
* @param count The number of bytes to extract from src. * @param count The number of bytes to extract from src.
* 0 <= count <= src.length-offset. * {@code 0 <= count <= src.length-offset}.
*/ */
public BinaryRefAddr(String addrType, byte[] src, int offset, int count) { public BinaryRefAddr(String addrType, byte[] src, int offset, int count) {
super(addrType); super(addrType);
......
...@@ -265,7 +265,7 @@ public interface Attribute extends Cloneable, java.io.Serializable { ...@@ -265,7 +265,7 @@ public interface Attribute extends Cloneable, java.io.Serializable {
* If the attribute values are unordered, * If the attribute values are unordered,
* this method returns the value that happens to be at that index. * 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. * @param ix The index of the value in the ordered list of attribute values.
* 0 <= <tt>ix</tt> < <tt>size()</tt>. * {@code 0 <= ix < size()}.
* @return The possibly null attribute value at index <tt>ix</tt>; * @return The possibly null attribute value at index <tt>ix</tt>;
* null if the attribute value is null. * null if the attribute value is null.
* @exception NamingException If a naming exception was encountered while * @exception NamingException If a naming exception was encountered while
...@@ -284,7 +284,7 @@ public interface Attribute extends Cloneable, java.io.Serializable { ...@@ -284,7 +284,7 @@ public interface Attribute extends Cloneable, java.io.Serializable {
* the front of the list (and their indices decremented by one). * the front of the list (and their indices decremented by one).
* *
* @param ix The index of the value to remove. * @param ix The index of the value to remove.
* 0 <= <tt>ix</tt> < <tt>size()</tt>. * {@code 0 <= ix < size()}.
* @return The possibly null attribute value at index <tt>ix</tt> that was removed; * @return The possibly null attribute value at index <tt>ix</tt> that was removed;
* null if the attribute value is null. * null if the attribute value is null.
* @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range. * @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range.
...@@ -302,7 +302,7 @@ public interface Attribute extends Cloneable, java.io.Serializable { ...@@ -302,7 +302,7 @@ public interface Attribute extends Cloneable, java.io.Serializable {
* <tt>IllegalStateException</tt> is thrown. * <tt>IllegalStateException</tt> is thrown.
* *
* @param ix The index in the ordered list of attribute values to add the new value. * @param ix The index in the ordered list of attribute values to add the new value.
* 0 <= <tt>ix</tt> <= <tt>size()</tt>. * {@code 0 <= ix <= size()}.
* @param attrVal The possibly null attribute value to add; if null, null is * @param attrVal The possibly null attribute value to add; if null, null is
* the value added. * the value added.
* @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range. * @exception IndexOutOfBoundsException If <tt>ix</tt> is outside the specified range.
...@@ -322,7 +322,7 @@ public interface Attribute extends Cloneable, java.io.Serializable { ...@@ -322,7 +322,7 @@ public interface Attribute extends Cloneable, java.io.Serializable {
* In that case, <tt>IllegalStateException</tt> is thrown. * In that case, <tt>IllegalStateException</tt> is thrown.
* *
* @param ix The index of the value in the ordered list of attribute values. * @param ix The index of the value in the ordered list of attribute values.
* 0 <= <tt>ix</tt> < <tt>size()</tt>. * {@code 0 <= ix < size()}.
* @param attrVal The possibly null attribute value to use. * @param attrVal The possibly null attribute value to use.
* If null, 'null' replaces the old value. * If null, 'null' replaces the old value.
* @return The possibly null attribute value at index ix that was replaced. * @return The possibly null attribute value at index ix that was replaced.
......
...@@ -443,7 +443,7 @@ public class LdapName implements Name { ...@@ -443,7 +443,7 @@ public class LdapName implements Name {
* @throws InvalidNameException if <tt>suffix</tt> is not a valid LDAP * @throws InvalidNameException if <tt>suffix</tt> is not a valid LDAP
* name, or if the addition of the components would violate the * name, or if the addition of the components would violate the
* syntax rules of this LDAP name. * syntax rules of this LDAP name.
* @throws IndexOutOfBoundsException. * @throws IndexOutOfBoundsException
* If posn is outside the specified range. * If posn is outside the specified range.
*/ */
public Name addAll(int posn, Name suffix) public Name addAll(int posn, Name suffix)
...@@ -474,7 +474,7 @@ public class LdapName implements Name { ...@@ -474,7 +474,7 @@ public class LdapName implements Name {
* Must be in the range [0,size()]. * Must be in the range [0,size()].
* *
* @return The updated name (not a new instance). * @return The updated name (not a new instance).
* @throws IndexOutOfBoundsException. * @throws IndexOutOfBoundsException
* If posn is outside the specified range. * If posn is outside the specified range.
*/ */
public Name addAll(int posn, List<Rdn> suffixRdns) { public Name addAll(int posn, List<Rdn> suffixRdns) {
...@@ -527,7 +527,7 @@ public class LdapName implements Name { ...@@ -527,7 +527,7 @@ public class LdapName implements Name {
* Must be in the range [0,size()]. * Must be in the range [0,size()].
* @return The updated LdapName, not a new instance. * @return The updated LdapName, not a new instance.
* Cannot be null. * Cannot be null.
* @exception IndexOutOfBoundsException. * @exception IndexOutOfBoundsException
* If posn is outside the specified range. * If posn is outside the specified range.
* @exception InvalidNameException If adding comp at the * @exception InvalidNameException If adding comp at the
* specified position would violate the name's syntax. * specified position would violate the name's syntax.
......
...@@ -36,7 +36,7 @@ import com.sun.jndi.ldap.BerEncoder; ...@@ -36,7 +36,7 @@ import com.sun.jndi.ldap.BerEncoder;
* at which it invokes search operations. * at which it invokes search operations.
* <p> * <p>
* The following code sample shows how the class may be used: * The following code sample shows how the class may be used:
* <pre> * <pre>{@code
* *
* // Open an LDAP association * // Open an LDAP association
* LdapContext ctx = new InitialLdapContext(); * LdapContext ctx = new InitialLdapContext();
...@@ -89,13 +89,13 @@ import com.sun.jndi.ldap.BerEncoder; ...@@ -89,13 +89,13 @@ import com.sun.jndi.ldap.BerEncoder;
* ctx.close(); * ctx.close();
* ... * ...
* *
* </pre> * } </pre>
* <p> * <p>
* This class implements the LDAPv3 Control for paged-results as defined in * This class implements the LDAPv3 Control for paged-results as defined in
* <a href="http://www.ietf.org/rfc/rfc2696.txt">RFC 2696</a>. * <a href="http://www.ietf.org/rfc/rfc2696.txt">RFC 2696</a>.
* *
* The control's value has the following ASN.1 definition: * The control's value has the following ASN.1 definition:
* <pre> * <pre>{@code
* *
* realSearchControlValue ::= SEQUENCE { * realSearchControlValue ::= SEQUENCE {
* size INTEGER (0..maxInt), * size INTEGER (0..maxInt),
...@@ -104,7 +104,7 @@ import com.sun.jndi.ldap.BerEncoder; ...@@ -104,7 +104,7 @@ import com.sun.jndi.ldap.BerEncoder;
* cookie OCTET STRING * cookie OCTET STRING
* } * }
* *
* </pre> * }</pre>
* *
* @since 1.5 * @since 1.5
* @see PagedResultsResponseControl * @see PagedResultsResponseControl
......
...@@ -40,7 +40,7 @@ import com.sun.jndi.ldap.BerEncoder; ...@@ -40,7 +40,7 @@ import com.sun.jndi.ldap.BerEncoder;
* then the search operation is not performed and an error is returned. * then the search operation is not performed and an error is returned.
* <p> * <p>
* The following code sample shows how the class may be used: * The following code sample shows how the class may be used:
* <pre> * <pre>{@code
* *
* // Open an LDAP association * // Open an LDAP association
* LdapContext ctx = new InitialLdapContext(); * LdapContext ctx = new InitialLdapContext();
...@@ -85,7 +85,7 @@ import com.sun.jndi.ldap.BerEncoder; ...@@ -85,7 +85,7 @@ import com.sun.jndi.ldap.BerEncoder;
* ctx.close(); * ctx.close();
* ... * ...
* *
* </pre> * }</pre>
* <p> * <p>
* This class implements the LDAPv3 Request Control for server-side sorting * This class implements the LDAPv3 Request Control for server-side sorting
* as defined in * as defined in
......
...@@ -295,8 +295,8 @@ public final class SNIHostName extends SNIServerName { ...@@ -295,8 +295,8 @@ public final class SNIHostName extends SNIServerName {
* representing the hostname(s) to match * representing the hostname(s) to match
* @throws NullPointerException if {@code regex} is * @throws NullPointerException if {@code regex} is
* {@code null} * {@code null}
* @throws PatternSyntaxException if the regular expression's syntax * @throws java.util.regex.PatternSyntaxException if the regular expression's
* is invalid * syntax is invalid
*/ */
public static SNIMatcher createSNIMatcher(String regex) { public static SNIMatcher createSNIMatcher(String regex) {
if (regex == null) { if (regex == null) {
......
...@@ -211,7 +211,7 @@ import java.nio.ReadOnlyBufferException; ...@@ -211,7 +211,7 @@ import java.nio.ReadOnlyBufferException;
* that the source buffer has enough room to hold a record (enlarging if * that the source buffer has enough room to hold a record (enlarging if
* necessary), and then obtain more inbound data. * necessary), and then obtain more inbound data.
* *
* <pre> * <pre>{@code
* SSLEngineResult r = engine.unwrap(src, dst); * SSLEngineResult r = engine.unwrap(src, dst);
* switch (r.getStatus()) { * switch (r.getStatus()) {
* BUFFER_OVERFLOW: * BUFFER_OVERFLOW:
...@@ -238,7 +238,7 @@ import java.nio.ReadOnlyBufferException; ...@@ -238,7 +238,7 @@ import java.nio.ReadOnlyBufferException;
* break; * break;
* // other cases: CLOSED, OK. * // other cases: CLOSED, OK.
* } * }
* </pre> * }</pre>
* *
* <P> * <P>
* Unlike <code>SSLSocket</code>, all methods of SSLEngine are * Unlike <code>SSLSocket</code>, all methods of SSLEngine are
...@@ -442,7 +442,7 @@ public abstract class SSLEngine { ...@@ -442,7 +442,7 @@ public abstract class SSLEngine {
* <blockquote><pre> * <blockquote><pre>
* {@link #wrap(ByteBuffer [], int, int, ByteBuffer) * {@link #wrap(ByteBuffer [], int, int, ByteBuffer)
* engine.wrap(new ByteBuffer [] { src }, 0, 1, dst);} * engine.wrap(new ByteBuffer [] { src }, 0, 1, dst);}
* </pre</blockquote> * </pre></blockquote>
* *
* @param src * @param src
* a <code>ByteBuffer</code> containing outbound application data * a <code>ByteBuffer</code> containing outbound application data
...@@ -478,7 +478,7 @@ public abstract class SSLEngine { ...@@ -478,7 +478,7 @@ public abstract class SSLEngine {
* <blockquote><pre> * <blockquote><pre>
* {@link #wrap(ByteBuffer [], int, int, ByteBuffer) * {@link #wrap(ByteBuffer [], int, int, ByteBuffer)
* engine.wrap(srcs, 0, srcs.length, dst);} * engine.wrap(srcs, 0, srcs.length, dst);}
* </pre</blockquote> * </pre></blockquote>
* *
* @param srcs * @param srcs
* an array of <code>ByteBuffers</code> containing the * an array of <code>ByteBuffers</code> containing the
...@@ -597,7 +597,7 @@ public abstract class SSLEngine { ...@@ -597,7 +597,7 @@ public abstract class SSLEngine {
* <blockquote><pre> * <blockquote><pre>
* {@link #unwrap(ByteBuffer, ByteBuffer [], int, int) * {@link #unwrap(ByteBuffer, ByteBuffer [], int, int)
* engine.unwrap(src, new ByteBuffer [] { dst }, 0, 1);} * engine.unwrap(src, new ByteBuffer [] { dst }, 0, 1);}
* </pre</blockquote> * </pre></blockquote>
* *
* @param src * @param src
* a <code>ByteBuffer</code> containing inbound network data. * a <code>ByteBuffer</code> containing inbound network data.
...@@ -633,7 +633,7 @@ public abstract class SSLEngine { ...@@ -633,7 +633,7 @@ public abstract class SSLEngine {
* <blockquote><pre> * <blockquote><pre>
* {@link #unwrap(ByteBuffer, ByteBuffer [], int, int) * {@link #unwrap(ByteBuffer, ByteBuffer [], int, int)
* engine.unwrap(src, dsts, 0, dsts.length);} * engine.unwrap(src, dsts, 0, dsts.length);}
* </pre</blockquote> * </pre></blockquote>
* *
* @param src * @param src
* a <code>ByteBuffer</code> containing inbound network data. * a <code>ByteBuffer</code> containing inbound network data.
......
...@@ -173,7 +173,7 @@ public class SSLEngineResult { ...@@ -173,7 +173,7 @@ public class SSLEngineResult {
* *
* @throws IllegalArgumentException * @throws IllegalArgumentException
* if the <code>status</code> or <code>handshakeStatus</code> * if the <code>status</code> or <code>handshakeStatus</code>
* arguments are null, or if <<code>bytesConsumed</code> or * arguments are null, or if <code>bytesConsumed</code> or
* <code>bytesProduced</code> is negative. * <code>bytesProduced</code> is negative.
*/ */
public SSLEngineResult(Status status, HandshakeStatus handshakeStatus, public SSLEngineResult(Status status, HandshakeStatus handshakeStatus,
......
...@@ -90,7 +90,7 @@ public interface SSLSessionContext { ...@@ -90,7 +90,7 @@ public interface SSLSessionContext {
* @param seconds the new session timeout limit in seconds; zero means * @param seconds the new session timeout limit in seconds; zero means
* there is no limit. * there is no limit.
* *
* @exception IllegalArgumentException if the timeout specified is < 0. * @exception IllegalArgumentException if the timeout specified is {@code < 0}.
* @see #getSessionTimeout * @see #getSessionTimeout
*/ */
public void setSessionTimeout(int seconds) public void setSessionTimeout(int seconds)
...@@ -122,7 +122,7 @@ public interface SSLSessionContext { ...@@ -122,7 +122,7 @@ public interface SSLSessionContext {
* *
* @param size the new session cache size limit; zero means there is no * @param size the new session cache size limit; zero means there is no
* limit. * limit.
* @exception IllegalArgumentException if the specified size is < 0. * @exception IllegalArgumentException if the specified size is {@code < 0}.
* @see #getSessionCacheSize * @see #getSessionCacheSize
*/ */
public void setSessionCacheSize(int size) public void setSessionCacheSize(int size)
......
...@@ -144,8 +144,7 @@ public interface ScriptEngineFactory { ...@@ -144,8 +144,7 @@ public interface ScriptEngineFactory {
* of the supported scripting language. For instance, an implementaton for a Javascript * of the supported scripting language. For instance, an implementaton for a Javascript
* engine might be; * engine might be;
* <p> * <p>
* <pre> * <pre>{@code
* <code>
* public String getMethodCallSyntax(String obj, * public String getMethodCallSyntax(String obj,
* String m, String... args) { * String m, String... args) {
* String ret = obj; * String ret = obj;
...@@ -159,8 +158,7 @@ public interface ScriptEngineFactory { ...@@ -159,8 +158,7 @@ public interface ScriptEngineFactory {
* ret += ")"; * ret += ")";
* return ret; * return ret;
* } * }
*</code> * } </pre>
*</pre>
* <p> * <p>
* *
* @param obj The name representing the object whose method is to be invoked. The * @param obj The name representing the object whose method is to be invoked. The
...@@ -200,17 +198,17 @@ public interface ScriptEngineFactory { ...@@ -200,17 +198,17 @@ public interface ScriptEngineFactory {
* Returns A valid scripting language executable progam with given statements. * Returns A valid scripting language executable progam with given statements.
* For instance an implementation for a PHP engine might be: * For instance an implementation for a PHP engine might be:
* <p> * <p>
* <pre><code> * <pre>{@code
* public String getProgram(String... statements) { * public String getProgram(String... statements) {
* $retval = "&lt;?\n"; * $retval = "<?\n";
* int len = statements.length; * int len = statements.length;
* for (int i = 0; i < len; i++) { * for (int i = 0; i < len; i++) {
* $retval += statements[i] + ";\n"; * $retval += statements[i] + ";\n";
* } * }
* $retval += "?&gt;"; * $retval += "?>";
* *
* } * }
* </code></pre> * }</pre>
* *
* @param statements The statements to be executed. May be return values of * @param statements The statements to be executed. May be return values of
* calls to the <code>getMethodCallSyntax</code> and <code>getOutputStatement</code> methods. * calls to the <code>getMethodCallSyntax</code> and <code>getOutputStatement</code> methods.
......
...@@ -79,7 +79,7 @@ public interface CallbackHandler { ...@@ -79,7 +79,7 @@ public interface CallbackHandler {
* This example code is for guidance only. Many details, * This example code is for guidance only. Many details,
* including proper error handling, are left out for simplicity. * including proper error handling, are left out for simplicity.
* *
* <pre> * <pre>{@code
* public void handle(Callback[] callbacks) * public void handle(Callback[] callbacks)
* throws IOException, UnsupportedCallbackException { * throws IOException, UnsupportedCallbackException {
* *
...@@ -133,7 +133,7 @@ public interface CallbackHandler { ...@@ -133,7 +133,7 @@ public interface CallbackHandler {
* private char[] readPassword(InputStream in) throws IOException { * private char[] readPassword(InputStream in) throws IOException {
* // insert code to read a user password from the input stream * // insert code to read a user password from the input stream
* } * }
* </pre> * }</pre>
* *
* @param callbacks an array of <code>Callback</code> objects provided * @param callbacks an array of <code>Callback</code> objects provided
* by an underlying security service which contains * by an underlying security service which contains
......
...@@ -278,7 +278,7 @@ public class Sasl { ...@@ -278,7 +278,7 @@ public class Sasl {
* *
* This method uses the * This method uses the
<a href="{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#Provider">JCA Security Provider Framework</a>, described in the <a href="{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#Provider">JCA Security Provider Framework</a>, described in the
* "Java Cryptography Architecture API Specification & Reference", for * "Java Cryptography Architecture API Specification &amp; Reference", for
* locating and selecting a <tt>SaslClient</tt> implementation. * locating and selecting a <tt>SaslClient</tt> implementation.
* *
* First, it * First, it
...@@ -303,7 +303,7 @@ public class Sasl { ...@@ -303,7 +303,7 @@ public class Sasl {
* <tt>SaslClientFactory.DIGEST-MD5 com.wiz.sasl.digest.ClientFactory</tt> * <tt>SaslClientFactory.DIGEST-MD5 com.wiz.sasl.digest.ClientFactory</tt>
*<p> *<p>
* See the * See the
* "Java Cryptography Architecture API Specification & Reference" * "Java Cryptography Architecture API Specification &amp; Reference"
* for information about how to install and configure security service * for information about how to install and configure security service
* providers. * providers.
* *
...@@ -428,7 +428,7 @@ public class Sasl { ...@@ -428,7 +428,7 @@ public class Sasl {
* This method uses the * This method uses the
<a href="{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#Provider">JCA Security Provider Framework</a>, <a href="{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html#Provider">JCA Security Provider Framework</a>,
* described in the * described in the
* "Java Cryptography Architecture API Specification & Reference", for * "Java Cryptography Architecture API Specification &amp; Reference", for
* locating and selecting a <tt>SaslServer</tt> implementation. * locating and selecting a <tt>SaslServer</tt> implementation.
* *
* First, it * First, it
...@@ -453,7 +453,7 @@ public class Sasl { ...@@ -453,7 +453,7 @@ public class Sasl {
* <tt>SaslServerFactory.DIGEST-MD5 com.wiz.sasl.digest.ServerFactory</tt> * <tt>SaslServerFactory.DIGEST-MD5 com.wiz.sasl.digest.ServerFactory</tt>
*<p> *<p>
* See the * See the
* "Java Cryptography Architecture API Specification & Reference" * "Java Cryptography Architecture API Specification &amp; Reference"
* for information about how to install and configure security * for information about how to install and configure security
* service providers. * service providers.
* *
......
...@@ -38,13 +38,13 @@ package javax.security.sasl; ...@@ -38,13 +38,13 @@ package javax.security.sasl;
*<p> *<p>
* Here's an example of how an LDAP library might use a <tt>SaslClient</tt>. * Here's an example of how an LDAP library might use a <tt>SaslClient</tt>.
* It first gets an instance of a <tt>SaslClient</tt>: * It first gets an instance of a <tt>SaslClient</tt>:
*<blockquote><pre> *<blockquote><pre>{@code
* SaslClient sc = Sasl.createSaslClient(mechanisms, * SaslClient sc = Sasl.createSaslClient(mechanisms,
* authorizationId, protocol, serverName, props, callbackHandler); * authorizationId, protocol, serverName, props, callbackHandler);
*</pre></blockquote> *}</pre></blockquote>
* It can then proceed to use the client for authentication. * It can then proceed to use the client for authentication.
* For example, an LDAP library might use the client as follows: * For example, an LDAP library might use the client as follows:
*<blockquote><pre> *<blockquote><pre>{@code
* // Get initial response and send to server * // Get initial response and send to server
* byte[] response = (sc.hasInitialResponse() ? sc.evaluateChallenge(new byte[0]) : * byte[] response = (sc.hasInitialResponse() ? sc.evaluateChallenge(new byte[0]) :
* null); * null);
...@@ -74,7 +74,7 @@ package javax.security.sasl; ...@@ -74,7 +74,7 @@ package javax.security.sasl;
* ldap.out = new SecureOutputStream(sc, ldap.out); * ldap.out = new SecureOutputStream(sc, ldap.out);
* } * }
* } * }
*</pre></blockquote> *}</pre></blockquote>
* *
* If the mechanism has an initial response, the library invokes * If the mechanism has an initial response, the library invokes
* <tt>evaluateChallenge()</tt> with an empty * <tt>evaluateChallenge()</tt> with an empty
......
...@@ -47,7 +47,7 @@ package javax.security.sasl; ...@@ -47,7 +47,7 @@ package javax.security.sasl;
* For example, suppose the LDAP server received an LDAP BIND request * For example, suppose the LDAP server received an LDAP BIND request
* containing the name of the SASL mechanism and an (optional) initial * containing the name of the SASL mechanism and an (optional) initial
* response. It then might use the server as follows: * response. It then might use the server as follows:
*<blockquote><pre> *<blockquote><pre>{@code
* while (!ss.isComplete()) { * while (!ss.isComplete()) {
* try { * try {
* byte[] challenge = ss.evaluateResponse(response); * byte[] challenge = ss.evaluateResponse(response);
...@@ -75,7 +75,7 @@ package javax.security.sasl; ...@@ -75,7 +75,7 @@ package javax.security.sasl;
* ldap.out = new SecureOutputStream(ss, ldap.out); * ldap.out = new SecureOutputStream(ss, ldap.out);
* } * }
* } * }
*</pre></blockquote> *}</pre></blockquote>
* *
* @since 1.5 * @since 1.5
* *
......
...@@ -121,7 +121,7 @@ public final class ResponseAPDU implements java.io.Serializable { ...@@ -121,7 +121,7 @@ public final class ResponseAPDU implements java.io.Serializable {
* Returns the value of the status bytes SW1 and SW2 as a single * Returns the value of the status bytes SW1 and SW2 as a single
* status word SW. * status word SW.
* It is defined as * It is defined as
* <code>(getSW1() << 8) | getSW2()</code>. * {@code (getSW1() << 8) | getSW2()}
* *
* @return the value of the status word SW. * @return the value of the status word SW.
*/ */
......
...@@ -82,7 +82,7 @@ public interface DataSource extends CommonDataSource, Wrapper { ...@@ -82,7 +82,7 @@ public interface DataSource extends CommonDataSource, Wrapper {
* *
* @return a connection to the data source * @return a connection to the data source
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @throws SQLTimeoutException when the driver has determined that the * @throws java.sql.SQLTimeoutException when the driver has determined that the
* timeout value specified by the {@code setLoginTimeout} method * timeout value specified by the {@code setLoginTimeout} method
* has been exceeded and has at least tried to cancel the * has been exceeded and has at least tried to cancel the
* current database connection attempt * current database connection attempt
...@@ -98,7 +98,7 @@ public interface DataSource extends CommonDataSource, Wrapper { ...@@ -98,7 +98,7 @@ public interface DataSource extends CommonDataSource, Wrapper {
* @param password the user's password * @param password the user's password
* @return a connection to the data source * @return a connection to the data source
* @exception SQLException if a database access error occurs * @exception SQLException if a database access error occurs
* @throws SQLTimeoutException when the driver has determined that the * @throws java.sql.SQLTimeoutException when the driver has determined that the
* timeout value specified by the {@code setLoginTimeout} method * timeout value specified by the {@code setLoginTimeout} method
* has been exceeded and has at least tried to cancel the * has been exceeded and has at least tried to cancel the
* current database connection attempt * current database connection attempt
......
...@@ -109,10 +109,10 @@ import javax.sql.rowset.serial.*; ...@@ -109,10 +109,10 @@ import javax.sql.rowset.serial.*;
* <code>CachedRowSet</code><sup><font size=-2>TM</font></sup> * <code>CachedRowSet</code><sup><font size=-2>TM</font></sup>
* object <code>crs</code> might have its command property set. Note that if a * object <code>crs</code> might have its command property set. Note that if a
* tool is used to set properties, this is the code that the tool would use. * tool is used to set properties, this is the code that the tool would use.
* <PRE> * <PRE>{@code
* crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" + * crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
* "WHERE CREDIT_LIMIT > ? AND REGION = ?"); * "WHERE CREDIT_LIMIT > ? AND REGION = ?");
* </PRE> * }</PRE>
* <P> * <P>
* In this example, the values for <code>CREDIT_LIMIT</code> and * In this example, the values for <code>CREDIT_LIMIT</code> and
* <code>REGION</code> are placeholder parameters, which are indicated with a * <code>REGION</code> are placeholder parameters, which are indicated with a
...@@ -129,16 +129,16 @@ import javax.sql.rowset.serial.*; ...@@ -129,16 +129,16 @@ import javax.sql.rowset.serial.*;
* <P> * <P>
* The following code fragment demonstrates * The following code fragment demonstrates
* setting the two parameters in the query from the previous example. * setting the two parameters in the query from the previous example.
* <PRE> * <PRE>{@code
* crs.setInt(1, 5000); * crs.setInt(1, 5000);
* crs.setString(2, "West"); * crs.setString(2, "West");
* </PRE> * }</PRE>
* If the <code>execute</code> method is called at this point, the query * If the <code>execute</code> method is called at this point, the query
* sent to the DBMS will be: * sent to the DBMS will be:
* <PRE> * <PRE>{@code
* "SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" + * "SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
* "WHERE CREDIT_LIMIT > 5000 AND REGION = 'West'" * "WHERE CREDIT_LIMIT > 5000 AND REGION = 'West'"
* </PRE> * }</PRE>
* NOTE: Setting <code>Array</code>, <code>Clob</code>, <code>Blob</code> and * NOTE: Setting <code>Array</code>, <code>Clob</code>, <code>Blob</code> and
* <code>Ref</code> objects as a command parameter, stores these values as * <code>Ref</code> objects as a command parameter, stores these values as
* <code>SerialArray</code>, <code>SerialClob</code>, <code>SerialBlob</code> * <code>SerialArray</code>, <code>SerialClob</code>, <code>SerialBlob</code>
...@@ -158,7 +158,7 @@ import javax.sql.rowset.serial.*; ...@@ -158,7 +158,7 @@ import javax.sql.rowset.serial.*;
* When the method <code>execute</code> is called, the values in the * When the method <code>execute</code> is called, the values in the
* <code>Hashtable</code> object are substituted for the appropriate placeholder * <code>Hashtable</code> object are substituted for the appropriate placeholder
* parameters in the command. * parameters in the command.
* <P)> * <P>
* A call to the method <code>getParams</code> returns the values stored in the * A call to the method <code>getParams</code> returns the values stored in the
* <code>Hashtable</code> object as an array of <code>Object</code> instances. * <code>Hashtable</code> object as an array of <code>Object</code> instances.
* An element in this array may be a simple <code>Object</code> instance or an * An element in this array may be a simple <code>Object</code> instance or an
...@@ -2535,7 +2535,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable { ...@@ -2535,7 +2535,7 @@ public abstract class BaseRowSet implements Serializable, Cloneable {
* specific abstract data types. * specific abstract data types.
* <P> * <P>
* The parameter value set by this method is stored internally and * The parameter value set by this method is stored internally and
* will be supplied as the appropriate parameter in this <code>RowSet</code * will be supplied as the appropriate parameter in this <code>RowSet</code>
* object's command when the method <code>execute</code> is called. * object's command when the method <code>execute</code> is called.
* Methods such as <code>execute</code> and <code>populate</code> must be * Methods such as <code>execute</code> and <code>populate</code> must be
* provided in any class that extends this class and implements one or * provided in any class that extends this class and implements one or
......
...@@ -118,7 +118,7 @@ import javax.sql.rowset.spi.*; ...@@ -118,7 +118,7 @@ import javax.sql.rowset.spi.*;
* <P> * <P>
* There are two ways for a <code>CachedRowSet</code> object to specify which * There are two ways for a <code>CachedRowSet</code> object to specify which
* <code>SyncProvider</code> object it will use. * <code>SyncProvider</code> object it will use.
* <UL) * <UL>
* <LI>Supplying the name of the implementation to the constructor<BR> * <LI>Supplying the name of the implementation to the constructor<BR>
* The following line of code creates the <code>CachedRowSet</code> * The following line of code creates the <code>CachedRowSet</code>
* object <i>crs2</i> that is initialized with default values except that its * object <i>crs2</i> that is initialized with default values except that its
...@@ -135,7 +135,7 @@ import javax.sql.rowset.spi.*; ...@@ -135,7 +135,7 @@ import javax.sql.rowset.spi.*;
* <PRE> * <PRE>
* crs.setSyncProvider("com.fred.providers.HighAvailabilityProvider"); * crs.setSyncProvider("com.fred.providers.HighAvailabilityProvider");
* </PRE> * </PRE>
* </UL) * </UL>
* See the comments for <code>SyncFactory</code> and <code>SyncProvider</code> for * See the comments for <code>SyncFactory</code> and <code>SyncProvider</code> for
* more details. * more details.
* *
...@@ -426,10 +426,10 @@ import javax.sql.rowset.spi.*; ...@@ -426,10 +426,10 @@ import javax.sql.rowset.spi.*;
* The following code fragment illustrates how the <code>CachedRowSet</code> * The following code fragment illustrates how the <code>CachedRowSet</code>
* object <code>crs</code> might have its command property set. Note that if a * object <code>crs</code> might have its command property set. Note that if a
* tool is used to set properties, this is the code that the tool would use. * tool is used to set properties, this is the code that the tool would use.
* <PRE> * <PRE>{@code
* crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS " + * crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS " +
* "WHERE CREDIT_LIMIT > ? AND REGION = ?"); * "WHERE CREDIT_LIMIT > ? AND REGION = ?");
* </PRE> * } </PRE>
* <P> * <P>
* The values that will be used to set the command's placeholder parameters are * The values that will be used to set the command's placeholder parameters are
* contained in the <code>RowSet</code> object's <code>params</code> field, which is a * contained in the <code>RowSet</code> object's <code>params</code> field, which is a
...@@ -457,7 +457,7 @@ import javax.sql.rowset.spi.*; ...@@ -457,7 +457,7 @@ import javax.sql.rowset.spi.*;
* The following code fragment gives an idea of how the reader * The following code fragment gives an idea of how the reader
* does this, after obtaining the <code>Connection</code> object * does this, after obtaining the <code>Connection</code> object
* <code>con</code>. * <code>con</code>.
* <PRE> * <PRE>{@code
* PreparedStatement pstmt = con.prepareStatement(crs.getCommand()); * PreparedStatement pstmt = con.prepareStatement(crs.getCommand());
* reader.decodeParams(); * reader.decodeParams();
* // decodeParams figures out which setter methods to use and does something * // decodeParams figures out which setter methods to use and does something
...@@ -465,16 +465,16 @@ import javax.sql.rowset.spi.*; ...@@ -465,16 +465,16 @@ import javax.sql.rowset.spi.*;
* // for (i = 0; i < params.length; i++) { * // for (i = 0; i < params.length; i++) {
* // pstmt.setObject(i + 1, params[i]); * // pstmt.setObject(i + 1, params[i]);
* // } * // }
* </PRE> * }</PRE>
* <P> * <P>
* At this point, the command for <code>crs</code> is the query <code>"SELECT * At this point, the command for <code>crs</code> is the query {@code "SELECT
* FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS WHERE CREDIT_LIMIT > 5000 * FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS WHERE CREDIT_LIMIT > 5000
* AND REGION = "West"</code>. After the <code>readData</code> method executes * AND REGION = "West"}. After the <code>readData</code> method executes
* this command with the following line of code, it will have the data from * this command with the following line of code, it will have the data from
* <code>rs</code> with which to populate <code>crs</code>. * <code>rs</code> with which to populate <code>crs</code>.
* <PRE> * <PRE>{@code
* ResultSet rs = pstmt.executeQuery(); * ResultSet rs = pstmt.executeQuery();
* </PRE> * }</PRE>
* <P> * <P>
* The preceding code fragments give an idea of what goes on behind the * The preceding code fragments give an idea of what goes on behind the
* scenes; they would not appear in an application, which would not invoke * scenes; they would not appear in an application, which would not invoke
...@@ -484,13 +484,13 @@ import javax.sql.rowset.spi.*; ...@@ -484,13 +484,13 @@ import javax.sql.rowset.spi.*;
* the command. Simply by calling the <code>execute</code> method, * the command. Simply by calling the <code>execute</code> method,
* <code>crs</code> populates itself with the requested data from the * <code>crs</code> populates itself with the requested data from the
* table <code>CUSTOMERS</code>. * table <code>CUSTOMERS</code>.
* <PRE> * <PRE>{@code
* crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" + * crs.setCommand("SELECT FIRST_NAME, LAST_NAME, ADDRESS FROM CUSTOMERS" +
* "WHERE CREDIT_LIMIT > ? AND REGION = ?"); * "WHERE CREDIT_LIMIT > ? AND REGION = ?");
* crs.setInt(1, 5000); * crs.setInt(1, 5000);
* crs.setString(2, "West"); * crs.setString(2, "West");
* crs.execute(); * crs.execute();
* </PRE> * }</PRE>
* *
* <h3>10.0 Paging Data</h3> * <h3>10.0 Paging Data</h3>
* Because a <code>CachedRowSet</code> object stores data in memory, * Because a <code>CachedRowSet</code> object stores data in memory,
......
...@@ -53,8 +53,7 @@ import java.sql.*; ...@@ -53,8 +53,7 @@ import java.sql.*;
* and application motivated implementations of <code>Predicate</code> to emerge. * and application motivated implementations of <code>Predicate</code> to emerge.
* <p> * <p>
* A sample implementation would look something like this: * A sample implementation would look something like this:
* <pre> * <pre>{@code
* <code>
* public class Range implements Predicate { * public class Range implements Predicate {
* *
* private Object lo[]; * private Object lo[];
...@@ -90,8 +89,8 @@ import java.sql.*; ...@@ -90,8 +89,8 @@ import java.sql.*;
* return true; * return true;
* } * }
* } * }
* </code> * }
* </pre> * }</pre>
* <P> * <P>
* The example above implements a simple range predicate. Note, that * The example above implements a simple range predicate. Note, that
* implementations should but are not required to provider <code>String</code> * implementations should but are not required to provider <code>String</code>
......
...@@ -159,7 +159,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable { ...@@ -159,7 +159,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* @param property <code>true</code> if the given column is * @param property <code>true</code> if the given column is
* automatically incremented; <code>false</code> * automatically incremented; <code>false</code>
* otherwise * otherwise
* @throws <code>SQLException</code> if a database access error occurs or * @throws SQLException if a database access error occurs or
* the given index is out of bounds * the given index is out of bounds
*/ */
public void setAutoIncrement(int columnIndex, boolean property) throws SQLException { public void setAutoIncrement(int columnIndex, boolean property) throws SQLException {
...@@ -195,7 +195,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable { ...@@ -195,7 +195,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* value can be used in a <code>WHERE</code> clause; * value can be used in a <code>WHERE</code> clause;
* <code>false</code> otherwise * <code>false</code> otherwise
* *
* @throws <code>SQLException</code> if a database access error occurs or * @throws SQLException if a database access error occurs or
* the given column number is out of bounds * the given column number is out of bounds
*/ */
public void setSearchable(int columnIndex, boolean property) public void setSearchable(int columnIndex, boolean property)
...@@ -212,7 +212,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable { ...@@ -212,7 +212,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* must be between <code>1</code> and the number of columns, * must be between <code>1</code> and the number of columns,
* inclusive between <code>1</code> and the number of columns, inclusive * inclusive between <code>1</code> and the number of columns, inclusive
* @param property true if the value is a cash value; false otherwise. * @param property true if the value is a cash value; false otherwise.
* @throws <code>SQLException</code> if a database access error occurs * @throws SQLException if a database access error occurs
* or the given column number is out of bounds * or the given column number is out of bounds
*/ */
public void setCurrency(int columnIndex, boolean property) public void setCurrency(int columnIndex, boolean property)
...@@ -233,7 +233,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable { ...@@ -233,7 +233,7 @@ public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
* <code>columnNullable</code>, or * <code>columnNullable</code>, or
* <code>columnNullableUnknown</code> * <code>columnNullableUnknown</code>
* *
* @throws <code>SQLException</code> if a database access error occurs, * @throws SQLException if a database access error occurs,
* the given column number is out of bounds, or the value supplied * the given column number is out of bounds, or the value supplied
* for the <i>property</i> parameter is not one of the following * for the <i>property</i> parameter is not one of the following
* constants: * constants:
......
...@@ -627,8 +627,6 @@ public class SyncFactory { ...@@ -627,8 +627,6 @@ public class SyncFactory {
* required * required
* @throws java.lang.SecurityException if a security manager exists and its * @throws java.lang.SecurityException if a security manager exists and its
* {@code checkPermission} method denies calling {@code setLogger} * {@code checkPermission} method denies calling {@code setLogger}
* @throws java.util.logging.LoggingPermission if a security manager exists and its
* {@code checkPermission} method denies calling {@code setLevel}
* @throws NullPointerException if the logger is null * @throws NullPointerException if the logger is null
* @see SecurityManager#checkPermission * @see SecurityManager#checkPermission
* @see LoggingPermission * @see LoggingPermission
......
...@@ -193,7 +193,7 @@ import java.sql.SQLException; ...@@ -193,7 +193,7 @@ import java.sql.SQLException;
* code fragment, the value in <i>crs</i> is the one set as the resolved value, which means * code fragment, the value in <i>crs</i> is the one set as the resolved value, which means
* that it will be used to overwrite the conflict value in the data source. * that it will be used to overwrite the conflict value in the data source.
* *
* <PRE> * <PRE>{@code
* try { * try {
* *
* crs.acceptChanges(con); * crs.acceptChanges(con);
...@@ -202,8 +202,8 @@ import java.sql.SQLException; ...@@ -202,8 +202,8 @@ import java.sql.SQLException;
* *
* SyncResolver resolver = spe.getSyncResolver(); * SyncResolver resolver = spe.getSyncResolver();
* *
* Object crsValue; // value in the <code>RowSet</code> object * Object crsValue; // value in the RowSet object
* Object resolverValue: // value in the <code>SyncResolver</code> object * Object resolverValue: // value in the SyncResolver object
* Object resolvedValue: // value to be persisted * Object resolvedValue: // value to be persisted
* *
* while(resolver.nextConflict()) { * while(resolver.nextConflict()) {
...@@ -227,7 +227,7 @@ import java.sql.SQLException; ...@@ -227,7 +227,7 @@ import java.sql.SQLException;
* } * }
* } * }
* } * }
* </PRE> * }</PRE>
* @author Jonathan Bruce * @author Jonathan Bruce
*/ */
......
...@@ -35,15 +35,15 @@ import java.util.List; ...@@ -35,15 +35,15 @@ import java.util.List;
* the <a href="http://www.w3.org/TR/xmldsig-core/"> * the <a href="http://www.w3.org/TR/xmldsig-core/">
* W3C Recommendation for XML-Signature Syntax and Processing</a>. * W3C Recommendation for XML-Signature Syntax and Processing</a>.
* The XML Schema Definition is defined as: * The XML Schema Definition is defined as:
* <pre><code> * <pre>{@code
* &lt;element name="Manifest" type="ds:ManifestType"/&gt; * <element name="Manifest" type="ds:ManifestType"/>
* &lt;complexType name="ManifestType"&gt; * <complexType name="ManifestType">
* &lt;sequence> * <sequence>
* &lt;element ref="ds:Reference" maxOccurs="unbounded"/&gt; * <element ref="ds:Reference" maxOccurs="unbounded"/>
* &lt;/sequence&gt; * </sequence>
* &lt;attribute name="Id" type="ID" use="optional"/&gt; * <attribute name="Id" type="ID" use="optional"/>
* &lt;/complexType&gt; * </complexType>
* </code></pre> * }</pre>
* *
* A <code>Manifest</code> instance may be created by invoking * A <code>Manifest</code> instance may be created by invoking
* one of the {@link XMLSignatureFactory#newManifest newManifest} * one of the {@link XMLSignatureFactory#newManifest newManifest}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册