RFR: JDK-8301225: Replace NULL with nullptr in share/gc/shenandoah/

William Kemper wkemper at openjdk.org
Fri Jan 27 21:21:16 UTC 2023


On Fri, 27 Jan 2023 19:38:45 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.cpp line 61:
>> 
>>> 59:     _worker_data[i] = nullptr;
>>> 60:     SHENANDOAH_PAR_PHASE_DO(,, SHENANDOAH_WORKER_DATA_nullptr)
>>> 61: #undef SHENANDOAH_WORKER_DATA_nullptr
>> 
>> Fix these macros
>
> My suggestion would be to leave the macro name unchanged, just change the definition. Or at least use uppercasing in the macro name. (Perhaps the latter's what your comment intended.)
> 
> More generally, is there a `jcheck` rule that will prevent re-introduction of NULL usage into the mix?

This code diff is out of date, the macro name was reverted to the original in a subsequent commit. Good question about adding this to `jcheck`.

-------------

PR: https://git.openjdk.org/jdk/pull/12251


More information about the shenandoah-dev mailing list