Skip to content

8370441: Remove unnecessary/confusing null check in Verifier::verify()#29314

Closed
Arraying wants to merge 3 commits intoopenjdk:masterfrom
Arraying:JDK-8370441
Closed

8370441: Remove unnecessary/confusing null check in Verifier::verify()#29314
Arraying wants to merge 3 commits intoopenjdk:masterfrom
Arraying:JDK-8370441

Conversation

@Arraying
Copy link
Member

@Arraying Arraying commented Jan 20, 2026

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 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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8370441: Remove unnecessary/confusing null check in Verifier::verify() (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29314/head:pull/29314
$ git checkout pull/29314

Update a local copy of the PR:
$ git checkout pull/29314
$ git pull https://git.openjdk.org/jdk.git pull/29314/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 29314

View PR using the GUI difftool:
$ git pr show -t 29314

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29314.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 20, 2026

👋 Welcome back phubner! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jan 20, 2026

@Arraying This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8370441: Remove unnecessary/confusing null check in Verifier::verify()

Reviewed-by: dholmes, coleenp

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 201 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dholmes-ora, @coleenp) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title 8370441 8370441: Remove unnecessary/confusing null check in Verifier::verify() Jan 20, 2026
@Arraying Arraying marked this pull request as ready for review January 20, 2026 09:38
@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Jan 20, 2026
@openjdk
Copy link

openjdk bot commented Jan 20, 2026

@Arraying The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 20, 2026
@mlbridge
Copy link

mlbridge bot commented Jan 20, 2026

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

The analysis seems correct and I agree that checking for impossible conditions is confusing.

Thanks

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 20, 2026
Copy link
Contributor

@coleenp coleenp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Arraying
Copy link
Member Author

Arraying commented Feb 2, 2026

Thanks for the reviews!
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 2, 2026
@openjdk
Copy link

openjdk bot commented Feb 2, 2026

@Arraying
Your change (at version 1ecae60) is now ready to be sponsored by a Committer.

@dholmes-ora
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Feb 3, 2026

Going to push as commit e21cb85.
Since your change was applied there have been 213 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 3, 2026
@openjdk openjdk bot closed this Feb 3, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Feb 3, 2026
@openjdk
Copy link

openjdk bot commented Feb 3, 2026

@dholmes-ora @Arraying Pushed as commit e21cb85.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@dholmes-ora
Copy link
Member

dholmes-ora commented Feb 3, 2026

Since your change was applied there have been 213 commits pushed to the master branch:

@Arraying please merge with master before integrating if your PR gets a long way behind the master branch. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants