JDK 8 request for review for JDK-8020810: Typo in javadoc for Class.toGenericString()

David Holmes david.holmes at oracle.com
Fri Jul 19 06:11:52 UTC 2013


I believe you.

Ship it! :)

David

On 19/07/2013 3:53 PM, Joe Darcy wrote:
> Hello,
>
> Please review the patch below which addresses
>
>      JDK-8020810: Typo in javadoc for Class.toGenericString()
>
> A note of explanation for the change in j.l.Class, the essence of the
> change is replacing
>
>      {@code @interface}
>
> with
>
>      <code>@</code>{@code interface}
>
> The construct "{@code @interface}" doesn't render right; the literal
> text "@" is output rather than "@". However, "@" is problematic
> inside {@oode } since it gets confused as a javadoc tag. Likewise,
> "<code>@</code>" doesn't work for the same reason.  In the end,
> "<code>@</code>{@code interface}" gives the desired output of
> "@interface".
>
> As a bonus, a javadoc issue in j.l.r.Parameter is fixed too.
>
> Thanks,
>
> -Joe
>
> --- a/src/share/classes/java/lang/Class.java    Wed Jul 17 00:34:39 2013
> -0700
> +++ b/src/share/classes/java/lang/Class.java    Thu Jul 18 22:48:04 2013
> -0700
> @@ -157,10 +157,10 @@
>        *
>        * The string is formatted as a list of type modifiers, if any,
>        * followed by the kind of type (empty string for primitive types
> -     * and {@code class}, {@code enum}, {@code interface}, or {@code
> -     * @interface}, as appropriate), followed by the type's name,
> -     * followed by an angle-bracketed comma-separated list of the
> -     * type's type parameters, if any.
> +     * and {@code class}, {@code enum}, {@code interface}, or
> +     * <code>@</code>{@code interface}, as appropriate), followed
> +     * by the type's name, followed by an angle-bracketed
> +     * comma-separated list of the type's type parameters, if any.
>        *
>        * A space is used to separate modifiers from one another and to
>        * separate any modifiers from the kind of type. The modifiers
> diff -r cbdd2529d93a src/share/classes/java/lang/reflect/Parameter.java
> --- a/src/share/classes/java/lang/reflect/Parameter.java    Wed Jul 17
> 00:34:39 2013 -0700
> +++ b/src/share/classes/java/lang/reflect/Parameter.java    Thu Jul 18
> 22:48:04 2013 -0700
> @@ -162,7 +162,7 @@
>
>       /**
>        * Returns the name of the parameter.  If the parameter's name is
> -     * {@linkplain isNamePresent() present}, then this method returns
> +     * {@linkplain #isNamePresent() present}, then this method returns
>        * the name provided by the class file. Otherwise, this method
>        * synthesizes a name of the form argN, where N is the index of
>        * the parameter in the descriptor of the method which declares
>



More information about the core-libs-dev mailing list