RFR: 8366584: Add an InstanceKlass::super() method that returns InstanceKlass* [v3]
David Holmes
dholmes at openjdk.org
Thu Sep 4 00:43:41 UTC 2025
On Tue, 2 Sep 2025 21:08:25 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> By adding an `InstanceKlass* InstanceKlass::super()` method to shadow `Klass* Klass:super()`, this PR makes it possible to simplify the following code
>>
>>
>> InstanceKlass* ik;
>> InstanceKlass* s;
>> s = InstanceKlass::cast(ik->super()); // before JDK-8366024
>> s = ik->java_super(); // after JDK-8366024
>>
>>
>> to
>>
>>
>> s = k->super();
>>
>>
>> So you no longer need to do casting or need to understand what `java_super()` is.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> @dholmes-ora and @coleep comments
Updates look good. Thanks
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27037#pullrequestreview-3182970156
More information about the serviceability-dev
mailing list