On Wed, 10 Sep 2025 09:39:28 GMT, Stefan Karlsson <[email protected]> wrote:
>> There are 54 cases where we call as_Klass(JNIHandles::resolve_non_null(x)), >> so I think it would be nice to have a way to write less code. > I think you should deal with that by adding a helper function inside jni.cpp > instead of extending the *Klass functions to take a jobject. I agree with this. I don't think you should move any more jobjects into the runtime code. The jobjects should stop at jni/jvm. They don't everywhere but that's something that over time we should fix. For instance, the ci creates jobjects but it should use OopHandles instead, except per-thread OopStorage isn't implemented yet. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27158#issuecomment-3274573970
