mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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
|
@ -185,8 +185,8 @@ class MethodHandleStatics {
|
|||
/** Propagate unchecked exceptions and errors, but wrap anything checked and throw that instead. */
|
||||
/*non-public*/
|
||||
static Error uncaughtException(Throwable ex) {
|
||||
if (ex instanceof Error) throw (Error) ex;
|
||||
if (ex instanceof RuntimeException) throw (RuntimeException) ex;
|
||||
if (ex instanceof Error error) throw error;
|
||||
if (ex instanceof RuntimeException re) throw re;
|
||||
throw new InternalError("uncaught exception", ex);
|
||||
}
|
||||
private static String message(String message, Object obj) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue