RFR: 8366498: Simplify ClassFileParser::parse_super_class [v2]
David Holmes
dholmes at openjdk.org
Mon Sep 1 07:57:42 UTC 2025
On Mon, 1 Sep 2025 07:47:10 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> 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");
I would just have:
else {
// The class is Object - so no superclass
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27026#discussion_r2313174940
More information about the hotspot-runtime-dev
mailing list