CFR: javax.xml.parsers: Using ServiceLoader to load JAXP parser factories (7169894: JAXP Plugability Layer: using service loader)

Daniel Fuchs daniel.fuchs at oracle.com
Wed Dec 5 14:56:00 UTC 2012


On 12/5/12 3:45 PM, Alan Bateman wrote:
> On 04/12/2012 15:55, Daniel Fuchs wrote:
>>
>> So that would be the wording:
>>
>>      * Uses the service-provider loading facilities, defined by the
>>      * {@link java.util.ServiceLoader} class, to attempt to locate
>>      * and load an implementation of the service. If there are
>>      * providers other than the implementation specific default
>>      * located, then the first provider that is
>>      * not the default is instantiated and returned; Otherwise
>>      * the default implementation is returned if it is on the
>>      * classpath or installed as an extension.
>>
>> This however suggests that in JDK 8 the default implementation
>> *needs* to be put on the classpath or installed as an extension.
>> But is that right?
>> Wouldn't that be required only when running with a profile in
>> which the default implementation is not present by default?
>>
>> Maybe we need to find yet a better wording.
>>
>> -- daniel
> It might be better to just leave it as "Otherwise the default
> implementation is returned".

Or maybe:

"Otherwise, the default implementation, if present, is returned" ?

I think the original intent was to make provision for the case where
the implementation module would not be installed....

-- daniel
>
> -Alan




More information about the core-libs-dev mailing list