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.
------------- Commit messages: - JDK-8282776: Bad NullPointerException message when invoking an interface MethodHandle on a null receiver Changes: https://git.openjdk.java.net/jdk/pull/7766/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7766&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282776 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7766.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7766/head:pull/7766 PR: https://git.openjdk.java.net/jdk/pull/7766