RFR: 8254275: Development to revise "value-based class" & apply to wrappers [v2]

Dan Smith dlsmith at openjdk.java.net
Fri Oct 16 17:29:24 UTC 2020


On Wed, 14 Oct 2020 19:29:59 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Dan Smith has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Revise definition for more flexible ==. Apply revised boilerplate to wrappers and existing references.
>
> src/java.base/share/classes/java/lang/doc-files/ValueBased.html line 52:
> 
>> 50:     <li>do not have (or have deprecated any) accessible constructors;</li>
>> 51:     <li>may support instance creation through factory methods that do <em>not</em>
>> 52:         promise a unique identity for each invocation—in particular, each factory
> 
> Since the factory method are in a value-based classes, they are not allowed to promise a unique identity.
> So that statement is always true in the value-based context.
> 
> Use "," instead of "-" or start a new sentence.

"Not allowed to promise a unique identity" based on what? Which other bullet in this list? There's the assertion about
being "freely substitutable", but that doesn't mean a factory method can't promise to create a new instance on every
invocation.

-------------

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



More information about the valhalla-dev mailing list