RFR: javax.xml.stream: Using ServiceLoader to load JAXP stream factories (7169894: JAXP Plugability Layer: using service loader)

Daniel Fuchs daniel.fuchs at oracle.com
Mon Dec 17 17:43:59 UTC 2012


Here is a new webrev in the series that addresses using ServiceLoader in
JAXP for JDK 8.

7169894: JAXP Plugability Layer: using service loader

This changeset addresses modification in the javax.xml.stream
It is similar to changes proposed for the javax.xml.parsers
package [1], with a few differences due to the specificity of


1. The XMLXxxxFactory.newInstance methods that takes parameter takes
    a property name, rather than a class name, and thus calls

2. One of the deprecated XMLOutputFactory.newInstance method had a
    bug - it used to return an XMLInputFactory - and was deprecated
    because of that - so I did preserve the bug.

3. The noarg newFactory() methods were leaking instances of the
    private FactoryFinder$ConfigurationError - my patch corrects
    that since it removes FactoryFinder$ConfigurationError.

4. In FactoryFinder.find() the ClassLoader parameter is often ignored,
    which makes the factories in the stream package behave differently
    from theirs cousins in the other packages. I believe this was an
    oversight due to (1).
    My patch will not fix that - I will instead log this as a separate


best regards,

-- daniel

previous webrevs in the series:

[1] javax.xml.parsers:

[2] javax.xml.datatype:

More information about the core-libs-dev mailing list