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

Dan Smith dlsmith at openjdk.java.net
Tue Nov 24 19:16:06 UTC 2020

On Mon, 23 Nov 2020 19:40:55 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Dan Smith has updated the pull request incrementally with one additional commit since the last revision:
>>   Review comments
> src/java.base/share/classes/java/lang/doc-files/ValueBased.html line 40:
>> 38:     <li>the class declares only final instance fields (though these may contain references
>> 39:         to mutable objects);</li>
>> 40:     <li>the class declares implementations of <code>equals</code>,
> Does saying the class "declares" the methods apply to Records and other classes that have provided or generated methods for equals, hashcode, and toString?  Must the class explicitly declare the methods to meet the criteria?
> Perhaps "the implementations of equals, hashCode, and tostring use only the instance's state...".

Generated fields and methods are "implicitly declared". But I suppose acceptable implementations could be inherited from a superclass, if the superclass isn't Object. I'll fix.


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

More information about the valhalla-dev mailing list