On Tue, 10 Sep 2024 06:50:13 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> So that implies that you trust my reading of this code.  It is complicated 
>> enough that testing both seems like a safe thing to do and somewhat 
>> clarifying, or else adding an assert like:
>> 
>>     assert(new_method != nullptr || old_method->is_deleted(), "this is the 
>> only way this happens");
>>     return new_method == nullptr ? nsme : new_method;
>
> The assert works for me.

Can we assert the stronger statement: `(new_method == nullptr) == 
(old_method->is_deleted())` ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20874#discussion_r1756060487

Reply via email to