Quantcast

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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

joe darcy
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);
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Lance Andersen
Looks fine Joe

--

Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
[hidden email]

Sent from my iPhone

> On Feb 16, 2017, at 9:29 PM, Joseph D. Darcy <[hidden email]> 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);
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Martin Buchholz-3
In reply to this post by joe darcy
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 <[hidden email]>
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);
>
Loading...