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

Kim Barrett kbarrett at openjdk.java.net
Wed Oct 27 20:33:13 UTC 2021


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

>> Please review,
>> 
>>   I have no idea why this problem has not been encountered in compilation, it is obvious the usage of resolution operator :: is not complete and wrong.
>> 
>>  Tests: mach5 tier1, tier4
>> 
>> Thanks
>> Yumin
>
> 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.

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

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


More information about the hotspot-runtime-dev mailing list