On Wed, 10 Mar 2021 16:04:22 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Use requireNonNull instead. > > Well spotted. Nice catch! We have a test that is supposed to test this: https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java But it is only checking if an NPE is thrown, and not checking for a message, since `Objects::requireNonNull` does not set an exception message. I guess that test was still passing because NPEs are thrown at some other point during the call. ------------- PR: https://git.openjdk.java.net/jdk/pull/2914