[lworld] RFR: 8346307: [lworld] Clarify identity vs value in Class, Objects, and document limitations of value objects [v4]
Joseph Tarbit
duke at openjdk.org
Tue Feb 18 19:28:14 UTC 2025
On Tue, 4 Feb 2025 20:59:39 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Add APINote and javadoc for IdentityException where it will be useful to know that identity or value objects are treated differently.
>> Simplified WeakHashMap javadoc updates for IdentityException.
>> Added note to System.identityHashCode to include value objects.
>> Added to class javadoc for IdentityHashMap for value objects.
>
> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>
> Expand javadoc reference to Reference
src/java.base/share/classes/java/lang/Class.java line 713:
> 711: @PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS, reflective=true)
> 712: public boolean isValue() {
> 713: return PreviewFeatures.isEnabled() ? !isIdentity() : false;
Is there a reason this isn't just `PreviewFeatures.isEnabled() && !isIdentity()`?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1327#discussion_r1957317190
More information about the valhalla-dev
mailing list