<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Indeed, Archie is right. There are different levels of strictness in the specification.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In this particular site, we have "the hash code is the value of the expression" which only requires the return value to be equivalent. The implementation is free to be anything.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In specifications, we usually use "equivalent" to indicate behaviors are the same but implementation code may differ. The words "the same as", "idential to" or simply "is" indicate exact matches.</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-Chen</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> core-libs-dev <core-libs-dev-retn@openjdk.org> on behalf of Archie Cobbs <archie.cobbs@gmail.com><br>
<b>Sent:</b> Wednesday, April 30, 2025 3:43 PM<br>
<b>To:</b> Steffen Nießing <zuniquex@protonmail.com><br>
<b>Cc:</b> core-libs-dev@openjdk.org <core-libs-dev@openjdk.org><br>
<b>Subject:</b> Re: JavaDoc fix in java.util.Date</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">On Wed, Apr 30, 2025 at 3:38 PM Steffen Nießing <<a href="mailto:zuniquex@protonmail.com">zuniquex@protonmail.com</a>> wrote:</div>
<div class="x_gmail_quote x_gmail_quote_container">
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div style="font-family:Arial,sans-serif; font-size:14px; color:rgb(0,0,0); background-color:rgb(255,255,255)">
However, the docs should match the expression used in the implementation when explicitly naming the returned expression. Should we update both to Long.hashCode(this.getTime())?</div>
</blockquote>
<div><br>
</div>
<div>I think that's a little too strong of a statement. Rather, if the docs describe the behavior using an expression or sample code, the actual behavior should be equivalent to that expression or sample code; the actual implementation can effect that result
however it wants to, as long as the result is the same.</div>
<div><br>
</div>
<div>-Archie</div>
</div>
<br>
<span class="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_gmail_signature">Archie L. Cobbs<br>
</div>
</div>
</div>
</body>
</html>