RFR 8009581: Xpathexception does not honor initcause()
jason_mehrens at hotmail.com
Tue May 21 16:51:03 UTC 2013
> Actually, the readObject calls the super.initCause, because there is no
> initCause in XPathException.
I would think that subclasses of XPE will see calls to this.initCause from readObject. That wouldn't have happened prior to this change.
> About 'super.getCause() == null' check: yes it can be done in such way.
> In current version I caught the IllegalStateException to correctly
> process the situation when the cause was already initialized.
I think you'll always have to catch ISE. If super.getCause is not null you know initCause will fail. I would think it would be cheaper to null check than to fillStackTrace. But, I haven't tested that.
More information about the core-libs-dev