[lworld] Integrated: 8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes
Mandy Chung
mchung at openjdk.java.net
Thu Feb 10 22:49:46 UTC 2022
On Wed, 9 Feb 2022 20:24:07 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> The `MethodHandles::zero` and `MethodHandles::empty` APIs are updated to return a primitive object with the default value if the given type is a primitive value type. These methods return null if the given type is a value class and a primitive reference type.
>
> The MethodHandles::constant method will throw `NullPointerException` if the given type is a primitive value type and the given value is null. That's the same behavior as the `int` type but such case is missing in the spec.
This pull request has now been integrated.
Changeset: 611fca0a
Author: Mandy Chung <mchung at openjdk.org>
URL: https://git.openjdk.java.net/valhalla/commit/611fca0a13051036144414e0d07509f45b5e70ca
Stats: 132 lines in 2 files changed: 126 ins; 0 del; 6 mod
8281073: [lworld] Update MethodHandles::zero, empty, constant APIs for primitive classes
Reviewed-by: rriggs
-------------
PR: https://git.openjdk.java.net/valhalla/pull/644
More information about the valhalla-dev
mailing list