diff --git a/jdk/src/java.base/share/classes/java/lang/Character.java b/jdk/src/java.base/share/classes/java/lang/Character.java index 25783cb45a8..eb4ee65f760 100644 --- a/jdk/src/java.base/share/classes/java/lang/Character.java +++ b/jdk/src/java.base/share/classes/java/lang/Character.java @@ -9356,7 +9356,7 @@ class Character implements java.io.Serializable, Comparable { * {@code FORM FEED} * {@code '\r'} {@code U+000D} * {@code CARRIAGE RETURN} - * {@code ' '} {@code U+0020} + * {@code ' '} {@code U+0020} * {@code SPACE} * * diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java index 6622bb37738..0393345bac6 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java @@ -93,7 +93,7 @@ import java.util.Objects; /** Return the simple name of this member. * For a type, it is the same as {@link Class#getSimpleName}. * For a method or field, it is the simple name of the member. - * For a constructor, it is always {@code "<init>"}. + * For a constructor, it is always {@code ""}. */ public String getName() { if (name == null) { @@ -727,7 +727,7 @@ import java.util.Objects; } /** Create a method or constructor name from the given components: * Declaring class, name, type, reference kind. - * It will be a constructor if and only if the name is {@code "<init>"}. + * It will be a constructor if and only if the name is {@code ""}. * The declaring class may be supplied as null if this is to be a bare name and type. * The last argument is optional, a boolean which requests REF_invokeSpecial. * The resulting name will in an unresolved state. diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java index d63db84b421..ad6799acfc9 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java @@ -155,7 +155,7 @@ interface MethodHandleInfo { /** * Returns the name of the cracked method handle's underlying member. - * This is {@code "<init>"} if the underlying member was a constructor, + * This is {@code ""} if the underlying member was a constructor, * else it is a simple method name or field name. * @return the simple name of the underlying member */ diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/Stable.java b/jdk/src/java.base/share/classes/java/lang/invoke/Stable.java index 077c546467c..a0a413e2a79 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/Stable.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/Stable.java @@ -51,7 +51,7 @@ import java.lang.annotation.*; * If the field is an array type, then both the field value and * all the components of the field value (if the field value is non-null) * are indicated to be stable. - * If the field type is an array type with rank {@code N > 1}, + * If the field type is an array type with rank {@code N > 1}, * then each component of the field value (if the field value is non-null), * is regarded as a stable array of rank {@code N-1}. *

diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java b/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java index 01c16f5ff14..5d9b3bfe843 100644 --- a/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java +++ b/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java @@ -55,20 +55,20 @@ package java.lang.invoke; * At that point {@code guardWithTest} may ignore {@code T} and return {@code F}. *

* Here is an example of a switch point in action: - *

{@code
-MethodHandle MH_strcat = MethodHandles.lookup()
-    .findVirtual(String.class, "concat", MethodType.methodType(String.class, String.class));
-SwitchPoint spt = new SwitchPoint();
-assert(!spt.hasBeenInvalidated());
-// the following steps may be repeated to re-use the same switch point:
-MethodHandle worker1 = MH_strcat;
-MethodHandle worker2 = MethodHandles.permuteArguments(MH_strcat, MH_strcat.type(), 1, 0);
-MethodHandle worker = spt.guardWithTest(worker1, worker2);
-assertEquals("method", (String) worker.invokeExact("met", "hod"));
-SwitchPoint.invalidateAll(new SwitchPoint[]{ spt });
-assert(spt.hasBeenInvalidated());
-assertEquals("hodmet", (String) worker.invokeExact("met", "hod"));
- * }
+ *
{@code
+ * MethodHandle MH_strcat = MethodHandles.lookup()
+ *     .findVirtual(String.class, "concat", MethodType.methodType(String.class, String.class));
+ * SwitchPoint spt = new SwitchPoint();
+ * assert(!spt.hasBeenInvalidated());
+ * // the following steps may be repeated to re-use the same switch point:
+ * MethodHandle worker1 = MH_strcat;
+ * MethodHandle worker2 = MethodHandles.permuteArguments(MH_strcat, MH_strcat.type(), 1, 0);
+ * MethodHandle worker = spt.guardWithTest(worker1, worker2);
+ * assertEquals("method", (String) worker.invokeExact("met", "hod"));
+ * SwitchPoint.invalidateAll(new SwitchPoint[]{ spt });
+ * assert(spt.hasBeenInvalidated());
+ * assertEquals("hodmet", (String) worker.invokeExact("met", "hod"));
+ * }
*

* Discussion: * Switch points are useful without subclassing. They may also be subclassed. @@ -82,31 +82,31 @@ assertEquals("hodmet", (String) worker.invokeExact("met", "hod")); * Implementation Note: * A switch point behaves as if implemented on top of {@link MutableCallSite}, * approximately as follows: - *

{@code
-public class SwitchPoint {
-  private static final MethodHandle
-    K_true  = MethodHandles.constant(boolean.class, true),
-    K_false = MethodHandles.constant(boolean.class, false);
-  private final MutableCallSite mcs;
-  private final MethodHandle mcsInvoker;
-  public SwitchPoint() {
-    this.mcs = new MutableCallSite(K_true);
-    this.mcsInvoker = mcs.dynamicInvoker();
-  }
-  public MethodHandle guardWithTest(
-                MethodHandle target, MethodHandle fallback) {
-    // Note:  mcsInvoker is of type ()boolean.
-    // Target and fallback may take any arguments, but must have the same type.
-    return MethodHandles.guardWithTest(this.mcsInvoker, target, fallback);
-  }
-  public static void invalidateAll(SwitchPoint[] spts) {
-    List<MutableCallSite> mcss = new ArrayList<>();
-    for (SwitchPoint spt : spts)  mcss.add(spt.mcs);
-    for (MutableCallSite mcs : mcss)  mcs.setTarget(K_false);
-    MutableCallSite.syncAll(mcss.toArray(new MutableCallSite[0]));
-  }
-}
- * }
+ *
{@code
+ * public class SwitchPoint {
+ *     private static final MethodHandle
+ *         K_true  = MethodHandles.constant(boolean.class, true),
+ *         K_false = MethodHandles.constant(boolean.class, false);
+ *     private final MutableCallSite mcs;
+ *     private final MethodHandle mcsInvoker;
+ *     public SwitchPoint() {
+ *         this.mcs = new MutableCallSite(K_true);
+ *         this.mcsInvoker = mcs.dynamicInvoker();
+ *     }
+ *     public MethodHandle guardWithTest(
+ *             MethodHandle target, MethodHandle fallback) {
+ *         // Note:  mcsInvoker is of type ()boolean.
+ *         // Target and fallback may take any arguments, but must have the same type.
+ *         return MethodHandles.guardWithTest(this.mcsInvoker, target, fallback);
+ *     }
+ *     public static void invalidateAll(SwitchPoint[] spts) {
+ *         List mcss = new ArrayList<>();
+ *         for (SwitchPoint spt : spts)  mcss.add(spt.mcs);
+ *         for (MutableCallSite mcs : mcss)  mcs.setTarget(K_false);
+ *         MutableCallSite.syncAll(mcss.toArray(new MutableCallSite[0]));
+ *     }
+ * }
+ * }
* @author Remi Forax, JSR 292 EG */ public class SwitchPoint { diff --git a/jdk/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java b/jdk/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java index 8a89bdb3b54..03a7a48d209 100644 --- a/jdk/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java +++ b/jdk/src/java.base/share/classes/java/time/chrono/ChronoLocalDate.java @@ -715,7 +715,7 @@ public interface ChronoLocalDate * only compares the underlying date and not the chronology. * This allows dates in different calendar systems to be compared based * on the time-line position. - * This is equivalent to using {@code date1.toEpochDay() > date2.toEpochDay()}. + * This is equivalent to using {@code date1.toEpochDay() > date2.toEpochDay()}. *

* This default implementation performs the comparison based on the epoch-day. * @@ -733,7 +733,7 @@ public interface ChronoLocalDate * only compares the underlying date and not the chronology. * This allows dates in different calendar systems to be compared based * on the time-line position. - * This is equivalent to using {@code date1.toEpochDay() < date2.toEpochDay()}. + * This is equivalent to using {@code date1.toEpochDay() < date2.toEpochDay()}. *

* This default implementation performs the comparison based on the epoch-day. * diff --git a/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeName.java b/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeName.java index 9bebac8f64b..26b4076213d 100644 --- a/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeName.java +++ b/jdk/src/java.base/share/classes/sun/invoke/util/BytecodeName.java @@ -295,7 +295,7 @@ public class BytecodeName { * (The safe name might possibly be mangled to hide further dangerous characters.) * For example, the qualified class name {@code java/lang/String} * will be parsed into the array {@code {"java", '/', "lang", '/', "String"}}. - * The name {@code <init>} will be parsed into { '<', "init", '>'}} + * The name {@code } will be parsed into {@code {'<', "init", '>'}}. * The name {@code foo/bar$:baz} will be parsed into * {@code {"foo", '/', "bar", '$', ':', "baz"}}. * The name {@code ::\=:foo:\=bar\!baz} will be parsed into diff --git a/jdk/src/java.desktop/share/classes/javax/swing/event/ListSelectionEvent.java b/jdk/src/java.desktop/share/classes/javax/swing/event/ListSelectionEvent.java index 735b5797088..907fd1307b8 100644 --- a/jdk/src/java.desktop/share/classes/javax/swing/event/ListSelectionEvent.java +++ b/jdk/src/java.desktop/share/classes/javax/swing/event/ListSelectionEvent.java @@ -80,7 +80,7 @@ public class ListSelectionEvent extends EventObject /** * Returns the index of the first row whose selection may have changed. - * {@code getFirstIndex() <= getLastIndex()} + * {@code getFirstIndex() <= getLastIndex()} * * @return the first row whose selection value may have changed, * where zero is the first row @@ -89,7 +89,7 @@ public class ListSelectionEvent extends EventObject /** * Returns the index of the last row whose selection may have changed. - * {@code getLastIndex() >= getFirstIndex()} + * {@code getLastIndex() >= getFirstIndex()} * * @return the last row whose selection value may have changed, * where zero is the first row