RFR: javax.xml.datatype: Using ServiceLoader to load JAXP datatype factories (7169894: JAXP Plugability Layer: using service loader)
Joe Wang
huizhe.wang at oracle.com
Thu Dec 13 20:24:52 UTC 2012
Hi Daniel,
This looks good. We had some discussion over if there's a difference in
classloading between the original sequence and that of ServiceLoader. I
understand you have the full regression testsuite from SQE. Just would
like to make sure they pass just fine.
Thanks,
Joe
On 12/12/2012 5:08 AM, Daniel Fuchs wrote:
> Hi,
>
> Please find below a refreshed webrev which adds a bit of cleanup
> suggested by Paul.
>
> Instead of casting the result of newInstance() at several places,
> we pass the expected base type to newInstance so that the cast
> occurs only once.
>
> <http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.datatype/webrev.01>
>
>
> -- daniel
>
> Note: I have applied the same cleanup to the parsers package:
> javax.xml.parsers:
> <http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.parsers/webrev.05/>
>
>
>
> On 12/11/12 6:47 PM, Daniel Fuchs wrote:
>> 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.datatype
>> package.
>> It is similar to changes proposed for the javax.xml.parsers
>> package [1], with a few differences due to the specificities of
>> javax.xml.datatype.
>>
>> Namely:
>>
>> 1. The documentation that describes the loading mechanism is in the
>> class header rather than in the method documentation - which leads
>> to some wording changes.
>>
>> 2. The DatatypeFactory is specified to throw a
>> DatatypeConfigurationException - which is a checked exception,
>> instead of an Error - as was FactoryConfigurationError
>>
>> 3. DatatypeConfigurationException allows to wrap
>> ServiceConfigurationError directly - so the additional layer
>> of RuntimeException is not needed here.
>>
>> <http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.datatype/webrev.00>
>>
>>
>>
>> -- daniel
>>
>> [1] javax.xml.parsers:
>> <http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.parsers/webrev.04/>
>>
>>
>>
>
More information about the core-libs-dev
mailing list