RFR: JDK-8276039: typo: java_lang_Class:set_init_lock() should be java_lang_Class::set_init_lock()

Yumin Qi minqi at openjdk.java.net
Wed Oct 27 20:44:09 UTC 2021

On Wed, 27 Oct 2021 20:30:18 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> src/hotspot/share/classfile/javaClasses.cpp line 1264:
>>> 1262:     InstanceKlass::cast(k)->do_local_static_fields(&reset);
>>> 1263: 
>>> 1264:     java_lang_Class::set_init_lock(archived_mirror, NULL);
>> Rather than fixing the qualification, I would just drop the qualification completely, being consistent with most of the other similar calls in this function, including several that immediately follow.
> In the list of qualified uses given earlier as examples, roughly half are required because they are outside the scope of java_lang_Class, and roughly half are unnecessary.  This one is unnecessary, and qualifying it makes it different from adjacent usage.

Yes, not all of them are unnecessary. I just grep from the file and checked part of them, thanks! I will remove the unnecessary qualifier 'java_lang_Class::' for static functions defined in java_lang_Class.


PR: https://git.openjdk.java.net/jdk/pull/6130

More information about the hotspot-runtime-dev mailing list