RFR: 8370441: Remove unnecessary/confusing null check in Verifier::verify()
Paul Hübner
phubner at openjdk.org
Tue Jan 20 09:41:30 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.
-------------
Commit messages:
- Turn check into an assert.
Changes: https://git.openjdk.org/jdk/pull/29314/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29314&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8370441
Stats: 12 lines in 1 file changed: 0 ins; 11 del; 1 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