RFR: 8366498: Wrong InstanceKlass::cast() in ClassFileParser::parse_super_class [v2]

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


On Mon, 1 Sep 2025 06:27:34 GMT, David Holmes <dholmes at openjdk.org> wrote:

> This does correct the cast but as you suggest this code should actually be unreachable - `is_klass()` will fail as no classes have been resolved at this stage of classfile parsing,

I removed the code for checking `is_klass()`. I added an assert() and it doesn't get hit at all in local testing. For curiosity, I will run it through the JCK and to see if we ever come here with a resolved class. I will remove the assert in the final version.

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

PR Comment: https://git.openjdk.org/jdk/pull/27026#issuecomment-3241131958


More information about the hotspot-runtime-dev mailing list