On Wed, 9 Mar 2022 22:52:41 GMT, Mandy Chung <mch...@openjdk.org> wrote:

> A simple patch to call `Objects.requireNonNull(recv)` for an explicit null 
> receiver check rather than NPE thrown by `Object::getClass`.  The message of 
> NPE generated by JEP 358 (Helpful NullPointerExceptions) is supposed to be 
> helpful but not in this case.

`Objects::requireNonNull` is force inlined.   I expect the performance overhead 
should be insignificant in practice.   I asked @cl4es to give the performance 
guidance and review.

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

PR: https://git.openjdk.java.net/jdk/pull/7766

Reply via email to