RFR [JDK8]: 7169894: JAXP Plugability Layer: using service loader
Alan Bateman
Alan.Bateman at oracle.com
Thu Jun 21 12:44:11 UTC 2012
On 21/06/2012 08:55, Joe Wang wrote:
> :
> webrev:
> http://cr.openjdk.java.net/~joehw/jdk8/7169894/webrev/
It's great to get this work started.
The javadoc changes look okay to me and fine for this change. However
there are a few areas that could be made clearer, like specifying the
behavior for the case that is error encountered locating the providers.
Also it does not specific which class loader is used.
On the implementation changes then I agree with Paul's comment that
there is a lot of duplication. I realize you have inherited some
technical debt but now seems a good opportunity to clean this up instead
of changing essentially the same code in lots of places.
I don't understand the need for the Class.forName in findServiceProvider
as I thought this method should just use ServiceLoader.
I see Paul also suggested that the default/fallback implementation not
be registered but an important need here is that the JAXP module
shouldn't need to include all of Xerces and Xalan. I think it would be
cleaner to use services mechanism rather than using an optional dependency.
-Alan.
More information about the core-libs-dev
mailing list