RFR: 8366498: Simplify ClassFileParser::parse_super_class [v2]

Ioi Lam iklam at openjdk.org
Mon Sep 1 07:49:42 UTC 2025


On Mon, 1 Sep 2025 07:39:14 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Simplify parse_super_klass() -> check_super_class()
>
> src/hotspot/share/classfile/classFileParser.cpp line 5798:
> 
>> 5796:   } else {
>> 5797:     assert(_class_name == vmSymbols::java_lang_Object(), "already checked");
>> 5798:     _super_klass = nullptr;
> 
> This seems unnecessary. We have already check the name and `_super_klass` is initialized to null.

I think it help people who wonder why `_super_klass` is not updated in this case. Maybe I can change the assignment to


asssert(_super_klass == nullptr, "already initialized");

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27026#discussion_r2313157080


More information about the hotspot-runtime-dev mailing list