RFR: 8370441: Remove unnecessary/confusing null check in Verifier::verify() [v2]
Paul Hübner
phubner at openjdk.org
Tue Jan 20 12:17:36 UTC 2026
> [JDK-8059924](https://bugs.openjdk.org/browse/JDK-8059924) introduced a nullcheck for a klass' Java mirror which runs during verification. However, in the modern VM, during verification time, the mirror is guaranteed to exist making the check unnecessary and misleading when reading the code. While implementing [JDK-8366488](https://bugs.openjdk.org/browse/JDK-8366488) it caused for quite some confusion. With this PR it is my intention to make sure that nobody gets side-tracked by this impossible condition.
>
> For an insight into previous discussion on this topic, please see the associated JBS issue.
>
> Testing: tiers 1-5 on Linux x64, AArch64, macOS x64, AArch64, Windows x64.
Paul Hübner has updated the pull request incrementally with two additional commits since the last revision:
- Keep the rest of the code.
- Revert "Turn check into an assert."
This reverts commit 78fa2983b532c4b390720316e79c975e61a4152a.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/29314/files
- new: https://git.openjdk.org/jdk/pull/29314/files/78fa2983..1ecae607
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=29314&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=29314&range=00-01
Stats: 10 lines in 1 file changed: 10 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/29314.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29314/head:pull/29314
PR: https://git.openjdk.org/jdk/pull/29314
More information about the hotspot-runtime-dev
mailing list