RFR: JDK-8300245: Replace NULL with nullptr in share/jfr/ [v7]
Johan Sjölen
jsjolen at openjdk.org
Mon May 8 10:00:45 UTC 2023
> Hi, this PR changes all occurrences of NULL to nullptr for the subdirectory share/jfr/. 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:
>
> No changes but copyright header changed (probably because I reverted some changes but forgot the copyright).
> Macros having their NULL changed to nullptr, these are added to the script when I find them. They should be NULL.
> 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!
Johan Sjölen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
- Missing fixes
- Merge branch 'master' into JDK-8300245
- It's impossible for an array to be nullptr, remove asserts.
Fails build on Clang systems
- Merge remote-tracking branch 'origin/master' into JDK-8300245
- Fix outdated copyright
- Manual fix
- Fix two faulty NULL_STRING misses
- More manual fixes
- Merge remote-tracking branch 'origin/master' into JDK-8300245
- Manual fixes
- ... and 1 more: https://git.openjdk.org/jdk/compare/5c7ede94...cb705720
-------------
Changes: https://git.openjdk.org/jdk/pull/12034/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12034&range=06
Stats: 2070 lines in 125 files changed: 1 ins; 4 del; 2065 mod
Patch: https://git.openjdk.org/jdk/pull/12034.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/12034/head:pull/12034
PR: https://git.openjdk.org/jdk/pull/12034
More information about the serviceability-dev
mailing list