mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8157246: MHs.arrayLength, arrayElementGetter/Setter, arrayConstructor need to specify invocation-time behavior
Reviewed-by: psandoz, rriggs
This commit is contained in:
parent
6a826075c2
commit
52693f1ca5
8 changed files with 248 additions and 11 deletions
|
@ -662,8 +662,10 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
|||
}
|
||||
|
||||
static void checkSpreadArgument(Object av, int n) {
|
||||
if (av == null) {
|
||||
if (n == 0) return;
|
||||
if (av == null && n == 0) {
|
||||
return;
|
||||
} else if (av == null) {
|
||||
throw new NullPointerException("null array reference");
|
||||
} else if (av instanceof Object[]) {
|
||||
int len = ((Object[])av).length;
|
||||
if (len == n) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue