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

JDK-8301179: Replace NULL with nullptr in share/gc/serial/ #12226

Closed
wants to merge 1 commit into from

Conversation

jdksjolen
Copy link
Contributor

@jdksjolen jdksjolen commented Jan 26, 2023

Hi, this PR changes all occurrences of NULL to nullptr for the subdirectory share/gc/serial/. Unfortunately the script that does the change isn't perfect, and so we
need to comb through these manually to make sure nothing has gone wrong. I also review these changes but things slip past my eyes sometimes.

Here are some typical things to look out for:

  1. No changes but copyright header changed (probably because I reverted some changes but forgot the copyright).
  2. Macros having their NULL changed to nullptr, these are added to the script when I find them. They should be NULL.
  3. nullptr in comments and logs. We try to use lower case "null" in these cases as it reads better. An exception is made when code expressions are in a comment.

An example of this:

// This function returns null
void* ret_null();
// This function returns true if *x == nullptr
bool is_nullptr(void** x);

Note how nullptr participates in a code expression here, we really are talking about the specific value nullptr.

Thanks!


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-8301179: Replace NULL with nullptr in share/gc/serial/

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12226

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

Using diff file

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

@jdksjolen jdksjolen marked this pull request as ready for review January 26, 2023 16:58
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 26, 2023

👋 Welcome back jsjolen! 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.

@jdksjolen
Copy link
Contributor Author

Hi, I consider this patch trivial. Please mention that it is when reviewing so it can be merged with only one approval :-).

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 26, 2023
@openjdk
Copy link

openjdk bot commented Jan 26, 2023

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

  • hotspot-gc

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-gc hotspot-gc-dev@openjdk.org label Jan 26, 2023
@mlbridge
Copy link

mlbridge bot commented Jan 26, 2023

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Choose a reason for hiding this comment

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

Lgtm and trivial.

@openjdk
Copy link

openjdk bot commented Jan 26, 2023

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

8301179: Replace NULL with nullptr in share/gc/serial/

Reviewed-by: tschatzl, kbarrett

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

  • 7ddafd7: 8301189: validate-source fails after JDK-8298873
  • fc26d3e: 8298873: Update IllegalRecordVersion.java for changes to TLS implementation
  • a2a7703: 8299444: java.util.Set.copyOf allocates needlessly for empty input collections
  • d98a323: 8301070: Replace NULL with nullptr in share/memory/
  • 315398c: 8221785: Let possibly_parallel_threads_do cover the same threads as threads_do
  • 14114c2: 8301005: Clean up Copy::conjoint_*_atomic on windows
  • 973f741: 8300968: Accessorize raw oop load in DeadCounterClosure
  • 64ddf95: 8299858: [Metrics] Swap memory limit reported incorrectly when too large
  • 28545dc: 8300247: Harden C1 xchg on AArch64 and PPC
  • 3f63381: 8300913: ZGC: assert(to_addr != 0) failed: Should be forwarded
  • ... and 24 more: https://git.openjdk.org/jdk/compare/a5d8e12872d9de399fa97b33896635d101b71372...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 Jan 26, 2023
Copy link

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

@jdksjolen
Copy link
Contributor Author

Thank you!

/integrate

@openjdk
Copy link

openjdk bot commented Jan 27, 2023

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

  • b77abc6: 8301178: Replace NULL with nullptr in share/gc/epsilon/
  • f7da09c: 8301164: Remove unused ResourceStack class
  • 6e4710b: 8300253: Introduce AArch64 nzcv accessors
  • c6b3f2d: 8301129: Link to debuginfo files should only be made after stripping
  • 938b409: 8301133: IGV: NPE occurs when creating a diff graph with a graph in a different folder
  • 0eb1f66: 8298038: [s390] Configure script detects num_cores +1
  • c3ff151: 8301190: [vectorapi] The typeChar of LaneType is incorrect when default locale is tr
  • 7eff578: 8288050: Add support of SHA-512/224 and SHA-512/256 to the PBKDF2 and PBES2 impls in SunJCE provider
  • d6007a3: 8298869: Update ConnectionTest.java for changes to TLS implementation
  • c427814: 8299982: (bf) Buffer.checkIndex(int, int) should use Preconditions.checkIndex(int, int, BiFunction)
  • ... and 34 more: https://git.openjdk.org/jdk/compare/a5d8e12872d9de399fa97b33896635d101b71372...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 27, 2023

@jdksjolen Pushed as commit 107e184.

💡 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-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated
3 participants