On Mon, 16 Jun 2025 15:43:39 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:
>> src/hotspot/share/oops/instanceKlass.cpp line 2404: >> >>> 2402: >>> 2403: >>> 2404: jmethodID InstanceKlass::get_jmethod_id(Method* method) { >> >> Should `method` be `const`? > > It's really unusual in our source code to pass const Metadata pointers > because of the history of the code. We should probably start doing that. > I'll change this to const and see if there's a fall out. Much of the metadata parameter declarations aren't const-safe. Adding this one const has a big fall-out leading to some jni calls. This would be is a good project and we should have it for new code, which some of this is. I'll see if can add any consts. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25267#discussion_r2150511587