RFR JDK-8209553: ExceptionInInitializerError can have a default detail message if the cause is given
mandy chung
mandy.chung at oracle.com
Thu Aug 16 00:48:45 UTC 2018
On 8/15/18 5:10 PM, mandy chung wrote:
>
> I think we should remove the ExceptionInInitializerError::getCause
> method and have getException to return getCause(). I think the
> simplest is to keep the exception field and make sure it's set
> with the cause. Existing version of EIIE always has null cause.
> readObject will set the cause to be same as exception. There may
> be other options.
I prototype it:
http://cr.openjdk.java.net/~mchung/jdk12/webrevs/8209553/webrev.01/
I manually verified it reading/writing with new and old version.
I will have to add the interop test case and possibly add a
package-private method to set Throwable::cause (rather than
making the field package-private). Will update you.
Mandy
More information about the core-libs-dev
mailing list