JDK 10 RFR of JDK-8172928: Add doc link from System.identityHashCode to Object.hashCode

Martin Buchholz martinrb at google.com
Fri Feb 17 03:27:42 UTC 2017


Ever since @link became available, it's been preferable to find some way to
use @link instead of @see.  Why not @linkify the existing reference to
Object.hashCode somehow?  Less obvious is how to do that for
Objects.hashCode - this may indeed be a good use for @see.

On Thu, Feb 16, 2017 at 6:29 PM, Joseph D. Darcy <joe.darcy at oracle.com>
wrote:

> Hello,
>
> Please review the patch below to address
>
>     JDK-8172928: Add doc link from System.identityHashCode to
> Object.hashCode
>
> Thanks,
>
> -Joe
>
> diff -r e405d4bf5c56 src/java.base/share/classes/java/lang/System.java
> --- a/src/java.base/share/classes/java/lang/System.java    Tue Feb 14
> 16:56:12 2017 +0100
> +++ b/src/java.base/share/classes/java/lang/System.java    Thu Feb 16
> 18:26:54 2017 -0800
> @@ -534,6 +534,8 @@
>       * @param x object for which the hashCode is to be calculated
>       * @return  the hashCode
>       * @since   1.1
> +     * @see Object#hashCode
> +     * @see java.util.Objects#hashCode(Object)
>       */
>      @HotSpotIntrinsicCandidate
>      public static native int identityHashCode(Object x);
>


More information about the core-libs-dev mailing list