RFR [11] (JAXP): 6857903: SAXException.initCause() does not correctly set Exception

Jason Mehrens jason_mehrens at hotmail.com
Thu Dec 21 19:00:21 UTC 2017


You have to override all of the constructors to always disable initCause.  Actually a similar issue was covered in:


Pretty much everything was hashed out in those threads.

Here is the final webrev for that:


That should be a good cookbook for changes and tests required for this issue.  Note that it gets rid of the Exception field and maintains serial compatibility.  
Looking back on that change, I would have changed it so the InvalidClassException added the double cause as suppressed exceptions.


From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> on behalf of Aleks Efimov <aleksej.efimov at oracle.com>
Sent: Thursday, December 21, 2017 11:27 AM
To: core-libs-dev
Subject: RFR [11] (JAXP): 6857903: SAXException.initCause() does not correctly set Exception


Please, help to review the fix for jaxp bug that fixes SAXException to
correctly set exception cause with 'setCause' method:
I've tried to keep the fix miminal with respect to serial form of this
API class, i.e. kept private 'exception' field.

The new test case was added to IssueTracker56Test unit test. Testing
showed no related JCK/JTREG failures.

With Best Regards,

More information about the core-libs-dev mailing list