[lworld] RFR: 8294312: [lworld] Add java.util.Objects.isIdentityObject

Mandy Chung mchung at openjdk.org
Thu Sep 29 18:09:42 UTC 2022


On Wed, 28 Sep 2022 15:49:05 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> Add `java.util.Objects.isIdentityObject(obj)` and update tests.
> 
> Correct j.l.Class.isIdentity() and .isValue() to correctly identify all arrays as identity objects.
> (The modifiers for array classes do have not reliable ACC_IDENTITY or ACC_VALUE bits).
> 
> Updated ValhallaFeaturesTest to use junit.

src/java.base/share/classes/java/lang/Object.java line 42:

> 40:  * The class {@code Object} itself is neither an identity class nor a value class.
> 41:  * See {@jls The Java Language Specification  8.1.1.5 identity and value Classes}.
> 42:  * An Instance can be created with {@code new Object()}, those instances are

s/Instance/instance

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

PR: https://git.openjdk.org/valhalla/pull/770



More information about the valhalla-dev mailing list