Skip to content
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

8289763: Remove NULL check in CDSProtectionDomain::init_security_info() #9380

Conversation

iklam
Copy link
Member

@iklam iklam commented Jul 5, 2022

Please review this trivial clean up. I removed the unnecessary NULL check, and replaced the CHECK_(pd) with CHECK_NH to make the code cleaner.

It's easier to view the changes by ignoring whitespace differences.


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-8289763: Remove NULL check in CDSProtectionDomain::init_security_info()

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9380

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 5, 2022

👋 Welcome back iklam! 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 Jul 5, 2022

@iklam 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 hotspot-runtime hotspot-runtime-dev@openjdk.org label Jul 5, 2022
@iklam iklam marked this pull request as ready for review July 5, 2022 21:07
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 5, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 5, 2022

Webrevs


if (ik != NULL) {
Copy link
Member

Choose a reason for hiding this comment

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

Since the null check for ik has been removed, I'm wondering if it makes sense to add an assert that ik is non-null?
(I noticed the caller already has a null check before calling the function.)

Copy link
Member Author

Choose a reason for hiding this comment

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

There are many functions that require input parameters to be non-NULL without explicitly asserting them. I think in this case, the API is quite obvious that a NULL class shouldn't be passed, so I think an assert is not necessary.

Copy link
Member

@calvinccheung calvinccheung left a comment

Choose a reason for hiding this comment

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

The cleanup of CHECK_ looks good. Thanks.

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 and trivial to me.

@openjdk
Copy link

openjdk bot commented Jul 6, 2022

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

8289763: Remove NULL check in CDSProtectionDomain::init_security_info()

Reviewed-by: ccheung, 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 16 new commits pushed to the master branch:

  • 9f37ba4: 8288706: Unused parameter 'boolean newln' in method java.lang.VersionProps#print(boolean, boolean)
  • dfb24ae: 8289060: Undefined Behaviour in class VMReg
  • 82a8bd7: 8287596: Reorg jdk.test.lib.util.ForceGC
  • cc2b792: 8288992: AArch64: CMN should be handled the same way as CMP
  • 75c0a5b: 8288824: [arm32] Display isetstate in register output
  • 83a5d59: 8278479: RunThese test failure with +UseHeavyMonitors and +VerifyHeavyMonitors
  • cbaf6e8: 8288022: c2: Transform (CastLL (AddL into (AddL (CastLL when possible
  • 8341895: 8289739: Add G1 specific GC breakpoints for testing
  • ac6be16: 8289695: [TESTBUG] TestMemoryAwareness.java fails on cgroups v2 and crun
  • 4ad18cf: 8289730: Deprecated code sample in java.lang.ClassCastException
  • ... and 6 more: https://git.openjdk.org/jdk/compare/77c3bbf105403089fec69d51406fe3e6f562271f...master

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 6, 2022
@iklam
Copy link
Member Author

iklam commented Jul 7, 2022

Thanks @calvinccheung and @coleenp for the review
/integrate

@openjdk
Copy link

openjdk bot commented Jul 7, 2022

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

  • a694e9e: 8288838: jpackage: file association additional arguments
  • 95e3190: 8210708: Use single mark bitmap in G1
  • 8e7b45b: 8282986: Remove "system" in boot class path names
  • 74ca6ca: 8289800: G1: G1CollectionSet::finalize_young_part clears survivor list too early
  • 86f63f9: 8289164: Convert ResolutionErrorTable to use ResourceHashtable
  • 013a5ee: 8137280: Remove eager reclaim of humongous controls
  • 77ad998: 8289778: ZGC: incorrect use of os::free() for mountpoint string handling after JDK-8289633
  • 532a6ec: 7124313: [macosx] Swing Popups should overlap taskbar
  • e05b2f2: 8289856: [PPC64] SIGSEGV in C2Compiler::init_c2_runtime() after JDK-8289060
  • cce77a7: 8289799: Build warning in methodData.cpp memset zero-length parameter
  • ... and 34 more: https://git.openjdk.org/jdk/compare/77c3bbf105403089fec69d51406fe3e6f562271f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 7, 2022
@openjdk openjdk bot closed this Jul 7, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 7, 2022
@openjdk
Copy link

openjdk bot commented Jul 7, 2022

@iklam Pushed as commit 5564eff.

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

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
4 participants