mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect
Reviewed-by: mchung, darcy
This commit is contained in:
parent
7ce967a10c
commit
2bd4136bdb
34 changed files with 211 additions and 292 deletions
|
@ -30,7 +30,6 @@ import jdk.internal.vm.annotation.ForceInline;
|
|||
import jdk.internal.vm.annotation.Hidden;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static java.lang.invoke.MethodHandleStatics.*;
|
||||
|
@ -244,7 +243,7 @@ class Invokers {
|
|||
throw newIllegalArgumentException("need homogeneous rest arguments", restargType);
|
||||
}
|
||||
if (argType == Object.class) return Object[].class;
|
||||
return Array.newInstance(argType, 0).getClass();
|
||||
return argType.arrayType();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue