CSR :
|
|
Relates :
|
|
Relates :
|
As per the revised documentation for DynamicCallSiteDesc.withArgs: "NullPointerException - if the argument or its contents are null" Attached code doesn't throw NPE for argument array containing null: public class t { public static boolean m() throws Throwable { DynamicCallSiteDesc desc = DynamicCallSiteDesc.of(ConstantDescs.ofCallsiteBootstrap( ClassDesc.of("BootstrapAndTarget"), "bootstrap2", ClassDesc.of("java.lang.invoke.CallSite") ), "getTarget", MethodTypeDesc.ofDescriptor("()I")); ConstantDesc[] cd = new ConstantDesc[1]; cd[0] = null; desc.withArgs(cd); return true; } public static void main(String[] args) throws Throwable { System.out.println("m: " + m()); } }
|