RFR: 8367142: Avoid InstanceKlass::cast when converting java mirror to InstanceKlass [v3]
Coleen Phillimore
coleenp at openjdk.org
Mon Sep 15 15:45:25 UTC 2025
On Wed, 10 Sep 2025 22:46:00 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> The purpose of this PR is to simplify JNI code and also to avoid unnecessary `InstanceKlass::cast()` calls by adding a new function:
>>
>>
>> static InstanceKlass* java_lang_Class::as_InstanceKlass(oop java_class);
>>
>>
>> This PR is intended to be a strict clean-up that preserves existing behaviors.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed the (jobject) version of as_Klass/as_InstanceKlass
This looks great. Thanks!
-------------
Marked as reviewed by coleenp (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27158#pullrequestreview-3225277530
More information about the serviceability-dev
mailing list