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:
Chen Liang 2023-06-27 16:10:50 +00:00 committed by Mandy Chung
parent 7ce967a10c
commit 2bd4136bdb
34 changed files with 211 additions and 292 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -280,8 +280,8 @@ public final class SerializedLambda implements Serializable {
throw new InvalidObjectException("ReflectiveOperationException during deserialization", roe);
} catch (PrivilegedActionException e) {
Exception cause = e.getException();
if (cause instanceof RuntimeException)
throw (RuntimeException) cause;
if (cause instanceof RuntimeException re)
throw re;
else
throw new RuntimeException("Exception in SerializedLambda.readResolve", e);
}