RFR: 8374730: Add support for null restriction in j.l.r.Type [v2]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Jan 7 18:22:49 UTC 2026


> This PR adds j.l.r.Type support for null restrictions.
> 
> More specifically, a new public interface is added, namely `NullRestrictedType`, modelling types with null restrictions.
> 
> Changes to the signature parsing code have been made so that instances of the new interface are generated accordingly.
> A new test makes sure that everything behaves correctly.
> 
> Note: we should also make sure that the `AnnotatedType` hierarchy is changed to reflect the null-restriction changes, but for now that is lower priority and will be pursued in a separate PR.

Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:

  Address review comments

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1863/files
  - new: https://git.openjdk.org/valhalla/pull/1863/files/2275da75..538a4857

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1863&range=01
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1863&range=00-01

  Stats: 12 lines in 4 files changed: 5 ins; 0 del; 7 mod
  Patch: https://git.openjdk.org/valhalla/pull/1863.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1863/head:pull/1863

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


More information about the valhalla-dev mailing list