RFR: javax.xml.stream: Using ServiceLoader to load JAXP stream factories (7169894: JAXP Plugability Layer: using service loader) (original) (raw)
Daniel Fuchs daniel.fuchs at oracle.com
Mon Dec 17 17:43:59 UTC 2012
- Previous message: hg: jdk8/tl/jdk: 8005090: Include com.sun.source.doctree in Tree API docs
- Next message: RFR: javax.xml.stream: Using ServiceLoader to load JAXP stream factories (7169894: JAXP Plugability Layer: using service loader)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
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 package. It is similar to changes proposed for the javax.xml.parsers package [1], with a few differences due to the specificity of javax.xml.stream.
Namely:
The XMLXxxxFactory.newInstance methods that takes parameter takes a property name, rather than a class name, and thus calls FactoryFinder.find.
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.
The noarg newFactory() methods were leaking instances of the private FactoryFinder$ConfigurationError - my patch corrects that since it removes FactoryFinder$ConfigurationError.
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 issue.
<http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.stream/webrev.00>
best regards,
-- daniel
previous webrevs in the series:
[1] javax.xml.parsers: <http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.parser/webrev.06>
[2] javax.xml.datatype: <http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.datatype/webrev.02>
- Previous message: hg: jdk8/tl/jdk: 8005090: Include com.sun.source.doctree in Tree API docs
- Next message: RFR: javax.xml.stream: Using ServiceLoader to load JAXP stream factories (7169894: JAXP Plugability Layer: using service loader)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]