This commit is contained in:
Jesper Wilhelmsson 2021-07-14 01:07:52 +00:00
commit 4a7ccf36e9
13 changed files with 372 additions and 68 deletions

View file

@ -66,7 +66,7 @@ public class DynamicCallSiteDesc {
* @param bootstrapArgs {@link ConstantDesc}s describing the static arguments
* to the bootstrap, that would appear in the
* {@code BootstrapMethods} attribute
* @throws NullPointerException if any parameter is null
* @throws NullPointerException if any parameter or its contents are {@code null}
* @throws IllegalArgumentException if the invocation name has the incorrect
* format
* @jvms 4.2.2 Unqualified Names
@ -79,6 +79,9 @@ public class DynamicCallSiteDesc {
this.invocationType = requireNonNull(invocationType);
this.bootstrapMethod = requireNonNull(bootstrapMethod);
this.bootstrapArgs = requireNonNull(bootstrapArgs.clone());
for (int i = 0; i < this.bootstrapArgs.length; i++) {
requireNonNull(this.bootstrapArgs[i]);
}
if (invocationName.length() == 0)
throw new IllegalArgumentException("Illegal invocation name: " + invocationName);
}
@ -97,7 +100,7 @@ public class DynamicCallSiteDesc {
* to the bootstrap, that would appear in the
* {@code BootstrapMethods} attribute
* @return the nominal descriptor
* @throws NullPointerException if any parameter is null
* @throws NullPointerException if any parameter or its contents are {@code null}
* @throws IllegalArgumentException if the invocation name has the incorrect
* format
* @jvms 4.2.2 Unqualified Names