diff --git a/src/share/classes/java/lang/invoke/CallSite.java b/src/share/classes/java/lang/invoke/CallSite.java index 1d584d53fdb0936507ffe871a61b6907922ed68e..5da81af41bafe6422489b62beee01699f97c0dae 100644 --- a/src/share/classes/java/lang/invoke/CallSite.java +++ b/src/share/classes/java/lang/invoke/CallSite.java @@ -124,7 +124,7 @@ public class CallSite { * 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 { diff --git a/src/share/classes/java/lang/invoke/ConstantCallSite.java b/src/share/classes/java/lang/invoke/ConstantCallSite.java index 2d9fedecc8a68f975673417eb7942e71c656074f..771b06d20583a981418b650b369cd52c73d93708 100644 --- a/src/share/classes/java/lang/invoke/ConstantCallSite.java +++ b/src/share/classes/java/lang/invoke/ConstantCallSite.java @@ -75,7 +75,7 @@ public class ConstantCallSite extends CallSite { * 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 @@ public class ConstantCallSite extends CallSite { /** * 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 diff --git a/src/share/classes/java/lang/invoke/MethodHandle.java b/src/share/classes/java/lang/invoke/MethodHandle.java index 14bc2b44d580284a933ea2747336bd75792d6b61..ce115df85ed175758c72a59206fd5fdad8d955ff 100644 --- a/src/share/classes/java/lang/invoke/MethodHandle.java +++ b/src/share/classes/java/lang/invoke/MethodHandle.java @@ -251,7 +251,7 @@ import java.util.logging.Logger; * *
{@code
+ * {@code
Object x, y; String s; int i;
MethodType mt; MethodHandle mh;
MethodHandles.Lookup lookup = MethodHandles.lookup();
@@ -608,7 +608,7 @@ public abstract class MethodHandle {
* or forced to null if the return type is void.
*
* This call is equivalent to the following code:
- *
{@code
+ * {@code
* MethodHandle invoker = MethodHandles.spreadInvoker(this.type(), 0);
* Object result = invoker.invokeExact(this, arguments);
* }
@@ -643,9 +643,9 @@ public abstract class MethodHandle {
* of the argument array.
*
* This method is also equivalent to the following code:
- *
- * {@link #invokeWithArguments(Object...) invokeWithArguments}{@code(arguments.toArray())}
- *
+ * {@code
+ * invokeWithArguments(arguments.toArray()
+ * }
*
* @param arguments the arguments to pass to the target
* @return the result returned by the target
@@ -1183,7 +1183,7 @@ assertEquals("[three, thee, tee]", Arrays.toString((Object[])ls.get(0)));
/**
* Makes a fixed arity method handle which is otherwise
- * equivalent to the the current method handle.
+ * equivalent to the current method handle.
*
* If the current method handle is not of
* {@linkplain #asVarargsCollector variable arity},
diff --git a/src/share/classes/java/lang/invoke/MethodHandles.java b/src/share/classes/java/lang/invoke/MethodHandles.java
index d99091374e0c19cd602e18fe4ee69bc8a4c837ff..1ad7e9cd23f828ebfa2812ac65bb6bee4e48d085 100644
--- a/src/share/classes/java/lang/invoke/MethodHandles.java
+++ b/src/share/classes/java/lang/invoke/MethodHandles.java
@@ -748,7 +748,7 @@ public class MethodHandles {
* If the returned method handle is invoked, the method's class will
* be initialized, if it has not already been initialized.
*
Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -806,7 +806,7 @@ assertEquals("[x, y]", MH_asList.invoke("x", "y").toString());
* with the same {@code type} argument.
*
* Example:
- * {@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -882,7 +882,7 @@ assertEquals("", (String) MH_newString.invokeExact());
* If the returned method handle is invoked, the constructor's class will
* be initialized, if it has not already been initialized.
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -942,7 +942,7 @@ assertEquals("[x, y, z]", pb.command().toString());
* in special circumstances. Use {@link #findConstructor findConstructor}
* to access instance initialization methods in a safe manner.)
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2223,7 +2223,7 @@ assert((int)twice.invokeExact(21) == 42);
* they will come after.
*
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2237,7 +2237,7 @@ assertEquals("yz", (String) d0.invokeExact(123, "x", "y", "z"));
* }
*
* This method is also equivalent to the following code:
- *
+ *
* {@link #dropArguments(MethodHandle,int,Class...) dropArguments}{@code (target, pos, valueTypes.toArray(new Class[0]))}
*
* @param target the method handle to invoke after the arguments are dropped
@@ -2281,7 +2281,7 @@ assertEquals("yz", (String) d0.invokeExact(123, "x", "y", "z"));
* they will come after.
*
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2299,7 +2299,7 @@ assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
* }
*
* This method is also equivalent to the following code:
- *
+ *
* {@link #dropArguments(MethodHandle,int,List) dropArguments}{@code (target, pos, Arrays.asList(valueTypes))}
*
* @param target the method handle to invoke after the arguments are dropped
@@ -2347,7 +2347,7 @@ assertEquals("xz", (String) d12.invokeExact("x", 12, true, "z"));
* (null or not)
* which do not correspond to argument positions in the target.
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2440,7 +2440,7 @@ assertEquals("XY", (String) f2.invokeExact("x", "y")); // XY
* 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.
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2545,7 +2545,7 @@ assertEquals("[top, [[up, down, strange], charm], bottom]",
* The argument type of the filter (if any) must be identical to the
* return type of the target.
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
@@ -2636,7 +2636,7 @@ System.out.println((int) f0.invokeExact("x", "y")); // 2
* arguments will not need to be live on the stack on entry to the
* target.)
* Example:
- *
{@code
+ * {@code
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
...
diff --git a/src/share/classes/java/lang/invoke/MethodType.java b/src/share/classes/java/lang/invoke/MethodType.java
index 5a73037afdb2d4f4f18adc11e82240b644fad710..f8e0967c7aff7f7020244016e933a4adb58b6cc2 100644
--- a/src/share/classes/java/lang/invoke/MethodType.java
+++ b/src/share/classes/java/lang/invoke/MethodType.java
@@ -137,7 +137,7 @@ class MethodType implements java.io.Serializable {
/** 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