Review Request JDK-8210721: Replace legacy serial exception field with Throwable::cause
lance.andersen at oracle.com
Thu Sep 13 19:32:24 UTC 2018
Looks good Mandy...
> On Sep 13, 2018, at 2:44 PM, mandy chung <mandy.chung at oracle.com> wrote:
> A few exception classes such as ExceptionInInitializerError, InvocationTargetException,
> etc were defined prior to the exception chaining facility and provides the API to get
> the cause of the exception. These classes keep its legacy serial field e.g.
> ExceptionInInitializerError::exception to get the serialization to work on older JDK version.
> During the review of JDK-8209553 , Peter and Joe suggest to remove this legacy
> serial field and implement the serialization using serialPersistentFields, readObject
> and writeObject. It turns out that these redundant fields were removed when the
> exception chaining support was initially implemented but it got reverted to fix
> JDK-4385429 since Throwable::setCause rejects any further change as
> Throwable::cause has been initialized to null.
> This patch removes these legacy serial field and stores the cause in Throwable::cause.
> It's essentially a redo for the fix for JDK-4385429.
>  http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-August/054878.html
<http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
More information about the core-libs-dev