RFR: 8254275: [valhalla/jep390] Revise "value-based class" & apply to wrappers [v4]

Roger Riggs rriggs at openjdk.java.net
Thu Nov 5 16:26:04 UTC 2020

On Thu, 5 Nov 2020 00:30:57 GMT, Dan Smith <dlsmith at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/doc-files/ValueBased.html line 60:
>>> 58:     <li>
>>> 59: </ul>
>>> 60: 
>> Perhaps as an intro to the following points to make it clear these are about what a program should and should not do.
>> Should use equals(); should use explicit synchronization using lock objects or instances that are not value-based classes, etc.
>> `Programs should not attempt to distinguish the identities of value based class instances, otherwise the result may be unpredictable.`
> I'm not totally following. This is a revision to the "When two instances" paragraph? Can you propose an alternative phrasing for the entire paragraph?

These two paragraphs are fine, they express the negative, not what a developer should do.


PR: https://git.openjdk.java.net/valhalla/pull/222

More information about the valhalla-dev mailing list