8026183: minor documentation problems in java.lang.invoke
8015808: Typo in MethodHandle javadoc
Summary: Fix typos and javadoc markup and extraneous paragraph tags
Reviewed-by: lancea
--- a/jdk/src/share/classes/java/lang/invoke/CallSite.java Thu Oct 17 11:34:01 2013 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/CallSite.java Thu Oct 17 13:43:46 2013 -0400
@@ -124,7 +124,7 @@
* or if the target returned by the hook is not of the given {@code targetType}
* @throws NullPointerException if the hook returns a null value
* @throws ClassCastException if the hook returns something other than a {@code MethodHandle}
- * @throws Throwable anything else thrown by the the hook function
+ * @throws Throwable anything else thrown by the hook function
*/
/*package-private*/
CallSite(MethodType targetType, MethodHandle createTargetHook) throws Throwable {
--- a/jdk/src/share/classes/java/lang/invoke/ConstantCallSite.java Thu Oct 17 11:34:01 2013 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/ConstantCallSite.java Thu Oct 17 13:43:46 2013 -0400
@@ -75,7 +75,7 @@
* or if the target returned by the hook is not of the given {@code targetType}
* @throws NullPointerException if the hook returns a null value
* @throws ClassCastException if the hook returns something other than a {@code MethodHandle}
- * @throws Throwable anything else thrown by the the hook function
+ * @throws Throwable anything else thrown by the hook function
*/
protected ConstantCallSite(MethodType targetType, MethodHandle createTargetHook) throws Throwable {
super(targetType, createTargetHook);
@@ -85,7 +85,7 @@
/**
* Returns the target method of the call site, which behaves
* like a {@code final} field of the {@code ConstantCallSite}.
- * That is, the the target is always the original value passed
+ * That is, the target is always the original value passed
* to the constructor call which created this instance.
*
* @return the immutable linkage state of this call site, a constant method handle
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandle.java Thu Oct 17 11:34:01 2013 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandle.java Thu Oct 17 13:43:46 2013 -0400
@@ -251,7 +251,7 @@
*
* <h1>Usage examples</h1>
* Here are some examples of usage:
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
Object x, y; String s; int i;
MethodType mt; MethodHandle mh;
MethodHandles.Lookup lookup = MethodHandles.lookup();
@@ -608,7 +608,7 @@
* or forced to null if the return type is void.
* <p>
* This call is equivalent to the following code:
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
* MethodHandle invoker = MethodHandles.spreadInvoker(this.type(), 0);
* Object result = invoker.invokeExact(this, arguments);
* }</pre></blockquote>
@@ -643,9 +643,9 @@
* of the argument array.
* <p>
* This method is also equivalent to the following code:
- * <p><blockquote><pre>
- * {@link #invokeWithArguments(Object...) invokeWithArguments}{@code(arguments.toArray())}
- * </pre></blockquote>
+ * <blockquote><pre>{@code
+ * invokeWithArguments(arguments.toArray()
+ * }</pre></blockquote>
*
* @param arguments the arguments to pass to the target
* @return the result returned by the target
@@ -1183,7 +1183,7 @@
/**
* Makes a <em>fixed arity</em> method handle which is otherwise
- * equivalent to the the current method handle.
+ * equivalent to the current method handle.
* <p>
* If the current method handle is not of
* {@linkplain #asVarargsCollector variable arity},
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java Thu Oct 17 11:34:01 2013 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java Thu Oct 17 13:43:46 2013 -0400
@@ -748,7 +748,7 @@
* If the returned method handle is invoked, the method's class will
* be initialized, if it has not already been initialized.
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -806,7 +806,7 @@
* with the same {@code type} argument.
*
* <b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -882,7 +882,7 @@
* If the returned method handle is invoked, the constructor's class will
* be initialized, if it has not already been initialized.
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -942,7 +942,7 @@
* in special circumstances. Use {@link #findConstructor findConstructor}
* to access instance initialization methods in a safe manner.)</em>
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2223,7 +2223,7 @@
* they will come after.
* <p>
* <b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2237,7 +2237,7 @@
* }</pre></blockquote>
* <p>
* This method is also equivalent to the following code:
- * <p><blockquote><pre>
+ * <blockquote><pre>
* {@link #dropArguments(MethodHandle,int,Class...) dropArguments}{@code (target, pos, valueTypes.toArray(new Class[0]))}
* </pre></blockquote>
* @param target the method handle to invoke after the arguments are dropped
@@ -2281,7 +2281,7 @@
* they will come after.
* <p>
* <b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2299,7 +2299,7 @@
* }</pre></blockquote>
* <p>
* This method is also equivalent to the following code:
- * <p><blockquote><pre>
+ * <blockquote><pre>
* {@link #dropArguments(MethodHandle,int,List) dropArguments}{@code (target, pos, Arrays.asList(valueTypes))}
* </pre></blockquote>
* @param target the method handle to invoke after the arguments are dropped
@@ -2347,7 +2347,7 @@
* (null or not)
* which do not correspond to argument positions in the target.
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2440,7 +2440,7 @@
* In all cases, {@code pos} must be greater than or equal to zero, and
* {@code pos} must also be less than or equal to the target's arity.
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2545,7 +2545,7 @@
* The argument type of the filter (if any) must be identical to the
* return type of the target.
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2636,7 +2636,7 @@
* arguments will not need to be live on the stack on entry to the
* target.)
* <p><b>Example:</b>
- * <p><blockquote><pre>{@code
+ * <blockquote><pre>{@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
--- a/jdk/src/share/classes/java/lang/invoke/MethodType.java Thu Oct 17 11:34:01 2013 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/MethodType.java Thu Oct 17 13:43:46 2013 -0400
@@ -137,7 +137,7 @@
/** This number is the maximum arity of a method handle invoker, 253.
* It is derived from the absolute JVM-imposed arity by subtracting two,
- * which are the slots occupied by invoke method handle, and the the
+ * which are the slots occupied by invoke method handle, and the
* target method handle, which are both at the beginning of the argument
* list used to invoke the target method handle.
* The longest possible invocation will look like