Skip to content

8274232: Cleanup unnecessary null comparison before instanceof check in jdk.jdi #5659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

turbanoff
Copy link
Member

@turbanoff turbanoff commented Sep 23, 2021

Update code checks both non-null and instance of a class in jdk.jdi module classes.
The checks and explicit casts could also be replaced with pattern matching for the instanceof operator.
Similar cleanups

  1. JDK-8273484 java.naming
  2. JDK-8258422 java.base

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8274232: Cleanup unnecessary null comparison before instanceof check in jdk.jdi

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5659/head:pull/5659
$ git checkout pull/5659

Update a local copy of the PR:
$ git checkout pull/5659
$ git pull https://git.openjdk.java.net/jdk pull/5659/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5659

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5659.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 23, 2021

👋 Welcome back turbanoff! 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 openjdk bot added the rfr Pull request is ready for review label Sep 23, 2021
@openjdk
Copy link

openjdk bot commented Sep 23, 2021

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

  • serviceability

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 serviceability serviceability-dev@openjdk.org label Sep 23, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 23, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Sep 23, 2021

@turbanoff 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:

8274232: Cleanup unnecessary null comparison before instanceof check in jdk.jdi

Reviewed-by: cjplummer, sspitsyn

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 8 new commits pushed to the master branch:

  • 5ba0d09: 8274205: Handle KDC_ERR_SVC_UNAVAILABLE error code from KDC
  • 5a12af7: 8271880: Tighten condition for excluding regions from collecting cards with cross-references
  • db23ecd: 8274191: Improve g1 evacuation failure injector performance
  • d91e227: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel
  • 971aa35: 8274083: Update testing docs to mention tiered testing
  • 1d44014: 8273034: Make javadoc navigation collapsible on small displays
  • bb74ae8: 8274171: java/nio/file/Files/probeContentType/Basic.java failed on "Content type" mismatches
  • 56b8b35: 8273261: Replace 'while' cycles with iterator with enhanced-for in java.base

Please see this link for an up-to-date comparison between the source branch of this pull request and 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 (@plummercj, @sspitsyn) 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 added the ready Pull request is ready to be integrated label Sep 23, 2021
Copy link
Contributor

@sspitsyn sspitsyn 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.
Thanks,
Serguei

@turbanoff
Copy link
Member Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 24, 2021
@openjdk
Copy link

openjdk bot commented Sep 24, 2021

@turbanoff
Your change (at version ad678f3) is now ready to be sponsored by a Committer.

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 22, 2021

@turbanoff This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@turbanoff
Copy link
Member Author

keep open

@plummercj
Copy link
Contributor

Are you just waiting for a sponsor?

@turbanoff
Copy link
Member Author

Yep.

@plummercj
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Nov 15, 2021

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

  • 1830b8d: 8275056: Virtualize G1CardSet containers over heap region
  • fe45835: 8274856: Failing jpackage tests with fastdebug/release build
  • 9046077: 8276084: Linux DEB Bundler: release number in outputted .deb file should be optional
  • 7fc344d: 8277028: Use service type documentation as fallback for @provides
  • 35a831d: 8272170: Missing memory barrier when checking active state for regions
  • 02f7900: 8276932: G1: Annotate methods with override explicitly in g1CollectedHeap.hpp
  • fdcd16a: 8277048: Tiny improvements to the specification text for java.util.Properties.load
  • b231f5b: 8276921: G1: Remove redundant failed evacuation regions calculation in RemoveSelfForwardPtrHRClosure
  • ca2efb7: 8274687: JDWP deadlocks if some Java thread reaches wait in blockOnDebuggerSuspend
  • 296780c: 8276983: Small fixes to DumpAllocStat::print_stats
  • ... and 642 more: https://git.openjdk.java.net/jdk/compare/0aa63feca8704c8958530ef9e3df128570c50e12...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 15, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and 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 Nov 15, 2021
@openjdk
Copy link

openjdk bot commented Nov 15, 2021

@plummercj @turbanoff Pushed as commit db0c8d5.

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

@turbanoff turbanoff deleted the cleanup_unnecessary_null_comparison_before_instanceof_jdk.jdi branch February 21, 2022 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants