RFR: 8338471: Refactor Method::get_new_method() for better NoSuchMethodError handling [v2]

Dean Long dlong at openjdk.org
Thu Sep 12 03:47:04 UTC 2024


On Tue, 10 Sep 2024 06:50:13 GMT, David Holmes <dholmes at 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


More information about the serviceability-dev mailing list