RFR: 8367719: Refactor JNI code that uses class_to_verify_considering_redefinition()

Ioi Lam iklam at openjdk.org
Tue Sep 16 02:53:04 UTC 2025


Simplify the boilerplate code in jvm.cpp that calls `JvmtiThreadState::class_to_verify_considering_redefinition()`, and reduce the number of `InstanceKlass::cast()` calls.

I also changed a few fields/arguments from `Klass*` to `InstanceKlass*` as these are used exclusively with `InstanceKlass*`.

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

Commit messages:
 - 8367719: Refactor JNI code that uses class_to_verify_considering_redefinition()

Changes: https://git.openjdk.org/jdk/pull/27303/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27303&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8367719
  Stats: 128 lines in 3 files changed: 26 ins; 33 del; 69 mod
  Patch: https://git.openjdk.org/jdk/pull/27303.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27303/head:pull/27303

PR: https://git.openjdk.org/jdk/pull/27303


More information about the serviceability-dev mailing list