On Wed, 23 Mar 2022 03:37:01 GMT, Mandy Chung <mch...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line >> 424: >> >>> 422: throw new IncompatibleClassChangeError(msg); >>> 423: } else { >>> 424: throw new NullPointerException("Cannot invoke " + >>> member + " with null receiver"); >> >> Suggestion: >> >> String msg = String.format("Cannot invoke %s with null >> receiver", >> member); >> throw new NullPointerException(msg); > > Good catch. Will update it. I now reminded myself that java.base is built with -XDstringConcat=inline to avoid the bootstrap issue. So the original patch should have no issue. In any case, I updated the patch to use `String.format` to be consistent with the ICCE message formatting. ------------- PR: https://git.openjdk.java.net/jdk/pull/7766