RFR: JDK-8300240: Replace NULL with nullptr in share/ci/

Vladimir Kozlov kvn at openjdk.org
Thu Jan 19 21:07:04 UTC 2023


On Tue, 17 Jan 2023 11:07:10 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Do the conversion in the share/ci/ sub-directory and all of its files.

src/hotspot/share/ci/ciInstance.cpp line 47:

> 45:   // Return null if it is not java.lang.Class.
> 46:   if (m == nullptr || m->klass() != vmClasses::Class_klass()) {
> 47:     return nullptr;

I am confused. Did I miss some previous reviews which asked to keep `null` in comments?
These lines are confusing: comment says `null` but method returns `nullptr`. Why not use `nullptr` in this comment and in other files comments?

src/hotspot/share/ci/ciInstance.hpp line 56:

> 54: public:
> 55:   // If this object is a java mirror, return the corresponding type.
> 56:   // Otherwise, return nullptr.

And here we have `nullptr` in comment.

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

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


More information about the hotspot-compiler-dev mailing list