Skip to content

New NullRestricted Attribute in Project Valhalla #17340

Description

@hangshao0

In the last spec: https://cr.openjdk.org/~dlsmith/jep401/jep401-20230428/specs/flattened-heap-jvms.html, a NullRestricted attribute is introduced.

It indicates that the field cannot be null. putfield and putstatic will throw NPE if there is an attempt to assigned null to such fields. The null restricted field needs to be initialized to the default instance.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions