Consider this testscase:
---
enum E {}
try {
MethodType switchType = MethodType.methodType(int.class, E.class, int.class);
BSM_ENUM_SWITCH.invoke(null, "", switchType,
new Object[] {"A"});
fail("Didn't get the expected exception.");
} catch (NullPointerException ex) {
//OK
}
---
---
enum E {}
try {
MethodType switchType = MethodType.methodType(int.class, E.class, int.class);
BSM_ENUM_SWITCH.invoke(null, "", switchType,
new Object[] {"A"});
fail("Didn't get the expected exception.");
} catch (NullPointerException ex) {
//OK
}
---
- csr for
-
JDK-8375120 SwitchBoostraps.enumSwitch does not throw an NPE when lookup is null in some cases
-
- Closed
-
- is cloned by
-
JDK-8376162 SwitchBoostraps.typeSwitch does not throw IAE as expected
-
- Open
-
- links to
-
Commit(master)
openjdk/jdk/315bf07b
-
Review(master)
openjdk/jdk/29202