8286615: Small refactor to SerializedLambda

Reviewed-by: bpb, iris
This commit is contained in:
Joe Darcy 2022-05-12 16:56:05 +00:00
parent 17c52789b7
commit 160944bc6b

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022, 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
@ -277,9 +277,7 @@ public final class SerializedLambda implements Serializable {
return deserialize.invoke(null, this);
} catch (ReflectiveOperationException roe) {
ObjectStreamException ose = new InvalidObjectException("ReflectiveOperationException during deserialization");
ose.initCause(roe);
throw ose;
throw new InvalidObjectException("ReflectiveOperationException during deserialization", roe);
} catch (PrivilegedActionException e) {
Exception cause = e.getException();
if (cause instanceof RuntimeException)