RFR [JDK8]: 7169894: JAXP Plugability Layer: using service loader

Paul Sandoz paul.sandoz at oracle.com
Thu Aug 30 07:30:03 UTC 2012

On Aug 30, 2012, at 1:33 AM, Joe Wang <huizhe.wang at oracle.com> wrote:

> Paul, Alan,
> Confusion was what jaxp meant to give :)  

My eyes wobble when i look at all that class loading code!

>  I was told that the factory/object finders, security support classes were duplicated, and needed to be kept in sync.  But they are not even in their original form, unfortunately.
> Both of you mentioned that it's desirable to make SCE the cause for the configuration exception.  DatatypeConfigurationException is different from all others in that, it's an Exception while others Error, it takes Throwable as cause while others Exception.  I did not want to change the signatures of the other configuration error classes, that is, the constructors would need to take Throwable instead of Exception (as they should have already done).

Argh! what a mess.

> As a comprise, I've wrapped the error message in a confguration error.  Would you think it's sufficient to add to the message what you did below (e.g. " could not be loaded or instantiated using java.util.ServiceLoader"?

Yeah, something like that might be helpful.

> Or are you into making signature changes?  (sth. I thought we didn't want to for this patch)

I would leave those FactoryConfigurationError classes alone and wrap the SCE. Those classes are beyond saving!


More information about the core-libs-dev mailing list