RFR: 8268406: Deallocate jmethodID native memory [v2]

David Holmes dholmes at openjdk.org
Tue Jun 17 03:22:30 UTC 2025


On Mon, 16 Jun 2025 15:51:59 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/oops/jmethodIDTable.cpp line 98:
>> 
>>> 96: 
>>> 97: static JmethodEntry* get_jmethod_entry(jmethodID mid) {
>>> 98:   assert(mid != nullptr, "JNI method id should not be null");
>> 
>> Perhaps: s/null/nullptr/
>> I can't remember if assert failure text output is okay to be `null`.
>
> I think the rules are comments and strings say `null` and code is `nullptr`.

Yes that is the general rule. We can talk about null-ness as a concept, e..g "x must not be null", whereas `nullptr` is a C++ artifact used to check null-ness.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25267#discussion_r2151225664


More information about the hotspot-dev mailing list